spacediff

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL