Monorepo for Tangled
at master 46 lines 1.7 kB view raw
1package tangled 2 3// schema: sh.tangled.repo.unrecordChanges 4 5import ( 6 "context" 7 8 "github.com/bluesky-social/indigo/lex/util" 9) 10 11const ( 12 RepoUnrecordChangesNSID = "sh.tangled.repo.unrecordChanges" 13) 14 15// RepoUnrecordChanges_Input is the input argument to a sh.tangled.repo.unrecordChanges call. 16type RepoUnrecordChanges_Input struct { 17 // changes: List of change hashes to unrecord 18 Changes []string `json:"changes" cborgen:"changes"` 19 // channel: Target channel to unrecord changes from (optional) 20 Channel string `json:"channel,omitempty" cborgen:"channel,omitempty"` 21 // repo: Repository identifier in format 'did:plc:.../repoName' 22 Repo string `json:"repo" cborgen:"repo"` 23} 24 25// RepoUnrecordChanges_Output is the output of a sh.tangled.repo.unrecordChanges call. 26type RepoUnrecordChanges_Output struct { 27 // unrecorded: List of successfully unrecorded change hashes 28 Unrecorded []string `json:"unrecorded" cborgen:"unrecorded"` 29 // failed: List of changes that failed to unrecord 30 Failed []*RepoUnrecordChanges_Output_Failed_Elem `json:"failed,omitempty" cborgen:"failed,omitempty"` 31} 32 33type RepoUnrecordChanges_Output_Failed_Elem struct { 34 Error string `json:"error" cborgen:"error"` 35 Hash string `json:"hash" cborgen:"hash"` 36} 37 38// RepoUnrecordChanges calls the XRPC method "sh.tangled.repo.unrecordChanges". 39func RepoUnrecordChanges(ctx context.Context, c util.LexClient, input *RepoUnrecordChanges_Input) (*RepoUnrecordChanges_Output, error) { 40 var out RepoUnrecordChanges_Output 41 if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.unrecordChanges", nil, input, &out); err != nil { 42 return nil, err 43 } 44 45 return &out, nil 46}