sqlite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package sqlite stores canonical facts, events and receipts in one transaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch = ports.Batch

type Receipt

type Receipt = ports.Receipt

type Store

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

func Open

func Open(path string) (*Store, error)

func (*Store) Begin

func (s *Store) Begin(ctx context.Context, write bool) (ports.Transaction, error)

func (*Store) Close

func (s *Store) Close() error

type Tx

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

func (*Tx) AppendBatch

func (t *Tx) AppendBatch(b domain.CommitBatch, taskID string) error

func (*Tx) Audit

func (t *Tx) Audit(at, action string) error

func (*Tx) Batches

func (t *Tx) Batches(after int64, limit int) ([]Batch, error)

func (*Tx) Commit

func (t *Tx) Commit() error

func (*Tx) Meta

func (t *Tx) Meta(key string) (string, error)

func (*Tx) PutReceipt

func (t *Tx) PutReceipt(r Receipt) error

func (*Tx) PutRecord

func (t *Tx) PutRecord(r domain.Record) error

func (*Tx) PutTask

func (t *Tx) PutTask(task domain.Task, previous int64) error

func (*Tx) PutTokenHash

func (t *Tx) PutTokenHash(id, hash string) error

func (*Tx) Receipt

func (t *Tx) Receipt(principal, key string) (*Receipt, error)

func (*Tx) Record

func (t *Tx) Record(kind, id string) (*domain.Record, error)

func (*Tx) Records

func (t *Tx) Records(taskID string) ([]domain.Record, error)

func (*Tx) Rollback

func (t *Tx) Rollback()

func (*Tx) SetMeta

func (t *Tx) SetMeta(key, value string) error

func (*Tx) Task

func (t *Tx) Task(id string) (*domain.Task, error)

func (*Tx) Tasks

func (t *Tx) Tasks() ([]domain.Task, error)

func (*Tx) TokenHash

func (t *Tx) TokenHash(id string) (string, error)

func (*Tx) Watermark

func (t *Tx) Watermark() (int64, error)

Jump to

Keyboard shortcuts

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