fork of indigo with slightly nicer lexgen
at main 1.5 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package atproto 4 5// schema: com.atproto.server.createAppPassword 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13// ServerCreateAppPassword_AppPassword is a "appPassword" in the com.atproto.server.createAppPassword schema. 14type ServerCreateAppPassword_AppPassword struct { 15 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 16 Name string `json:"name" cborgen:"name"` 17 Password string `json:"password" cborgen:"password"` 18 Privileged *bool `json:"privileged,omitempty" cborgen:"privileged,omitempty"` 19} 20 21// ServerCreateAppPassword_Input is the input argument to a com.atproto.server.createAppPassword call. 22type ServerCreateAppPassword_Input struct { 23 // name: A short name for the App Password, to help distinguish them. 24 Name string `json:"name" cborgen:"name"` 25 // privileged: If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. 26 Privileged *bool `json:"privileged,omitempty" cborgen:"privileged,omitempty"` 27} 28 29// ServerCreateAppPassword calls the XRPC method "com.atproto.server.createAppPassword". 30func ServerCreateAppPassword(ctx context.Context, c util.LexClient, input *ServerCreateAppPassword_Input) (*ServerCreateAppPassword_AppPassword, error) { 31 var out ServerCreateAppPassword_AppPassword 32 if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.createAppPassword", nil, input, &out); err != nil { 33 return nil, err 34 } 35 36 return &out, nil 37}