storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CTStorage

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

CTStorage implements ct.Storage and tessera.LogReader.

func NewCTStorage

func NewCTStorage(ctx context.Context, opts *CTStorageOptions) (*CTStorage, error)

NewCTStorage instantiates a CTStorage object.

func (*CTStorage) Add

func (cts *CTStorage) Add(ctx context.Context, entry *ctonly.Entry) (tessera.IndexFuture, error)

Add stores CT entries.

func (*CTStorage) AddIssuerChain

func (cts *CTStorage) AddIssuerChain(ctx context.Context, chain []*x509.Certificate) error

AddIssuerChain stores every chain certificate under its sha256.

If an object is already stored under this hash, continues.

func (*CTStorage) DedupFuture added in v0.1.1

func (cts *CTStorage) DedupFuture(ctx context.Context, f tessera.IndexFuture) (uint64, error)

DedupFuture returns the timestamp matching a future.

It waits for the entry matching the future to be integrated, fetches it and extracts the timestamp from it.

TODO(phbnf): cache timestamps (or more) to avoid reparsing the entire leaf bundle

type CTStorageOptions

type CTStorageOptions struct {
	Appender      *tessera.Appender
	Reader        tessera.LogReader
	IssuerStorage IssuerStorage
	EnableAwaiter bool
}

type CreateStorage

type CreateStorage func(context.Context, note.Signer) (*CTStorage, error)

CreateStorage instantiates a Tessera storage implementation with a signer option.

type IssuerStorage

type IssuerStorage interface {
	AddIssuersIfNotExist(ctx context.Context, kv []KV) error
}

IssuerStorage issuer certificates under their hex encoded sha256.

type KV

type KV struct {
	K []byte
	V []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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