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

package setup

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

Package setup provides common logic for configuring the various services.


Package Files


func Setup Uses

func Setup(ctx context.Context, config interface{}) (*serverenv.ServerEnv, error)

Setup runs common initialization code for all servers. See SetupWith.

func SetupWith Uses

func SetupWith(ctx context.Context, config interface{}, l envconfig.Lookuper) (*serverenv.ServerEnv, error)

SetupWith processes the given configuration using envconfig. It is responsible for establishing database connections, resolving secrets, and accessing app configs. The provided interface must implement the various interfaces.

type AuthorizedAppConfigProvider Uses

type AuthorizedAppConfigProvider interface {
    AuthorizedAppConfig() *authorizedapp.Config

AuthorizedAppConfigProvider signals that the config provided knows how to configure authorized apps.

type BlobstoreConfigProvider Uses

type BlobstoreConfigProvider interface {
    BlobstoreConfig() *storage.Config

BlobstoreConfigProvider provides the information about current storage configuration.

type DatabaseConfigProvider Uses

type DatabaseConfigProvider interface {
    DatabaseConfig() *database.Config

DatabaseConfigProvider ensures that the environment config can provide a DB config. All binaries in this application connect to the database via the same method.

type KeyManagerConfigProvider Uses

type KeyManagerConfigProvider interface {
    KeyManagerConfig() *keys.Config

KeyManagerConfigProvider is a marker interface indicating the key manager should be installed.

type ObservabilityExporterConfigProvider Uses

type ObservabilityExporterConfigProvider interface {
    ObservabilityExporterConfig() *observability.Config

ObservabilityExporterConfigProvider signals that the config knows how to configure an observability exporter.

type SecretManagerConfigProvider Uses

type SecretManagerConfigProvider interface {
    SecretManagerConfig() *secrets.Config

SecretManagerConfigProvider signals that the config knows how to configure a secret manager.

Package setup imports 12 packages (graph) and is imported by 8 packages. Updated 2020-09-27. Refresh now. Tools for package owners.