Documentation ¶
Overview ¶
Package gcp allows the SCTFE to interact with GCS to:
- store issuers
- read log entries
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DedupStorage ¶
type DedupStorage struct {
// contains filtered or unexported fields
}
DedupStorage is a GCP Spanner based dedup storage implementation for SCTFE.
func NewDedupeStorage ¶
func NewDedupeStorage(ctx context.Context, spannerDB string) (*DedupStorage, error)
NewDedupeStorage returns a struct which can be used to store identity -> index mappings backed by Spanner.
Note that updates to this dedup storage is logically entriely separate from any updates happening to the log storage.
func (*DedupStorage) Add ¶
func (d *DedupStorage) Add(ctx context.Context, entries []dedup.LeafDedupInfo) error
Add stores associations between the passed-in identities and their indices.
func (*DedupStorage) Get ¶
func (d *DedupStorage) Get(ctx context.Context, i []byte) (dedup.SCTDedupInfo, bool, error)
Get looks up the stored index, if any, for the given identity.
type IssuersStorage ¶
type IssuersStorage struct {
// contains filtered or unexported fields
}
IssuersStorage is a key value store backed by GCS on GCP to store issuer chains.
func NewIssuerStorage ¶
func NewIssuerStorage(ctx context.Context, projectID string, bucket string, prefix string, contentType string) (*IssuersStorage, error)
NewIssuerStorage creates a new GCSStorage.
The specified bucket must exist or an error will be returned.
func (*IssuersStorage) AddIssuersIfNotExist ¶
AddIssuers stores Issuers values under their Key if there isn't an object under Key already.