A fork of https://github.com/teal-fm/piper
at fly 32 lines 755 B view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package atproto 4 5// schema: com.atproto.sync.getHead 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/xrpc" 11) 12 13// SyncGetHead_Output is the output of a com.atproto.sync.getHead call. 14type SyncGetHead_Output struct { 15 Root string `json:"root" cborgen:"root"` 16} 17 18// SyncGetHead calls the XRPC method "com.atproto.sync.getHead". 19// 20// did: The DID of the repo. 21func SyncGetHead(ctx context.Context, c *xrpc.Client, did string) (*SyncGetHead_Output, error) { 22 var out SyncGetHead_Output 23 24 params := map[string]interface{}{ 25 "did": did, 26 } 27 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHead", params, nil, &out); err != nil { 28 return nil, err 29 } 30 31 return &out, nil 32}