Documentation ¶
Overview ¶
Package setup provides common logic for configuring the various services.
Index ¶
- func Setup(ctx context.Context, config interface{}) (*serverenv.ServerEnv, error)
- func SetupWith(ctx context.Context, config interface{}, l envconfig.Lookuper) (*serverenv.ServerEnv, error)
- type AuthorizedAppConfigProvider
- type BlobstoreConfigProvider
- type DatabaseConfigProvider
- type KeyManagerConfigProvider
- type ObservabilityExporterConfigProvider
- type SecretManagerConfigProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupWith ¶
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.
Types ¶
type AuthorizedAppConfigProvider ¶
type AuthorizedAppConfigProvider interface {
AuthorizedAppConfig() *authorizedapp.Config
}
AuthorizedAppConfigProvider signals that the config provided knows how to configure authorized apps.
type BlobstoreConfigProvider ¶
BlobstoreConfigProvider provides the information about current storage configuration.
type DatabaseConfigProvider ¶
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 ¶
KeyManagerConfigProvider is a marker interface indicating the key manager should be installed.
type ObservabilityExporterConfigProvider ¶
type ObservabilityExporterConfigProvider interface {
ObservabilityExporterConfig() *observability.Config
}
ObservabilityExporterConfigProvider signals that the config knows how to configure an observability exporter.
type SecretManagerConfigProvider ¶
SecretManagerConfigProvider signals that the config knows how to configure a secret manager.