Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.4 kB · 50 lines
Go
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051// Code generated by glex; DO NOT EDIT.
// Lexicon schema: com.atproto.identity.updateHandle
package comatproto
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type IdentityUpdateHandle_Input struct { LexiconTypeID string `json:"$type,omitempty"` // handle: The new handle. Handle string `json:"handle"`}
// RecordTypeID implements glex.Record.func (t *IdentityUpdateHandle_Input) RecordTypeID() string { return "com.atproto.identity.updateHandle"}
func (t *IdentityUpdateHandle_Input) 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.identity.updateHandle" return glex.MarshalCBOR(w, &cp)}
func (t *IdentityUpdateHandle_Input) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// IdentityUpdateHandle calls the XRPC method "com.atproto.identity.updateHandle".//// Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.func IdentityUpdateHandle(ctx context.Context, c glex.LexClient, input *IdentityUpdateHandle_Input) error {
if err := c.LexDo(ctx, glex.Procedure, "application/json", "com.atproto.identity.updateHandle", nil, input, nil); err != nil { return err } return nil}