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