Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.5 kB · 54 lines
Go
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455// Code generated by glex; DO NOT EDIT.
// Lexicon schema: com.atproto.sync.getLatestCommit
package comatproto
import ( "context" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
type SyncGetLatestCommit_Output struct { LexiconTypeID string `json:"$type,omitempty"` Cid string `json:"cid"` Rev string `json:"rev"`}
// RecordTypeID implements glex.Record.func (t *SyncGetLatestCommit_Output) RecordTypeID() string { return "com.atproto.sync.getLatestCommit" }
func (t *SyncGetLatestCommit_Output) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "com.atproto.sync.getLatestCommit" return glex.MarshalCBOR(w, &cp)}
func (t *SyncGetLatestCommit_Output) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// SyncGetLatestCommit calls the XRPC method "com.atproto.sync.getLatestCommit".//// Get the current commit CID & revision of the specified repo. Does not require auth.//// did: The DID of the repo.func SyncGetLatestCommit(ctx context.Context, c glex.LexClient, did string) (*SyncGetLatestCommit_Output, error) { var out SyncGetLatestCommit_Output
params := map[string]interface{}{} params["did"] = did
if err := c.LexDo(ctx, glex.Query, "", "com.atproto.sync.getLatestCommit", params, nil, &out); err != nil { return nil, err } return &out, nil}