storage

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CertifierTableBlobstore is the service-wide blobstore table for certifier data
	CertifierTableBlobstore = "certificate_info_blobstore"

	// CertInfoType is the type of CertInfo used in blobstore type fields.
	CertInfoType = "certificate_info"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertifierStorage

type CertifierStorage interface {
	// ListSerialNumbers returns all tracked serial numbers.
	ListSerialNumbers() ([]string, error)

	// GetCertInfo returns the certificate info associated with the serial number.
	// If not found, returns ErrNotFound from "github.com/go-magma/magma/lib/go/errors.
	GetCertInfo(serialNumber string) (*protos.CertificateInfo, error)

	// GetManyCertInfo maps the passed serial numbers to their associated certificate info.
	GetManyCertInfo(serialNumbers []string) (map[string]*protos.CertificateInfo, error)

	// GetAllCertInfo returns a map of all serial numbers to their associated certificate info.
	GetAllCertInfo() (map[string]*protos.CertificateInfo, error)

	// PutCertInfo associates certificate info with the passed serial number.
	PutCertInfo(serialNumber string, certInfo *protos.CertificateInfo) error

	// DeleteCertInfo removes the serial number and its certificate info.
	// Returns success even when nothing is deleted (i.e. serial number not found).
	DeleteCertInfo(serialNumber string) error
}

CertifierStorage provides storage functionality for mapping serial numbers to certificate information.

func NewCertifierBlobstore

func NewCertifierBlobstore(factory blobstore.BlobStorageFactory) CertifierStorage

NewCertifierBlobstore returns an initialized instance of certifierBlobstore as CertifierStorage.

Jump to

Keyboard shortcuts

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