storage

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Directories

Path Synopsis
Package mysql defines the IssuanceChainStorage type, which implements IssuanceChainStorage interface with FindByKey and Add methods.
Package mysql defines the IssuanceChainStorage type, which implements IssuanceChainStorage interface with FindByKey and Add methods.
Package postgresql defines the IssuanceChainStorage type, which implements IssuanceChainStorage interface with FindByKey and Add methods.
Package postgresql defines the IssuanceChainStorage type, which implements IssuanceChainStorage interface with FindByKey and Add methods.

Jump to

Keyboard shortcuts

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