interface

Backend

Store, open, list, and delete upload objects.

Properties

PropertyTypeDescription
Putfunc(context.Context, string, io.Reader, int64, string) errorThe Put value.
Openfunc(context.Context, string) (io.ReadCloser, Object, error)The Open value.
Deletefunc(context.Context, string) errorThe Delete value.
Listfunc(context.Context, ListRequest) (ListPage, error)The List value.

How it works

Put must atomically replace an existing key. Delete of a missing key must succeed. List returns a bounded, unique, key-ordered page under the requested prefix and every result has an authoritative non-zero ModifiedAt.

Ridu revalidates namespace ownership and committed upload references immediately before orphan cleanup. Return storage.ErrNotFound from Open when appropriate.

Full signature

type Backend interface { Put(context.Context, string, io.Reader, int64, string) error Open(context.Context, string) (io.ReadCloser, Object, error) Delete(context.Context, string) error List(context.Context, ListRequest) (ListPage, error) }

Source storage/storage.go:51