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 when MySQL 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.
Version
v1.2.1
Published
May 30, 2024
Platform
windows/amd64
Imports
5 packages
Last checked
42 minutes ago

Tools for package owners.