Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.9 kB · 60 lines
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061// Code generated by glex; DO NOT EDIT.
// Lexicon schema: com.atproto.repo.describeRepo
package comatproto
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type RepoDescribeRepo_Output struct { LexiconTypeID string `json:"$type,omitempty"` // collections: List of all the collections (NSIDs) for which this repo contains at least one record. Collections []string `json:"collections"` Did string `json:"did"` // didDoc: The complete DID document for this account. DidDoc *glex.LexiconTypeDecoder `json:"didDoc"` Handle string `json:"handle"` // handleIsCorrect: Indicates if handle is currently valid (resolves bi-directionally) HandleIsCorrect bool `json:"handleIsCorrect"`}
// RecordTypeID implements glex.Record.func (t *RepoDescribeRepo_Output) RecordTypeID() string { return "com.atproto.repo.describeRepo" }
func (t *RepoDescribeRepo_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.repo.describeRepo" return glex.MarshalCBOR(w, &cp)}
func (t *RepoDescribeRepo_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// RepoDescribeRepo calls the XRPC method "com.atproto.repo.describeRepo".//// Get information about an account and repository, including the list of collections. Does not require auth.//// repo: The handle or DID of the repo.func RepoDescribeRepo(ctx context.Context, c glex.LexClient, repo string) (*RepoDescribeRepo_Output, error) { var out RepoDescribeRepo_Output
params := map[string]interface{}{} params["repo"] = repo
if err := c.LexDo(ctx, glex.Query, "", "com.atproto.repo.describeRepo", params, nil, &out); err != nil { return nil, err } return &out, nil}