gcp

package
v0.0.0-...-400a50a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

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

func GetFetcher

func GetFetcher(ctx context.Context, bucket string) (func(ctx context.Context, path string) ([]byte, error), error)

GetFetcher returns a GCS read function for objects in a given bucket.

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

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

func (s *IssuersStorage) AddIssuersIfNotExist(ctx context.Context, kv []sctfe.KV) error

AddIssuers stores Issuers values under their Key if there isn't an object under Key already.

Jump to

Keyboard shortcuts

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