A fork of https://github.com/teal-fm/piper
at main 39 lines 1.3 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package atproto 4 5// schema: com.atproto.repo.describeRepo 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/xrpc" 11) 12 13// RepoDescribeRepo_Output is the output of a com.atproto.repo.describeRepo call. 14type RepoDescribeRepo_Output struct { 15 // collections: List of all the collections (NSIDs) for which this repo contains at least one record. 16 Collections []string `json:"collections" cborgen:"collections"` 17 Did string `json:"did" cborgen:"did"` 18 // didDoc: The complete DID document for this account. 19 DidDoc interface{} `json:"didDoc" cborgen:"didDoc"` 20 Handle string `json:"handle" cborgen:"handle"` 21 // handleIsCorrect: Indicates if handle is currently valid (resolves bi-directionally) 22 HandleIsCorrect bool `json:"handleIsCorrect" cborgen:"handleIsCorrect"` 23} 24 25// RepoDescribeRepo calls the XRPC method "com.atproto.repo.describeRepo". 26// 27// repo: The handle or DID of the repo. 28func RepoDescribeRepo(ctx context.Context, c *xrpc.Client, repo string) (*RepoDescribeRepo_Output, error) { 29 var out RepoDescribeRepo_Output 30 31 params := map[string]interface{}{ 32 "repo": repo, 33 } 34 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.describeRepo", params, nil, &out); err != nil { 35 return nil, err 36 } 37 38 return &out, nil 39}