Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DifferenceRecord ¶
type DifferenceRecord struct {
// Storage provider for the space.
Provider did.DID
// Space DID (did:key:...).
Space did.DID
// Subscription in use when the size changed.
Subscription string
// Invocation CID that changed the space size (bafy...).
Cause cid.Cid
// Number of bytes added to or removed from the space.
Delta int64
// ISO timestamp the receipt for the change was issued.
ReceiptAt time.Time
// ISO timestamp we recorded the change.
InsertedAt time.Time
}
type ListConfig ¶
type ListConfig = store.PaginationConfig
type ListOption ¶
type ListOption func(cfg *ListConfig)
func WithListCursor ¶
func WithListCursor(cursor string) ListOption
func WithListLimit ¶
func WithListLimit(limit int) ListOption
type Store ¶
type Store interface {
Put(ctx context.Context, provider did.DID, space did.DID, subscription string, cause cid.Cid, delta int64, receiptAt time.Time) error
// List space diffs whose receipt was issued after the given time.
List(ctx context.Context, provider did.DID, space did.DID, after time.Time, options ...ListOption) (store.Page[DifferenceRecord], error)
}
Click to show internal directories.
Click to hide internal directories.