Something went wrong. Try again.
Experimental AT protocol email hosting
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
// Lexicon schema: at.sovrn.mail.createAccount
package sovrn
import ( "context"
lexutil "github.com/bluesky-social/indigo/lex/util")
// MailCreateAccount_Input is the input argument to a at.sovrn.mail.createAccount call.type MailCreateAccount_Input struct { // address: Full address (you@example.com) or bare local part (you) implying the target domain. Foreign-domain addresses are rejected. Address string `json:"address" cborgen:"address"` Contact *MailApiDefs_ContactCard `json:"contact,omitempty" cborgen:"contact,omitempty"` // did: Target owner DID. Exactly one of did/handle/newAccount is required. Did *string `json:"did,omitempty" cborgen:"did,omitempty"` DomainId string `json:"domainId" cborgen:"domainId"` // handle: Target owner's existing ATProto handle; resolved server-side to a DID. Exactly one of did/handle/newAccount is required. Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` // newAccount: Create a new Atmosphere account: derive <local>.at.<domain> from address server-side and create a pending mailbox. Must not be combined with did/handle. NewAccount *bool `json:"newAccount,omitempty" cborgen:"newAccount,omitempty"`}
// MailCreateAccount_Output is the output of a at.sovrn.mail.createAccount call.type MailCreateAccount_Output struct { AccountId string `json:"accountId" cborgen:"accountId"` State string `json:"state" cborgen:"state"`}
// MailCreateAccount calls the XRPC method "at.sovrn.mail.createAccount".func MailCreateAccount(ctx context.Context, c lexutil.LexClient, input *MailCreateAccount_Input) (*MailCreateAccount_Output, error) { var out MailCreateAccount_Output if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "at.sovrn.mail.createAccount", nil, input, &out); err != nil { return nil, err }
return &out, nil}