settings

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrDeleteSelf      = errors.New("cannot delete self")
	ErrAlreadyDeleted  = errors.New("the object is already deleted")
	ErrObjDoesNotExist = errors.New("the object does not exist")
	ErrCantDeleteSpace = errors.New("not able to delete space")
)
View Source
var (
	DoSnapshot = objecttree.DoSnapshot
)

Functions

func VerifyDeleteChange

func VerifyDeleteChange(raw *treechangeproto.RawTreeChangeWithId, identity crypto.PubKey, peerId string) (err error)

Types

type BuildTreeFunc

type BuildTreeFunc func(ctx context.Context, id string, listener updatelistener.UpdateListener) (t synctree.SyncTree, err error)

type Deleter

type Deleter interface {
	Delete()
}

type DeletionManager

type DeletionManager interface {
	UpdateState(ctx context.Context, state *settingsstate.State) (err error)
}

type Deps

type Deps struct {
	BuildFunc     BuildTreeFunc
	Account       accountservice.Service
	TreeManager   treemanager.TreeManager
	Store         spacestorage.SpaceStorage
	Configuration nodeconf.NodeConf
	DeletionState deletionstate.ObjectDeletionState
	Provider      SpaceIdsProvider
	OnSpaceDelete func()
	// contains filtered or unexported fields
}

type Settings added in v0.2.0

type Settings interface {
	DeleteTree(ctx context.Context, id string) (err error)
	SpaceDeleteRawChange(ctx context.Context) (raw *treechangeproto.RawTreeChangeWithId, err error)
	DeleteSpace(ctx context.Context, deleteChange *treechangeproto.RawTreeChangeWithId) (err error)
	SettingsObject() SettingsObject
	app.ComponentRunnable
}

func New added in v0.2.0

func New() Settings

type SettingsObject

type SettingsObject interface {
	synctree.SyncTree
	Init(ctx context.Context) (err error)
	DeleteObject(id string) (err error)
	DeleteSpace(ctx context.Context, raw *treechangeproto.RawTreeChangeWithId) (err error)
	SpaceDeleteRawChange() (raw *treechangeproto.RawTreeChangeWithId, err error)
}

func NewSettingsObject

func NewSettingsObject(deps Deps, spaceId string) (obj SettingsObject)

type SpaceIdsProvider

type SpaceIdsProvider interface {
	AllIds() []string
}

Directories

Path Synopsis
Package mock_settings is a generated GoMock package.
Package mock_settings is a generated GoMock package.
mock_settingsstate
Package mock_settingsstate is a generated GoMock package.
Package mock_settingsstate is a generated GoMock package.

Jump to

Keyboard shortcuts

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