Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
9.1 kB · 224 lines
Go
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225// Code generated by glex; DO NOT EDIT.
// Lexicon schema: com.atproto.sync.subscribeRepos
package comatproto
import ( "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen")
// SyncSubscribeRepos_Account is a "account" in the com.atproto.sync.subscribeRepos schema.//// Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.type SyncSubscribeRepos_Account struct { LexiconTypeID string `json:"$type,omitempty"` // active: Indicates that the account has a repository which can be fetched from the host that emitted this event. Active bool `json:"active"` Did string `json:"did"` Seq int64 `json:"seq"` // status: If active=false, this optional field indicates a reason for why the account is not active. Status *string `json:"status,omitempty"` Time string `json:"time"`}
// RecordTypeID implements glex.Record.func (t *SyncSubscribeRepos_Account) RecordTypeID() string { return "com.atproto.sync.subscribeRepos#account"}
func (t *SyncSubscribeRepos_Account) 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.subscribeRepos#account" return glex.MarshalCBOR(w, &cp)}
func (t *SyncSubscribeRepos_Account) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// SyncSubscribeRepos_Commit is a "commit" in the com.atproto.sync.subscribeRepos schema.//// Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.type SyncSubscribeRepos_Commit struct { LexiconTypeID string `json:"$type,omitempty"` Blobs []glex.Link `json:"blobs"` // blocks: CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. Blocks glex.Bytes `json:"blocks"` // commit: Repo commit object CID. Commit glex.Link `json:"commit"` Ops []SyncSubscribeRepos_RepoOp `json:"ops"` // prevData: The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. PrevData *glex.Link `json:"prevData,omitempty"` // rebase: DEPRECATED -- unused Rebase bool `json:"rebase"` // repo: The repo this event comes from. Note that all other message types name this field 'did'. Repo string `json:"repo"` // rev: The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. Rev string `json:"rev"` // seq: The stream sequence number of this message. Seq int64 `json:"seq"` // since: The rev of the last emitted commit from this repo (if any). Since string `json:"since"` // time: Timestamp of when this message was originally broadcast. Time string `json:"time"` // tooBig: DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. TooBig bool `json:"tooBig"`}
// RecordTypeID implements glex.Record.func (t *SyncSubscribeRepos_Commit) RecordTypeID() string { return "com.atproto.sync.subscribeRepos#commit"}
func (t *SyncSubscribeRepos_Commit) 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.subscribeRepos#commit" return glex.MarshalCBOR(w, &cp)}
func (t *SyncSubscribeRepos_Commit) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// SyncSubscribeRepos_Identity is a "identity" in the com.atproto.sync.subscribeRepos schema.//// Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.type SyncSubscribeRepos_Identity struct { LexiconTypeID string `json:"$type,omitempty"` Did string `json:"did"` // handle: The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. Handle *string `json:"handle,omitempty"` Seq int64 `json:"seq"` Time string `json:"time"`}
// RecordTypeID implements glex.Record.func (t *SyncSubscribeRepos_Identity) RecordTypeID() string { return "com.atproto.sync.subscribeRepos#identity"}
func (t *SyncSubscribeRepos_Identity) 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.subscribeRepos#identity" return glex.MarshalCBOR(w, &cp)}
func (t *SyncSubscribeRepos_Identity) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// SyncSubscribeRepos_Info is a "info" in the com.atproto.sync.subscribeRepos schema.type SyncSubscribeRepos_Info struct { LexiconTypeID string `json:"$type,omitempty"` Message *string `json:"message,omitempty"` Name string `json:"name"`}
// RecordTypeID implements glex.Record.func (t *SyncSubscribeRepos_Info) RecordTypeID() string { return "com.atproto.sync.subscribeRepos#info"}
func (t *SyncSubscribeRepos_Info) 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.subscribeRepos#info" return glex.MarshalCBOR(w, &cp)}
func (t *SyncSubscribeRepos_Info) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// SyncSubscribeRepos_RepoOp is a "repoOp" in the com.atproto.sync.subscribeRepos schema.//// A repo operation, ie a mutation of a single record.type SyncSubscribeRepos_RepoOp struct { LexiconTypeID string `json:"$type,omitempty"` Action string `json:"action"` // cid: For creates and updates, the new record CID. For deletions, null. Cid glex.Link `json:"cid"` Path string `json:"path"` // prev: For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. Prev *glex.Link `json:"prev,omitempty"`}
// RecordTypeID implements glex.Record.func (t *SyncSubscribeRepos_RepoOp) RecordTypeID() string { return "com.atproto.sync.subscribeRepos#repoOp"}
func (t *SyncSubscribeRepos_RepoOp) 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.subscribeRepos#repoOp" return glex.MarshalCBOR(w, &cp)}
func (t *SyncSubscribeRepos_RepoOp) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// SyncSubscribeRepos_Sync is a "sync" in the com.atproto.sync.subscribeRepos schema.//// Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.type SyncSubscribeRepos_Sync struct { LexiconTypeID string `json:"$type,omitempty"` // blocks: CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. Blocks glex.Bytes `json:"blocks"` // did: The account this repo event corresponds to. Must match that in the commit object. Did string `json:"did"` // rev: The rev of the commit. This value must match that in the commit object. Rev string `json:"rev"` // seq: The stream sequence number of this message. Seq int64 `json:"seq"` // time: Timestamp of when this message was originally broadcast. Time string `json:"time"`}
// RecordTypeID implements glex.Record.func (t *SyncSubscribeRepos_Sync) RecordTypeID() string { return "com.atproto.sync.subscribeRepos#sync"}
func (t *SyncSubscribeRepos_Sync) 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.subscribeRepos#sync" return glex.MarshalCBOR(w, &cp)}
func (t *SyncSubscribeRepos_Sync) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}