// Code generated by glex; DO NOT EDIT. // Lexicon schema: com.atproto.identity.resolveHandle package comatproto import ( "context" "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) type IdentityResolveHandle_Output struct { LexiconTypeID string `json:"$type,omitempty"` Did string `json:"did"` } // RecordTypeID implements glex.Record. func (t *IdentityResolveHandle_Output) RecordTypeID() string { return "com.atproto.identity.resolveHandle" } func (t *IdentityResolveHandle_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.identity.resolveHandle" return glex.MarshalCBOR(w, &cp) } func (t *IdentityResolveHandle_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // IdentityResolveHandle calls the XRPC method "com.atproto.identity.resolveHandle". // // Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. // // handle: The handle to resolve. func IdentityResolveHandle(ctx context.Context, c glex.LexClient, handle string) (*IdentityResolveHandle_Output, error) { var out IdentityResolveHandle_Output params := map[string]interface{}{} params["handle"] = handle if err := c.LexDo(ctx, glex.Query, "", "com.atproto.identity.resolveHandle", params, nil, &out); err != nil { return nil, err } return &out, nil }