package storage
import "github.com/google/monologue/storage"
Package storage provides the storage interfaces required by the various pieces of the CT monitor.
Index ¶
Types ¶
type APICallWriter ¶
type APICallWriter interface { WriteAPICall(ctx context.Context, l *ctlog.Log, apiCall *apicall.APICall) error }
APICallWriter is an interface for storing individual calls to CT API endpoints.
type RootSetID ¶
type RootSetID string
RootSetID uniquely identifies a specific set of certificates, regardless of their order.
type RootsReader ¶
type RootsReader interface { // WatchRoots monitors storage for get-roots responses and communicates their content to the caller. // A unique, deterministic identifier is generated for any set of root certificates (a RootSetID); // this will be sent over the channel and can be used to lookup further information about that set. // WatchRoots will immediately send the latest RootSetID when it is first called. WatchRoots(ctx context.Context, l *ctlog.Log) (<-chan RootSetID, error) // ReadRoots returns the root certificates that make up a particular RootSet, // i.e. the set of certificates returned by a CT get-roots call. ReadRoots(ctx context.Context, rootSet RootSetID) ([]*x509.Certificate, error) }
RootsReader is an interface for reading root certificates retrieved from an earlier CT get-roots call.
type RootsWriter ¶
type RootsWriter interface { // WriteRoots stores the fact that the given roots were received from a particular CT Log at the specified time. // It will remove any duplicate certificates from roots before storing them. WriteRoots(ctx context.Context, l *ctlog.Log, roots []*x509.Certificate, receivedAt time.Time) error }
RootsWriter is an interface for storing root certificates retrieved from a CT get-roots call.
type STHWriter ¶
type STHWriter interface { WriteSTH(ctx context.Context, l *ctlog.Log, sth *ct.SignedTreeHead, receivedAt time.Time, errs []error) error }
STHWriter is an interface for storing STHs received from a CT Log.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
storage/mysql | Package mysql provides a MySQL based implementation of Monologue storage. |
storage/mysql/testdb | testdb contains helper functions for testing mysql storage |
storage/print | Package print provides a concrete implementation of the storage interfaces needed by the CT monitor, which simply prints everything that is passed to it to be 'stored'. |
storage/testonly | Package testonly contains fakes for use in tests that interact with storage. |
- Version
- v0.0.0-20230315160450-1dc62842925e (latest)
- Published
- Mar 15, 2023
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 2 weeks ago –
Tools for package owners.