statestorage

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 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(hash string)
}

type State

type State struct {
	Hash        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, hash 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
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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