exposure-notifications-server: github.com/google/exposure-notifications-server/internal/generate Index | Files

package generate

import "github.com/google/exposure-notifications-server/internal/generate"

Package generate contains HTTP handler for triggering data generation into the databae.

Index

Package Files

config.go handler.go

func NewHandler Uses

func NewHandler(ctx context.Context, config *Config, env *serverenv.ServerEnv) (http.Handler, error)

type Config Uses

type Config struct {
    Database              database.Config
    SecretManager         secrets.Config
    ObservabilityExporter observability.Config

    Port                         string        `env:"PORT, default=8080"`
    NumExposures                 int           `env:"NUM_EXPOSURES_GENERATED, default=10"`
    KeysPerExposure              int           `env:"KEYS_PER_EXPOSURE, default=14"`
    MaxKeysOnPublish             uint          `env:"MAX_KEYS_ON_PUBLISH, default=15"`
    MaxSameStartIntervalKeys     uint          `env:"MAX_SAME_START_INTERVAL_KEYS, default=2"`
    SimulateSameDayRelease       bool          `env:"SIMULATE_SAME_DAY_RELEASE, default=false"`
    MaxIntervalAge               time.Duration `env:"MAX_INTERVAL_AGE_ON_PUBLISH, default=360h"`
    MaxMagnitudeSymptomOnsetDays uint          `env:"MAX_SYMPTOM_ONSET_DAYS, default=21"`
    CreatedAtTruncateWindow      time.Duration `env:"TRUNCATE_WINDOW, default=1h"`
    DefaultRegion                string        `env:"DEFAULT_REGION, default=US"`
    ChanceOfKeyRevision          int           `env:"CHANCE_OF_KEY_REVISION, default=30"` // 0-100 are valid values.
    KeyRevisionDelay             time.Duration `env:"KEY_REVISION_DELAY, default=2h"`     // key revision will be forward dates this amount.
}

Config represents the configuration and associated environment variables for the publish components.

func (*Config) DatabaseConfig Uses

func (c *Config) DatabaseConfig() *database.Config

func (*Config) DebugReleaseSameDayKeys Uses

func (c *Config) DebugReleaseSameDayKeys() bool

func (*Config) MaxExposureKeys Uses

func (c *Config) MaxExposureKeys() uint

func (*Config) MaxIntervalStartAge Uses

func (c *Config) MaxIntervalStartAge() time.Duration

func (*Config) MaxSameDayKeys Uses

func (c *Config) MaxSameDayKeys() uint

func (*Config) MaxSymptomOnsetDays Uses

func (c *Config) MaxSymptomOnsetDays() uint

func (*Config) ObservabilityExporterConfig Uses

func (c *Config) ObservabilityExporterConfig() *observability.Config

func (*Config) SecretManagerConfig Uses

func (c *Config) SecretManagerConfig() *secrets.Config

func (*Config) TruncateWindow Uses

func (c *Config) TruncateWindow() time.Duration

Package generate imports 20 packages (graph). Updated 2020-09-27. Refresh now. Tools for package owners.