storage

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RootsPrefix                = "roots/"
	DefaultAwaiterPollInterval = 200 * time.Millisecond
)

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

DedupFuture returns the SCT input matching a future.

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

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

type CTStorageOptions

type CTStorageOptions struct {
	Appender            *tessera.Appender
	Reader              tessera.LogReader
	IssuerStorage       IssuerStorage
	AwaiterPollInterval time.Duration
	EnablePubAwaiter    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 {
	AddIfNotExist(ctx context.Context, kv []KV) error
}

IssuerStorage issuer certificates under their hex encoded sha256.

type KV

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

type RootsStorage added in v0.1.2

type RootsStorage interface {
	AddIfNotExist(ctx context.Context, kv []KV) error
	LoadAll(ctx context.Context) ([]KV, error)
}

RootsStorage stores root certificates under their hex encoded sha256.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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