Documentation
¶
Index ¶
Constants ¶
View Source
const ATPROTO_REPO_VERSION int64 = 3
Version of the repo data format implemented in this package
Variables ¶
View Source
var ErrNotFound = errors.New("record not found in repository")
Functions ¶
Types ¶
type Commit ¶
type Commit struct { DID string `json:"did" cborgen:"did"` Version int64 `json:"version" cborgen:"version"` // currently: 3 Prev *cid.Cid `json:"prev" cborgen:"prev"` // TODO: could we omitempty yet? breaks signatures I guess Data cid.Cid `json:"data" cborgen:"data"` Sig []byte `json:"sig" cborgen:"sig"` Rev string `json:"rev" cborgen:"rev"` }
func (*Commit) VerifyStructure ¶
does basic checks that syntax is correct
type Operation ¶
type Operation struct { Path string Value *cid.Cid Prev *cid.Cid }
func NormalizeOps ¶
re-orders operation list, and checks for duplicates
func ParseCommitOps ¶
func ParseCommitOps(ops []*comatproto.SyncSubscribeRepos_RepoOp) ([]Operation, error)
type Repo ¶
type Repo struct { DID syntax.DID Clock *syntax.TIDClock Commit *Commit RecordStore blockstore.Blockstore MST mst.Tree }
func VerifyCommitMessage ¶
func VerifyCommitMessage(ctx context.Context, msg *comatproto.SyncSubscribeRepos_Commit) (*Repo, error)
temporary/experimental method to parse and verify a firehose commit message
func (*Repo) GetRecordBytes ¶
Click to show internal directories.
Click to hide internal directories.