Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
1.4 kB · 49 lines
Go
at master
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package org_tangled
// schema: org.tangled.git.getEntry
import ( "context"
"github.com/bluesky-social/indigo/lex/util")
const ( GitGetEntryNSID = "org.tangled.git.getEntry")
// GitGetEntry_Output is the output of a org.tangled.git.getEntry call.type GitGetEntry_Output struct { LastCommit *GitDefs_Commit `json:"lastCommit,omitempty" cborgen:"lastCommit,omitempty"` Mode string `json:"mode" cborgen:"mode"` // name: The file name Name string `json:"name" cborgen:"name"` Oid string `json:"oid" cborgen:"oid"` // size: Blob size Size int64 `json:"size" cborgen:"size"` // submodule: Submodule information if path is a submodule Submodule *GitDefs_Submodule `json:"submodule,omitempty" cborgen:"submodule,omitempty"`}
// GitGetEntry calls the XRPC method "org.tangled.git.getEntry".//// path: path of the entity// ref: Git revision (branch, tag, or commit Object ID)// repo: DID of the repositoryfunc GitGetEntry(ctx context.Context, c util.LexClient, path string, ref string, repo string) (*GitGetEntry_Output, error) { var out GitGetEntry_Output
params := map[string]interface{}{} params["path"] = path if ref != "" { params["ref"] = ref } params["repo"] = repo if err := c.LexDo(ctx, util.Query, "", "org.tangled.git.getEntry", params, nil, &out); err != nil { return nil, err }
return &out, nil}