Documentation
¶
Index ¶
- Constants
- Variables
- func Hash(body []byte) string
- func Proof(domain string, value any) []byte
- func Root(publicKey string) (string, error)
- func Sign(key ed25519.PrivateKey, proof []byte) string
- func SnapshotKey(e Envelope) string
- func ValidID(id string) bool
- func ValidRoot(id string) bool
- func Verify(publicKey string, proof []byte, signature string) bool
- type Ack
- type Binding
- type Delivery
- type Envelope
- type Info
- type Page
- type Peer
- type Profile
- type Roster
- type Upload
Constants ¶
View Source
const MaxBatch = 100
View Source
const MaxCiphertext = 64 << 10
View Source
const Version = 1
Variables ¶
View Source
var ErrConflict = errors.New("replication cursor or event conflict")
View Source
var ErrInvalid = errors.New("invalid replication message")
Functions ¶
func SnapshotKey ¶
Types ¶
type Ack ¶
type Envelope ¶
type Envelope struct {
Version int `json:"version"`
EventID string `json:"event_id"`
SourceRoot string `json:"source_root"`
StreamID string `json:"stream_id"`
Sequence int64 `json:"source_sequence"`
AggregateID string `json:"aggregate_id"`
AggregateVersion int64 `json:"aggregate_version"`
Authority string `json:"authority"`
AuthorityRoot string `json:"authority_root"`
Kind string `json:"kind"`
PeerRoot string `json:"peer_root,omitempty"`
Recipients []string `json:"recipients"`
SigningKey string `json:"signing_key"`
Ciphertext []byte `json:"ciphertext,omitempty"`
ServerPayload json.RawMessage `json:"server_payload,omitempty"`
Signature string `json:"signature"`
}
Routing is public; file names and recipient receipts remain in Ciphertext. Client packets describe history and never grant cloud-object access.
type Info ¶
type Page ¶
type Page struct {
Root string `json:"consumer_root"`
Epoch string `json:"epoch"`
After int64 `json:"after"`
Through int64 `json:"through"`
Upper int64 `json:"upper"`
Items []Delivery `json:"items"`
More bool `json:"more"`
Snapshot bool `json:"snapshot,omitempty"`
NextKey string `json:"next_key,omitempty"`
Signature string `json:"signature"`
}
type Peer ¶
type Profile ¶
Click to show internal directories.
Click to hide internal directories.