Documentation ¶
Index ¶
- type Event
- type EventAction
- type FilterOption
- func FilterByHash(hs ...tilde.Digest) FilterOption
- func FilterByObjectType(typePatterns ...string) FilterOption
- func FilterByOwner(owners ...did.DID) FilterOption
- func FilterByStreamHash(hs ...tilde.Digest) FilterOption
- func FilterLimit(limit, offset int) FilterOption
- func FilterOrderBy(orderBy string) FilterOption
- func FilterOrderDir(orderDir string) FilterOption
- type FilterOptions
- type Store
- func (st *Store) Close() error
- func (st *Store) Filter(filterOptions ...FilterOption) (object.ReadCloser, error)
- func (st *Store) Get(hash tilde.Digest) (*object.Object, error)
- func (st *Store) GetByStream(streamRootHash tilde.Digest) (object.ReadCloser, error)
- func (st *Store) GetByType(objectType string) (object.ReadCloser, error)
- func (st *Store) GetKey(publicKeyDigest tilde.Digest) (*crypto.PrivateKey, error)
- func (st *Store) GetPinned() ([]tilde.Digest, error)
- func (st *Store) GetRelations(parent tilde.Digest) ([]tilde.Digest, error)
- func (st *Store) GetStreamLeaves(streamRootHash tilde.Digest) ([]tilde.Digest, error)
- func (st *Store) IsPinned(hash tilde.Digest) (bool, error)
- func (st *Store) ListHashes() ([]tilde.Digest, error)
- func (st *Store) ListenForUpdates() (updates <-chan Event, cancel func())
- func (st *Store) Pin(hash tilde.Digest) error
- func (st *Store) Put(obj *object.Object) error
- func (st *Store) PutKey(privateKey crypto.PrivateKey) error
- func (st *Store) PutWithTTL(obj *object.Object, ttl time.Duration) error
- func (st *Store) Remove(hash tilde.Digest) error
- func (st *Store) RemovePin(hash tilde.Digest) error
- func (st *Store) UpdateTTL(hash tilde.Digest, minutes int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶ added in v0.19.0
type Event struct { Action EventAction ObjectHash tilde.Digest }
type EventAction ¶ added in v0.19.0
type EventAction string
const ( ObjectInserted EventAction = "objectInserted" ObjectRemoved EventAction = "objectRemoved" ObjectPinned EventAction = "objectPinned" ObjectUnpinned EventAction = "objectUnpinned" )
type FilterOption ¶ added in v0.15.6
type FilterOption func(*FilterOptions)
FilterOptions
func FilterByHash ¶
func FilterByHash(hs ...tilde.Digest) FilterOption
func FilterByObjectType ¶
func FilterByObjectType(typePatterns ...string) FilterOption
func FilterByOwner ¶
func FilterByOwner(owners ...did.DID) FilterOption
func FilterByStreamHash ¶
func FilterByStreamHash(hs ...tilde.Digest) FilterOption
func FilterLimit ¶ added in v0.15.6
func FilterLimit(limit, offset int) FilterOption
func FilterOrderBy ¶ added in v0.15.6
func FilterOrderBy(orderBy string) FilterOption
func FilterOrderDir ¶ added in v0.15.6
func FilterOrderDir(orderDir string) FilterOption
type FilterOptions ¶ added in v0.15.6
type FilterOptions struct { // Filters are used to perform db queries for these filters // TODO find a better name for this Filters struct { ObjectHashes []tilde.Digest StreamHashes []tilde.Digest ContentTypes []string Owners []string OrderBy string OrderDir string Limit *int Offset *int } }
FilterOptions
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Filter ¶
func (st *Store) Filter( filterOptions ...FilterOption, ) (object.ReadCloser, error)
func (*Store) GetByStream ¶ added in v0.11.0
func (*Store) GetByType ¶ added in v0.11.0
func (st *Store) GetByType( objectType string, ) (object.ReadCloser, error)
func (*Store) GetRelations ¶
func (*Store) GetStreamLeaves ¶ added in v0.14.0
func (*Store) ListenForUpdates ¶ added in v0.19.0
func (*Store) PutKey ¶ added in v0.19.0
func (st *Store) PutKey( privateKey crypto.PrivateKey, ) error
func (*Store) PutWithTTL ¶ added in v0.14.0
Click to show internal directories.
Click to hide internal directories.