Documentation
¶
Index ¶
- Constants
- func CanonicalSourceEnvelope(event model.EventEnvelope) ([]byte, error)
- func Sign(event *model.EventEnvelope, privateKey ed25519.PrivateKey) error
- func SignAt(event *model.EventEnvelope, keyID string, privateKey ed25519.PrivateKey, ...) error
- func VerifySource(event model.EventEnvelope, publicKey ed25519.PublicKey) error
- type Store
- func (store *Store) Append(ctx context.Context, event model.EventEnvelope) (bool, error)
- func (store *Store) Replay(ctx context.Context, after time.Time, limit int) ([]model.EventEnvelope, error)
- func (store *Store) ReplayFrom(ctx context.Context, cursor storage.ProjectionCursor, limit int) ([]model.EventEnvelope, error)
- func (store *Store) Subscribe(buffer int) (<-chan model.EventEnvelope, func())
Constants ¶
View Source
const APIProjection = "event-api"
APIProjection is the durable retention gate for events accepted by the canonical Core ingestion/API store. It advances only after the committed event can be read back from SQLite.
Variables ¶
This section is empty.
Functions ¶
func CanonicalSourceEnvelope ¶
func CanonicalSourceEnvelope(event model.EventEnvelope) ([]byte, error)
CanonicalSourceEnvelope returns the deterministic source-submitted envelope. Core-assigned received_at is cleared while the source signature is retained.
func Sign ¶
func Sign(event *model.EventEnvelope, privateKey ed25519.PrivateKey) error
func SignAt ¶
func SignAt(event *model.EventEnvelope, keyID string, privateKey ed25519.PrivateKey, signedAt time.Time) error
SignAt exists so agents can produce reproducible vectors without weakening the production API's timestamping behavior.
func VerifySource ¶
func VerifySource(event model.EventEnvelope, publicKey ed25519.PublicKey) error
Types ¶
Click to show internal directories.
Click to hide internal directories.