Documentation
¶
Index ¶
Constants ¶
View Source
const UploadNotFoundErrorName = "UploadNotFound"
Variables ¶
View Source
var ErrUploadNotFound = errors.New(UploadNotFoundErrorName, "upload not found")
ErrUploadNotFound indicates an upload does not exist.
Functions ¶
This section is empty.
Types ¶
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 ListShardsConfig ¶
type ListShardsConfig = store.PaginationConfig
type ListShardsOption ¶
type ListShardsOption func(cfg *ListShardsConfig)
func WithListShardsCursor ¶
func WithListShardsCursor(cursor string) ListShardsOption
func WithListShardsLimit ¶
func WithListShardsLimit(limit int) ListShardsOption
type Store ¶
type Store interface {
Exists(ctx context.Context, space did.DID, root cid.Cid) (bool, error)
// May return [ErrUploadNotFound] if the upload does not exist.
Get(ctx context.Context, space did.DID, root cid.Cid) (UploadRecord, error)
Inspect(ctx context.Context, root cid.Cid) (UploadInspectRecord, error)
List(ctx context.Context, space did.DID, options ...ListOption) (store.Page[UploadRecord], error)
// Lists the shards of an upload.
ListShards(ctx context.Context, space did.DID, root cid.Cid, options ...ListShardsOption) (store.Page[cid.Cid], error)
// Removes an item from the table but fails if the item does not exist.
Remove(ctx context.Context, space did.DID, root cid.Cid) error
// Inserts an item in the table if it does not already exist or updates an
// existing item if it does exist.
Upsert(ctx context.Context, space did.DID, root cid.Cid, shards []cid.Cid, cause cid.Cid) error
}
type UploadInspectRecord ¶
Click to show internal directories.
Click to hide internal directories.