Monorepo for Tangled tangled.org
6

Configure Feed

Select the types of activity you want to include in your feed.

1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package tangled 4 5// schema: sh.tangled.sync.listRepos 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13const ( 14 SyncListReposNSID = "sh.tangled.sync.listRepos" 15) 16 17// SyncListRepos_DefaultBranch is a "defaultBranch" in the sh.tangled.sync.listRepos schema. 18type SyncListRepos_DefaultBranch struct { 19 // head: Commit SHA at the tip of the default branch, for reconciling against a last-known state. Width depends on the repo's git object-format. 20 Head *string `json:"head,omitempty" cborgen:"head,omitempty"` 21 // ref: Default branch ref name, eg. refs/heads/main. 22 Ref string `json:"ref" cborgen:"ref"` 23} 24 25// SyncListRepos_Output is the output of a sh.tangled.sync.listRepos call. 26type SyncListRepos_Output struct { 27 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 28 Repos []*SyncListRepos_Repo `json:"repos" cborgen:"repos"` 29} 30 31// SyncListRepos_Repo is a "repo" in the sh.tangled.sync.listRepos schema. 32type SyncListRepos_Repo struct { 33 DefaultBranch *SyncListRepos_DefaultBranch `json:"defaultBranch,omitempty" cborgen:"defaultBranch,omitempty"` 34 // repo: DID of the git repo as minted by the knot 35 Repo string `json:"repo" cborgen:"repo"` 36 // status: Serving status of the repo according to the knot. 37 Status string `json:"status" cborgen:"status"` 38} 39 40// SyncListRepos calls the XRPC method "sh.tangled.sync.listRepos". 41// 42// cursor: Pagination cursor 43// order: Sort direction over the service's repo listing order. 44func SyncListRepos(ctx context.Context, c util.LexClient, cursor string, limit int64, order string) (*SyncListRepos_Output, error) { 45 var out SyncListRepos_Output 46 47 params := map[string]interface{}{} 48 if cursor != "" { 49 params["cursor"] = cursor 50 } 51 if limit != 0 { 52 params["limit"] = limit 53 } 54 if order != "" { 55 params["order"] = order 56 } 57 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.sync.listRepos", params, nil, &out); err != nil { 58 return nil, err 59 } 60 61 return &out, nil 62}