pub enum StoreChange {
Show 20 variants
CreateStore {
store: StoreId,
name: String,
admin: MemberPublicKeys,
access: MemberAccess,
key: KeyId,
key_hash: [u8; 32],
device_name: String,
},
RenameStore {
name: String,
},
AdmitMember {
member: MemberId,
keys: MemberPublicKeys,
role: MemberRole,
access: MemberAccess,
device: DeviceId,
device_name: String,
},
RecoverMember {
member: MemberId,
expected: MemberPublicKeys,
keys: MemberPublicKeys,
access: Option<MemberAccess>,
device: DeviceId,
device_name: String,
},
SetAccess {
member: MemberId,
access: MemberAccess,
},
RemoveMember {
member: MemberId,
},
ChangeRole {
member: MemberId,
role: MemberRole,
},
AddDevice {
name: String,
replaces: Option<DeviceId>,
},
RemoveDevice {
device: DeviceId,
},
CreateCircle {
circle: CircleId,
name: String,
breaking_version: u32,
key: KeyId,
key_hash: [u8; 32],
},
RenameCircle {
circle: CircleId,
name: String,
},
DeleteCircle {
circle: CircleId,
},
AddCircleMember {
circle: CircleId,
member: MemberId,
},
RemoveCircleMember {
circle: CircleId,
member: MemberId,
},
RotateKey {
audience: Audience,
key: KeyId,
key_hash: [u8; 32],
},
RaiseSchema {
version: u32,
announcement: Slot,
},
Reset {
announcement: Slot,
},
ReplaceMemberKeys {
member: MemberId,
expected: MemberPublicKeys,
keys: MemberPublicKeys,
},
AddInviteShare {
invite: InviteId,
account: String,
},
EndInviteShare {
invite: InviteId,
},
}Expand description
Every admin operation listed in §10, including store creation.
Variants§
CreateStore
Create a store, name its first admin and register the writing device.
The entry’s author is the first admin’s stable id; admin supplies
that member’s initial pair, which verifies this entry (D6).
Fields
admin: MemberPublicKeysThe first admin’s initial public pair.
access: MemberAccessThe owner’s provider account or public S3 key id.
RenameStore
Set the store name, as an admin in the preceding state (§10).
AdmitMember
Admit a joining person: add their stable id with both public keys, their initial role and access, and register the device their request names. Only an admission slot holds it, beside the member’s key copies (§13.2, D9).
Fields
keys: MemberPublicKeysThe member’s initial public pair.
role: MemberRoleThe initial role.
access: MemberAccessStorage access granted by the inviting owner.
RecoverMember
Recover an active member on a new device: rebind their pair, as replace-member-keys does, set their access when the invite carried a new S3 key, and register the device their request names. Only an admission slot holds it (§13.2, D9).
Fields
expected: MemberPublicKeysThe binding which must still be current before this slot.
keys: MemberPublicKeysThe member’s new public pair.
access: Option<MemberAccess>The member’s new storage access, as set-access records it: the
S3 key the recovery invite carries. None keeps their access.
SetAccess
Record a member’s current storage access, used by a later removal (§10): the author’s own, or an admin’s replacement S3 key for another member.
Fields
access: MemberAccessThe provider account, or the S3 key id and its principal; no credentials.
RemoveMember
Remove a member and delete circles left empty (§14.1).
ChangeRole
Set a member’s role.
AddDevice
Register the writing install for the entry’s author: an install registers only itself (§10.2).
Fields
RemoveDevice
Remove a device’s access.
CreateCircle
Make a circle with its creator as its first member.
Fields
RenameCircle
Rename a circle without changing its members, keys or rows.
DeleteCircle
Delete a circle (§15.9).
AddCircleMember
Add a store member to a circle (§15.5).
RemoveCircleMember
Remove a circle member, deleting the circle if left empty (§15.8).
RotateKey
Introduce a key without changing audience membership (§12.1).
Fields
RaiseSchema
Raise an audience’s app schema version with its replacement snapshot (§18.3).
Fields
Reset
Reset the store’s or a circle’s rows to a snapshot (§19.4).
ReplaceMemberKeys
Replace an active member’s public pair, keeping their id, role, access, circles and devices (§10). It carries no audience keys.
Fields
expected: MemberPublicKeysThe binding which must still be current before this slot.
keys: MemberPublicKeysThe member’s new public pair.
Record that the writing device’s invite shares the store with a provider account (§13.2, §14.2). Claimed before the grant, so the owner’s other devices know of the share and take it back once the invite ends or its device is gone for good.
End the share the writing device recorded for its invite (§13.2).
Implementations§
Trait Implementations§
Source§impl Clone for StoreChange
impl Clone for StoreChange
Source§fn clone(&self) -> StoreChange
fn clone(&self) -> StoreChange
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more