Versions in this module Expand all Collapse all v0 v0.1.1 Dec 31, 2025 Changes in this version + type TxStore interface + WithTx func(ctx context.Context, fn func(Store) error) error v0.1.0 Dec 28, 2025 Changes in this version + var ErrNotFound = errors.New("record not found") + func GenerateKeys(name string) (string, string, error) + type Option func(*SumDB) + func WithHTTPClient(c *http.Client) Option + func WithStore(s Store) Option + func WithUpstream(u *url.URL) Option + type Record struct + Data []byte + ID int64 + Path string + Version string + type Store interface + AddRecord func(ctx context.Context, r *Record) (int64, error) + ReadHashes func(ctx context.Context, indexes []int64) ([]tlog.Hash, error) + RecordID func(ctx context.Context, path, version string) (int64, error) + Records func(ctx context.Context, id, n int64) ([]*Record, error) + SetTreeSize func(ctx context.Context, size int64) error + TreeSize func(ctx context.Context) (int64, error) + WriteHashes func(ctx context.Context, indexes []int64, hashes []tlog.Hash) error + type SumDB struct + func New(name string, skey string, opts ...Option) (*SumDB, error) + func (s *SumDB) Handler() http.Handler + func (s *SumDB) Lookup(ctx context.Context, mod module.Version) (int64, error) + func (s *SumDB) ReadRecords(ctx context.Context, id, n int64) ([][]byte, error) + func (s *SumDB) ReadTileData(ctx context.Context, t tlog.Tile) ([]byte, error) + func (s *SumDB) Signed(ctx context.Context) ([]byte, error)