events

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(database *storage.DB, authority *identity.Authority) (*Store, error)

func (*Store) Append

func (store *Store) Append(ctx context.Context, event model.EventEnvelope) (bool, error)

func (*Store) Replay

func (store *Store) Replay(ctx context.Context, after time.Time, limit int) ([]model.EventEnvelope, error)

func (*Store) ReplayFrom

func (store *Store) ReplayFrom(ctx context.Context, cursor storage.ProjectionCursor, limit int) ([]model.EventEnvelope, error)

func (*Store) Subscribe

func (store *Store) Subscribe(buffer int) (<-chan model.EventEnvelope, func())

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL