// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. package tangled // schema: sh.tangled.repo.pijulTree import ( "context" "github.com/bluesky-social/indigo/lex/util" ) const ( RepoPijulTreeNSID = "sh.tangled.repo.pijulTree" ) // RepoPijulTree_Output is the output of a sh.tangled.repo.pijulTree call. type RepoPijulTree_Output struct { // dotdot: Path to navigate up Dotdot *string `json:"dotdot,omitempty" cborgen:"dotdot,omitempty"` Files []*RepoPijulTree_TreeEntry `json:"files" cborgen:"files"` // parent: Parent path Parent *string `json:"parent,omitempty" cborgen:"parent,omitempty"` Readme *RepoPijulTree_Readme `json:"readme,omitempty" cborgen:"readme,omitempty"` // ref: Channel name Ref *string `json:"ref,omitempty" cborgen:"ref,omitempty"` } // RepoPijulTree_Readme is a "readme" in the sh.tangled.repo.pijulTree schema. type RepoPijulTree_Readme struct { Contents *string `json:"contents,omitempty" cborgen:"contents,omitempty"` Filename *string `json:"filename,omitempty" cborgen:"filename,omitempty"` } // RepoPijulTree_TreeEntry is a "treeEntry" in the sh.tangled.repo.pijulTree schema. type RepoPijulTree_TreeEntry struct { Mode string `json:"mode" cborgen:"mode"` Name string `json:"name" cborgen:"name"` Size int64 `json:"size" cborgen:"size"` } // RepoPijulTree calls the XRPC method "sh.tangled.repo.pijulTree". // // channel: Pijul channel name (defaults to main channel) // path: Path within the repository (defaults to root) // repo: Repository identifier in format 'did:plc:.../repoName' func RepoPijulTree(ctx context.Context, c util.LexClient, channel string, path string, repo string) (*RepoPijulTree_Output, error) { var out RepoPijulTree_Output params := map[string]interface{}{} if channel != "" { params["channel"] = channel } if path != "" { params["path"] = path } params["repo"] = repo if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.pijulTree", params, nil, &out); err != nil { return nil, err } return &out, nil }