statestorage

package
v0.6.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 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) (StateStorage, error)

func New

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

Jump to

Keyboard shortcuts

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