Documentation ¶
Index ¶
Constants ¶
View Source
const ( SpaceStatusCreated = iota SpaceStatusDeletionPending SpaceStatusDeletionStarted SpaceStatusDeleted )
View Source
const CName = "coordinator.spacestatus"
Variables ¶
View Source
var (
ErrStatusExists = errors.New("space status exists")
)
Functions ¶
This section is empty.
Types ¶
type AccountDeletion ¶ added in v0.3.3
type AccountDeletion struct { DeletionPayload []byte DeletionPayloadId string AccountInfo }
type AccountInfo ¶ added in v0.3.3
type ChangeVerifier ¶
type ChangeVerifier interface {
Verify(change StatusChange) (err error)
}
type SpaceDeleter ¶
type SpaceDeleter interface { Run(spaces *mongo.Collection, delSender Deleter) Close() }
type SpaceDeletion ¶ added in v0.3.3
type SpaceStatus ¶
type SpaceStatus interface { NewStatus(ctx context.Context, spaceId string, identity, oldIdentity crypto.PubKey, spaceType SpaceType, force bool) (err error) // ChangeStatus is deprecated, use only for backwards compatibility ChangeStatus(ctx context.Context, change StatusChange) (entry StatusEntry, err error) SpaceDelete(ctx context.Context, payload SpaceDeletion) (toBeDeleted int64, err error) AccountDelete(ctx context.Context, payload AccountDeletion) (toBeDeleted int64, err error) AccountRevertDeletion(ctx context.Context, payload AccountInfo) (err error) Status(ctx context.Context, spaceId string, pubKey crypto.PubKey) (entry StatusEntry, err error) app.ComponentRunnable }
func New ¶
func New() SpaceStatus
type StatusChange ¶
type StatusChange struct { DeletionPayloadType coordinatorproto.DeletionPayloadType DeletionPayload []byte DeletionPayloadId string Identity crypto.PubKey // DeletionTimestamp is ignored when setting in ChangeStatus DeletionTimestamp int64 // ToBeDeletedTimestamp is ignored when setting in ChangeStatus ToBeDeletedTimestamp int64 Status int PeerId string SpaceId string NetworkId string }
type StatusEntry ¶
type StatusEntry struct { SpaceId string `bson:"_id"` Identity string `bson:"identity"` OldIdentity string `bson:"oldIdentity"` DeletionPayloadType int `bson:"deletionPayloadType"` DeletionPayload []byte `bson:"deletionPayload"` DeletionTimestamp int64 `bson:"deletionTimestamp"` ToBeDeletedTimestamp int64 `bson:"toBeDeletedTimestamp"` Status int `bson:"status"` Type SpaceType `bson:"type"` }
Click to show internal directories.
Click to hide internal directories.