Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
2.1 kB · 61 lines
Go
at master
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package org_tangled
// schema: org.tangled.git.listLanguages
import ( "context"
"github.com/bluesky-social/indigo/lex/util")
const ( GitListLanguagesNSID = "org.tangled.git.listLanguages")
// GitListLanguages_Language is a "language" in the org.tangled.git.listLanguages schema.type GitListLanguages_Language struct { // color: Render color for this language Color *string `json:"color,omitempty" cborgen:"color,omitempty"` // extensions: File extensions recognized as this language Extensions []string `json:"extensions,omitempty" cborgen:"extensions,omitempty"` // fileCount: Files counted for this language FileCount *int64 `json:"fileCount,omitempty" cborgen:"fileCount,omitempty"` // name: Language name Name string `json:"name" cborgen:"name"` // percentage: Share of total size, 0-100 Percentage int64 `json:"percentage" cborgen:"percentage"` // size: Bytes counted for this language Size int64 `json:"size" cborgen:"size"`}
// GitListLanguages_Output is the output of a org.tangled.git.listLanguages call.type GitListLanguages_Output struct { Languages []*GitListLanguages_Language `json:"languages" cborgen:"languages"` // ref: The ref the breakdown was computed at Ref string `json:"ref" cborgen:"ref"` // totalFiles: Total counted files TotalFiles *int64 `json:"totalFiles,omitempty" cborgen:"totalFiles,omitempty"` // totalSize: Total bytes across counted files TotalSize *int64 `json:"totalSize,omitempty" cborgen:"totalSize,omitempty"`}
// GitListLanguages calls the XRPC method "org.tangled.git.listLanguages".//// ref: Git revision (branch, tag, or commit Object ID)// repo: DID of the repositoryfunc GitListLanguages(ctx context.Context, c util.LexClient, ref string, repo string) (*GitListLanguages_Output, error) { var out GitListLanguages_Output
params := map[string]interface{}{} if ref != "" { params["ref"] = ref } params["repo"] = repo if err := c.LexDo(ctx, util.Query, "", "org.tangled.git.listLanguages", params, nil, &out); err != nil { return nil, err }
return &out, nil}