Documentation ¶
Index ¶
Constants ¶
View Source
const AddSpaceCtxKey ctxKey = 0
View Source
const CName = "common.commonspace"
View Source
const (
SpaceReserved = "any-sync.space"
)
Variables ¶
View Source
var ErrIncorrectIdentity = errors.New("incorrect identity")
Functions ¶
func NewSpaceId ¶
func ValidateSpaceHeader ¶
func ValidateSpaceHeader(rawHeaderWithId *spacesyncproto.RawSpaceHeaderWithId, identity crypto.PubKey) (err error)
Types ¶
type Space ¶
type Space interface { Id() string Init(ctx context.Context) error StoredIds() []string DebugAllHeads() []headsync.TreeHeads Description() (desc SpaceDescription, err error) TreeBuilder() objecttreebuilder.TreeBuilder SyncStatus() syncstatus.StatusUpdater Storage() spacestorage.SpaceStorage 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) HandleMessage(ctx context.Context, msg objectsync.HandleMessage) (err error) HandleSyncRequest(ctx context.Context, req *spacesyncproto.ObjectSyncMessage) (resp *spacesyncproto.ObjectSyncMessage, err error) HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error) TryClose(objectTTL time.Duration) (close bool, err error) Close() error }
type SpaceCreatePayload ¶
type SpaceCreatePayload struct { // SigningKey is the signing key of the owner SigningKey crypto.PrivKey // SpaceType is an arbitrary string SpaceType string // ReadKey is a first symmetric encryption key for a space ReadKey []byte // ReplicationKey is a key which is to be used to determine the node where the space should be held ReplicationKey uint64 // SpacePayload is an arbitrary payload related to space type SpacePayload []byte // MasterKey is the master key of the owner MasterKey crypto.PrivKey }
type SpaceDerivePayload ¶
type SpaceDescription ¶
type SpaceDescription struct { SpaceHeader *spacesyncproto.RawSpaceHeaderWithId AclId string AclPayload []byte SpaceSettingsId string SpaceSettingsPayload []byte }
type SpaceService ¶
type SpaceService interface { DeriveSpace(ctx context.Context, payload SpaceDerivePayload) (string, error) DeriveId(ctx context.Context, payload SpaceDerivePayload) (string, error) CreateSpace(ctx context.Context, payload SpaceCreatePayload) (string, error) NewSpace(ctx context.Context, id string) (sp Space, err error) app.Component }
func New ¶
func New() SpaceService
Directories ¶
Path | Synopsis |
---|---|
mock_credentialprovider
Package mock_credentialprovider is a generated GoMock package.
|
Package mock_credentialprovider is a generated GoMock package. |
mock_deletionstate
Package mock_deletionstate is a generated GoMock package.
|
Package mock_deletionstate is a generated GoMock package. |
mock_headsync
Package mock_headsync is a generated GoMock package.
|
Package mock_headsync 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/liststorage/mock_liststorage
Package mock_liststorage is a generated GoMock package.
|
Package mock_liststorage 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/updatelistener/mock_updatelistener
Package mock_updatelistener is a generated GoMock package.
|
Package mock_updatelistener is a generated GoMock package. |
tree/treestorage/mock_treestorage
Package mock_treestorage is a generated GoMock package.
|
Package mock_treestorage is a generated GoMock package. |
treemanager/mock_treemanager
Package mock_treemanager is a generated GoMock package.
|
Package mock_treemanager is a generated GoMock package. |
mock_objectsync
Package mock_objectsync is a generated GoMock package.
|
Package mock_objectsync 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. |
mock_settings
Package mock_settings is a generated GoMock package.
|
Package mock_settings 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. |
Click to show internal directories.
Click to hide internal directories.