Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
3.3 kB · 68 lines
Go
at next-dev
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package org_tangled
// schema: org.tangled.temp.server.seedRepo
import ( "context"
"github.com/bluesky-social/indigo/lex/util")
const ( TempServerSeedRepoNSID = "org.tangled.temp.server.seedRepo")
// TempServerSeedRepo_Input is the input argument to a org.tangled.temp.server.seedRepo call.type TempServerSeedRepo_Input struct { DefaultBranch *string `json:"defaultBranch,omitempty" cborgen:"defaultBranch,omitempty"` // name: Name of the repository: mustn't contain '/', '\', '..', control/whitespace characters, and mustn't be just '.' or '..'. The knot will force lowercase it into the repo rkey. Name string `json:"name" cborgen:"name"` // ownerDid: DID of the git repo owner, who doesn't have to necessarily be a member of this particular knot. OwnerDid string `json:"ownerDid" cborgen:"ownerDid"` // records: Records to write. Max 200 per req. Records []*TempServerSeedRepo_SeedRecord `json:"records" cborgen:"records"` // repoDid: Existing repo DID which our COB records belong to. The foster knot will serve this DID as a shadow, and will give the record (authority) back to the principal knot once that given knot that *actually* owns the repo DID upgrades! RepoDid string `json:"repoDid" cborgen:"repoDid"` // source: https URL of git repo to import content from. Source *string `json:"source,omitempty" cborgen:"source,omitempty"`}
// TempServerSeedRepo_Output is the output of a org.tangled.temp.server.seedRepo call.type TempServerSeedRepo_Output struct { Did string `json:"did" cborgen:"did"` // key: Multibase-encoded public signing key that the knot has for this repo. Key string `json:"key" cborgen:"key"` Results []*TempServerSeedRepo_RecordResult `json:"results" cborgen:"results"`}
// TempServerSeedRepo_RecordResult is a "recordResult" in the org.tangled.temp.server.seedRepo schema.type TempServerSeedRepo_RecordResult struct { Collection string `json:"collection" cborgen:"collection"` // error: Reason that a record wasn't written. Error *string `json:"error,omitempty" cborgen:"error,omitempty"` Rkey string `json:"rkey" cborgen:"rkey"`}
// TempServerSeedRepo_SeedRecord is a "seedRecord" in the org.tangled.temp.server.seedRepo schema.type TempServerSeedRepo_SeedRecord struct { // author: DID which will be attributed to the record as the author. Author string `json:"author" cborgen:"author"` Collection string `json:"collection" cborgen:"collection"` // createdAt: Creation time in Unix seconds. CreatedAt int64 `json:"createdAt" cborgen:"createdAt"` // record: Record body, DAG-CBOR w/o lex validation. Max 1,000,000 bytes post-encode. Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` Rkey string `json:"rkey" cborgen:"rkey"`}
// TempServerSeedRepo calls the XRPC method "org.tangled.temp.server.seedRepo".func TempServerSeedRepo(ctx context.Context, c util.LexClient, input *TempServerSeedRepo_Input) (*TempServerSeedRepo_Output, error) { var out TempServerSeedRepo_Output if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.server.seedRepo", nil, input, &out); err != nil { return nil, err }
return &out, nil}