Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
3.8 kB · 113 lines
Go
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114// Code generated by glex; DO NOT EDIT.
// Lexicon schema: com.atproto.server.describeServer
package comatproto
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type ServerDescribeServer_Output struct { LexiconTypeID string `json:"$type,omitempty"` // availableUserDomains: List of domain suffixes that can be used in account handles. AvailableUserDomains []string `json:"availableUserDomains"` // contact: Contact information Contact *ServerDescribeServer_Contact `json:"contact,omitempty"` Did string `json:"did"` // inviteCodeRequired: If true, an invite code must be supplied to create an account on this instance. InviteCodeRequired *bool `json:"inviteCodeRequired,omitempty"` // links: URLs of service policy documents. Links *ServerDescribeServer_Links `json:"links,omitempty"` // phoneVerificationRequired: If true, a phone verification token must be supplied to create an account on this instance. PhoneVerificationRequired *bool `json:"phoneVerificationRequired,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ServerDescribeServer_Output) RecordTypeID() string { return "com.atproto.server.describeServer"}
func (t *ServerDescribeServer_Output) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "com.atproto.server.describeServer" return glex.MarshalCBOR(w, &cp)}
func (t *ServerDescribeServer_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ServerDescribeServer calls the XRPC method "com.atproto.server.describeServer".//// Describes the server's account creation requirements and capabilities. Implemented by PDS.func ServerDescribeServer(ctx context.Context, c glex.LexClient) (*ServerDescribeServer_Output, error) { var out ServerDescribeServer_Output
if err := c.LexDo(ctx, glex.Query, "", "com.atproto.server.describeServer", nil, nil, &out); err != nil { return nil, err } return &out, nil}
// ServerDescribeServer_Contact is a "contact" in the com.atproto.server.describeServer schema.type ServerDescribeServer_Contact struct { LexiconTypeID string `json:"$type,omitempty"` Email *string `json:"email,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ServerDescribeServer_Contact) RecordTypeID() string { return "com.atproto.server.describeServer#contact"}
func (t *ServerDescribeServer_Contact) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "com.atproto.server.describeServer#contact" return glex.MarshalCBOR(w, &cp)}
func (t *ServerDescribeServer_Contact) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ServerDescribeServer_Links is a "links" in the com.atproto.server.describeServer schema.type ServerDescribeServer_Links struct { LexiconTypeID string `json:"$type,omitempty"` PrivacyPolicy *string `json:"privacyPolicy,omitempty"` TermsOfService *string `json:"termsOfService,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ServerDescribeServer_Links) RecordTypeID() string { return "com.atproto.server.describeServer#links"}
func (t *ServerDescribeServer_Links) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "com.atproto.server.describeServer#links" return glex.MarshalCBOR(w, &cp)}
func (t *ServerDescribeServer_Links) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}