Documentation ¶
Index ¶
- Variables
- func IngestRepo(ctx context.Context, bs blockstore.Blockstore, r io.Reader) (cid.Cid, error)
- func NextTID() string
- type CborMarshaler
- type Commit
- type Meta
- type Repo
- func (r *Repo) Blockstore() blockstore.Blockstore
- func (r *Repo) Commit(ctx context.Context) (cid.Cid, error)
- func (r *Repo) CreateRecord(ctx context.Context, nsid string, rec CborMarshaler) (cid.Cid, string, error)
- func (r *Repo) DeleteRecord(ctx context.Context, rpath string) error
- func (r *Repo) DiffSince(ctx context.Context, oldrepo cid.Cid) ([]*mst.DiffOp, error)
- func (r *Repo) ForEach(ctx context.Context, prefix string, cb func(k string, v cid.Cid) error) error
- func (r *Repo) GetRecord(ctx context.Context, rpath string) (cid.Cid, cbg.CBORMarshaler, error)
- func (r *Repo) PrevCommit(ctx context.Context) (*cid.Cid, error)
- func (r *Repo) PutRecord(ctx context.Context, rpath string, rec CborMarshaler) (cid.Cid, error)
- type SignedRoot
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDoneIterating = fmt.Errorf("done iterating")
Functions ¶
func IngestRepo ¶
func IngestRepo(ctx context.Context, bs blockstore.Blockstore, r io.Reader) (cid.Cid, error)
Types ¶
type CborMarshaler ¶
type Commit ¶
type Commit struct { AuthToken *string `cborgen:"auth_token"` Data cid.Cid `cborgen:"data"` Meta cid.Cid `cborgen:"meta"` Prev *cid.Cid `cborgen:"prev,omitempty"` }
type Meta ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func NewRepo ¶
func NewRepo(ctx context.Context, bs blockstore.Blockstore) *Repo
func OpenRepo ¶
func OpenRepo(ctx context.Context, bs blockstore.Blockstore, root cid.Cid) (*Repo, error)
func (*Repo) Blockstore ¶
func (r *Repo) Blockstore() blockstore.Blockstore
func (*Repo) CreateRecord ¶
type SignedRoot ¶
type SignedRoot struct { Root cid.Cid `cborgen:"root"` Sig []byte `cborgen:"sig"` }
func (*SignedRoot) MarshalCBOR ¶
func (t *SignedRoot) MarshalCBOR(w io.Writer) error
func (*SignedRoot) UnmarshalCBOR ¶
func (t *SignedRoot) UnmarshalCBOR(r io.Reader) (err error)
Click to show internal directories.
Click to hide internal directories.