statestorage

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observer

type Observer interface {
	OnHashChange(oldHash, newHash string)
}

type State

type State struct {
	OldHash     string
	NewHash     string
	AclId       string
	SettingsId  string
	SpaceId     string
	SpaceHeader []byte
}

type StateStorage

type StateStorage interface {
	GetState(ctx context.Context) (State, error)
	SettingsId() string
	SetHash(ctx context.Context, oldHash, newHash string) error
	SetObserver(observer Observer)
}

func Create

func Create(ctx context.Context, state State, store anystore.DB) (st StateStorage, err error)

func CreateTx added in v0.6.3

func CreateTx(ctx context.Context, state State, store anystore.DB) (StateStorage, error)

func New

func New(ctx context.Context, spaceId string, store anystore.DB) (StateStorage, error)

Directories

Path Synopsis
Package mock_statestorage is a generated GoMock package.
Package mock_statestorage is a generated GoMock package.

Jump to

Keyboard shortcuts

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