Documentation ¶
Overview ¶
Package export defines the handlers for managing exposure key exporting.
Package export contains OpenCensus metrics and views for export operations
Index ¶
- Variables
- func MarshalExportFile(eb *model.ExportBatch, exposures, revisedExposures []*publishmodel.Exposure, ...) ([]byte, error)
- func UnmarshalExportFile(zippedProtoPayload []byte) (*export.TemporaryExposureKeyExport, []byte, error)
- func UnmarshalSignatureFile(zippedProtoPayload []byte) (*export.TEKSignatureList, error)
- type Config
- func (c *Config) BlobstoreConfig() *storage.Config
- func (c *Config) DatabaseConfig() *database.Config
- func (c *Config) KeyManagerConfig() *keys.Config
- func (c *Config) ObservabilityExporterConfig() *observability.Config
- func (c *Config) RepressGeneration() int64
- func (c *Config) SecretManagerConfig() *secrets.Config
- type Server
- type Signer
Constants ¶
This section is empty.
Variables ¶
var ( ExportConfigIDTagKey = tag.MustNewKey("config_id") ExportRegionTagKey = tag.MustNewKey("region") ExportTravelersTagKey = tag.MustNewKey("includes_travelers") )
Functions ¶
func MarshalExportFile ¶
func MarshalExportFile(eb *model.ExportBatch, exposures, revisedExposures []*publishmodel.Exposure, fileNum int32, splitBatch bool, signers []*Signer) ([]byte, error)
MarshalExportFile converts the inputs into an encoded byte array.
func UnmarshalExportFile ¶
func UnmarshalExportFile(zippedProtoPayload []byte) (*export.TemporaryExposureKeyExport, []byte, error)
UnmarshalExportFile extracts the protobuf encoded exposure key present in the zip archived payload. Returns the parsed TemporaryExposureKeyExport protocol buffer message, the SHA256 digest of the signed content and/or an error if error. The digest is useful in validating the signature as it returns the deigest of the content that was signed when the archive was created.
func UnmarshalSignatureFile ¶ added in v0.8.0
func UnmarshalSignatureFile(zippedProtoPayload []byte) (*export.TEKSignatureList, error)
UnmarshalSignatureFile extracts the protobuf encode dsignatures.
Types ¶
type Config ¶
type Config struct { Database database.Config KeyManager keys.Config SecretManager secrets.Config Storage storage.Config ObservabilityExporter observability.Config Port string `env:"PORT, default=8080"` CreateTimeout time.Duration `env:"CREATE_BATCHES_TIMEOUT, default=5m"` WorkerTimeout time.Duration `env:"WORKER_TIMEOUT, default=5m"` MinRecords int `env:"EXPORT_FILE_MIN_RECORDS, default=1000"` PaddingRange int `env:"EXPORT_FILE_PADDING_RANGE, default=100"` MaxRecords int `env:"EXPORT_FILE_MAX_RECORDS, default=500000"` MaxInsertBatchSize int `env:"MAX_INSERT_BATCH_SIZE, default=100"` TruncateWindow time.Duration `env:"TRUNCATE_WINDOW, default=1h"` MinWindowAge time.Duration `env:"MIN_WINDOW_AGE, default=2h"` TTL time.Duration `env:"CLEANUP_TTL, default=336h"` // ReprocessCount needs to be incremented by one every time you go back and // regenerate previously exported files. ReprocessCount uint `env:"REPROCESS_COUNT, default=0"` }
Config represents the configuration and associated environment variables for the export components.
func (*Config) BlobstoreConfig ¶
func (*Config) DatabaseConfig ¶
func (*Config) KeyManagerConfig ¶
func (*Config) ObservabilityExporterConfig ¶
func (c *Config) ObservabilityExporterConfig() *observability.Config