state

package
v0.0.0-...-c030021 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	*domain.StateBase
}

State implements the domain objectstore state.

func NewState

func NewState(factory coredatabase.TxnRunnerFactory) *State

NewState returns a new State instance.

func (*State) GetMetadata

func (s *State) GetMetadata(ctx context.Context, path string) (coreobjectstore.Metadata, error)

GetMetadata returns the persistence metadata for the specified path.

func (*State) GetMetadataBySHA256

func (s *State) GetMetadataBySHA256(ctx context.Context, sha256 string) (coreobjectstore.Metadata, error)

GetMetadataBySHA256 returns the persistence metadata for the object with SHA256 starting with the provided prefix.

func (*State) GetMetadataBySHA256Prefix

func (s *State) GetMetadataBySHA256Prefix(ctx context.Context, sha256 string) (coreobjectstore.Metadata, error)

GetMetadataBySHA256Prefix returns the persistence metadata for the object with SHA256 starting with the provided prefix.

func (*State) InitialWatchStatement

func (s *State) InitialWatchStatement() (string, string)

InitialWatchStatement returns the initial watch statement for the persistence path.

func (*State) ListMetadata

func (s *State) ListMetadata(ctx context.Context) ([]coreobjectstore.Metadata, error)

ListMetadata returns the persistence metadata.

func (*State) PutMetadata

func (s *State) PutMetadata(ctx context.Context, metadata coreobjectstore.Metadata) (coreobjectstore.UUID, error)

PutMetadata adds a new specified path for the persistence metadata.

func (*State) RemoveMetadata

func (s *State) RemoveMetadata(ctx context.Context, path string) error

RemoveMetadata removes the specified key for the persistence path.

Jump to

Keyboard shortcuts

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