commonspace

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const AddSpaceCtxKey ctxKey = 0
View Source
const CName = "common.commonspace"

Variables

This section is empty.

Functions

func NewSpaceId

func NewSpaceId(id string, repKey uint64) string

Types

type Deps added in v0.3.2

type Deps struct {
	SyncStatus     syncstatus.StatusUpdater
	TreeSyncer     treesyncer.TreeSyncer
	AccountService accountservice.Service

	Indexer keyvaluestorage.Indexer
	// contains filtered or unexported fields
}

type Space

type Space interface {
	Id() string
	Init(ctx context.Context) error
	Acl() syncacl.SyncAcl

	StoredIds() []string
	DebugAllHeads() []headsync.TreeHeads
	Description(ctx context.Context) (desc SpaceDescription, err error)

	TreeBuilder() objecttreebuilder.TreeBuilder
	TreeSyncer() treesyncer.TreeSyncer
	AclClient() aclclient.AclSpaceClient
	SyncStatus() syncstatus.StatusUpdater
	Storage() spacestorage.SpaceStorage
	KeyValue() kvinterfaces.KeyValueService

	DeleteTree(ctx context.Context, id string) (err error)
	GetNodePeers(ctx context.Context) (peer []peer.Peer, err error)

	HandleStreamSyncRequest(ctx context.Context, req *spacesyncproto.ObjectSyncMessage, stream drpc.Stream) (err error)
	HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error)
	HandleMessage(ctx context.Context, msg *objectmessages.HeadUpdate) (err error)

	TryClose(objectTTL time.Duration) (close bool, err error)
	Close() error
}

type SpaceDescription

type SpaceDescription struct {
	SpaceHeader          *spacesyncproto.RawSpaceHeaderWithId
	AclId                string
	AclPayload           []byte
	SpaceSettingsId      string
	SpaceSettingsPayload []byte
	AclRecords           []*spacesyncproto.AclRecord
}

type SpaceService

type SpaceService interface {
	DeriveSpace(ctx context.Context, payload spacepayloads.SpaceDerivePayload) (string, error)
	DeriveId(ctx context.Context, payload spacepayloads.SpaceDerivePayload) (string, error)
	CreateSpace(ctx context.Context, payload spacepayloads.SpaceCreatePayload) (string, error)
	DeriveOneToOneSpace(ctx context.Context, aSk crypto.PrivKey, bPk crypto.PubKey) (id string, err error)
	NewSpace(ctx context.Context, id string, deps Deps) (sp Space, err error)
	app.Component
}

func New

func New() SpaceService

Directories

Path Synopsis
acl
aclclient/mock_aclclient
Package mock_aclclient is a generated GoMock package.
Package mock_aclclient is a generated GoMock package.
mock_credentialprovider
Package mock_credentialprovider is a generated GoMock package.
Package mock_credentialprovider is a generated GoMock package.
mock_deletionmanager
Package mock_deletionmanager is a generated GoMock package.
Package mock_deletionmanager is a generated GoMock package.
mock_deletionstate
Package mock_deletionstate is a generated GoMock package.
Package mock_deletionstate is a generated GoMock package.
headstorage/mock_headstorage
Package mock_headstorage is a generated GoMock package.
Package mock_headstorage is a generated GoMock package.
mock_headsync
Package mock_headsync is a generated GoMock package.
Package mock_headsync is a generated GoMock package.
statestorage/mock_statestorage
Package mock_statestorage is a generated GoMock package.
Package mock_statestorage is a generated GoMock package.
Package mock_commonspace is a generated GoMock package.
Package mock_commonspace is a generated GoMock package.
object
acl/list/mock_list
Package mock_list is a generated GoMock package.
Package mock_list is a generated GoMock package.
acl/syncacl/mock_syncacl
Package mock_syncacl is a generated GoMock package.
Package mock_syncacl is a generated GoMock package.
keyvalue/keyvaluestorage/mock_keyvaluestorage
Package mock_keyvaluestorage is a generated GoMock package.
Package mock_keyvaluestorage is a generated GoMock package.
keyvalue/kvinterfaces/mock_kvinterfaces
Package mock_kvinterfaces is a generated GoMock package.
Package mock_kvinterfaces is a generated GoMock package.
tree/objecttree/mock_objecttree
Package mock_objecttree is a generated GoMock package.
Package mock_objecttree is a generated GoMock package.
tree/synctree/mock_synctree
Package mock_synctree is a generated GoMock package.
Package mock_synctree is a generated GoMock package.
tree/synctree/response/mock_response
Package mock_response is a generated GoMock package.
Package mock_response is a generated GoMock package.
tree/synctree/updatelistener/mock_updatelistener
Package mock_updatelistener is a generated GoMock package.
Package mock_updatelistener is a generated GoMock package.
treemanager/mock_treemanager
Package mock_treemanager is a generated GoMock package.
Package mock_treemanager is a generated GoMock package.
treesyncer/mock_treesyncer
Package mock_treesyncer is a generated GoMock package.
Package mock_treesyncer is a generated GoMock package.
mock_objectmanager
Package mock_objectmanager is a generated GoMock package.
Package mock_objectmanager is a generated GoMock package.
mock_objecttreebuilder
Package mock_objecttreebuilder is a generated GoMock package.
Package mock_objecttreebuilder is a generated GoMock package.
mock_peermanager
Package mock_peermanager is a generated GoMock package.
Package mock_peermanager is a generated GoMock package.
settingsstate/mock_settingsstate
Package mock_settingsstate is a generated GoMock package.
Package mock_settingsstate is a generated GoMock package.
mock_spacestorage
Package mock_spacestorage is a generated GoMock package.
Package mock_spacestorage is a generated GoMock package.
mock_spacesyncproto
Package mock_spacesyncproto is a generated GoMock package.
Package mock_spacesyncproto is a generated GoMock package.
syncdeps/mock_syncdeps
Package mock_syncdeps is a generated GoMock package.
Package mock_syncdeps is a generated GoMock package.
mock_syncstatus
Package mock_syncstatus is a generated GoMock package.
Package mock_syncstatus is a generated GoMock package.

Jump to

Keyboard shortcuts

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