spacestorage

package
v0.6.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.commonspace.spacestorage"

Variables

View Source
var (
	ErrSpaceStorageExists   = errors.New("space storage exists")
	ErrSpaceStorageMissing  = errors.New("space storage missing")
	ErrIncorrectSpaceHeader = errors.New("incorrect space header")

	ErrTreeStorageAlreadyDeleted = errors.New("tree storage already deleted")
)

Functions

This section is empty.

Types

type SpaceStorage

type SpaceStorage interface {
	app.ComponentRunnable
	Id() string
	HeadStorage() headstorage.HeadStorage
	StateStorage() statestorage.StateStorage
	AclStorage() (list.Storage, error)
	TreeStorage(ctx context.Context, id string) (objecttree.Storage, error)
	CreateTreeStorage(ctx context.Context, payload treestorage.TreeStorageCreatePayload) (objecttree.Storage, error)
	AnyStore() anystore.DB
}

func Create added in v0.6.0

func Create(ctx context.Context, store anystore.DB, payload SpaceStorageCreatePayload) (SpaceStorage, error)

func New added in v0.6.0

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

type SpaceStorageCreatePayload

type SpaceStorageCreatePayload struct {
	AclWithId           *consensusproto.RawRecordWithId
	SpaceHeaderWithId   *spacesyncproto.RawSpaceHeaderWithId
	SpaceSettingsWithId *treechangeproto.RawTreeChangeWithId
}

type SpaceStorageProvider

type SpaceStorageProvider interface {
	app.Component
	WaitSpaceStorage(ctx context.Context, id string) (SpaceStorage, error)
	SpaceExists(id string) bool
	CreateSpaceStorage(ctx context.Context, payload SpaceStorageCreatePayload) (SpaceStorage, error)
}

Directories

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

Jump to

Keyboard shortcuts

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