package storage

import "github.com/google/certificate-transparency-go/trillian/ctfe/storage"

Package storage defines the IssuanceChainStorage type, which allows different storage implementation for the key-value pairs of issuance chains.

Index

Types

type IssuanceChainStorage

type IssuanceChainStorage interface {
	// FindByKey returns the issuance chain associated with the provided key.
	FindByKey(ctx context.Context, key []byte) ([]byte, error)

	// Add inserts the key-value pair of issuance chain.
	Add(ctx context.Context, key []byte, chain []byte) error
}

IssuanceChainStorage is an interface which allows CTFE binaries to use different storage implementations for issuance chains.

func NewIssuanceChainStorage

func NewIssuanceChainStorage(ctx context.Context, backend configpb.LogConfig_IssuanceChainStorageBackend, dbConn string) (IssuanceChainStorage, error)

NewIssuanceChainStorage returns nil for Trillian gRPC, or mysql.IssuanceChainStorage or postgresql.IssuanceChainStorage when mysql or postgres is the prefix in database connection string.

Source Files

storage.go

Directories

PathSynopsis
trillian/ctfe/storage/mysqlPackage mysql defines the IssuanceChainStorage type, which implements IssuanceChainStorage interface with FindByKey and Add methods.
trillian/ctfe/storage/postgresqlPackage postgresql defines the IssuanceChainStorage type, which implements IssuanceChainStorage interface with FindByKey and Add methods.
Version
v1.3.1 (latest)
Published
Jan 15, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
4 days ago

Tools for package owners.