config

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessageAction added in v1.44.0

func GetMessageAction() string

Types

type Config

type Config struct {
	BindAddr                   string         `envconfig:"BIND_ADDR"`
	GracefulShutdownTimeout    time.Duration  `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	HealthCheckInterval        time.Duration  `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthCheckCriticalTimeout time.Duration  `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	AWSRegion                  string         `envconfig:"AWS_REGION"`
	AWSCognitoUserPoolID       string         `envconfig:"AWS_COGNITO_USER_POOL_ID" json:"-"`
	AWSCognitoClientId         string         `envconfig:"AWS_COGNITO_CLIENT_ID" json:"-"`
	AWSCognitoClientSecret     string         `envconfig:"AWS_COGNITO_CLIENT_SECRET" json:"-"`
	AWSAuthFlow                string         `envconfig:"AWS_AUTH_FLOW"`
	AllowedEmailDomains        []string       `envconfig:"ALLOWED_EMAIL_DOMAINS"`
	MessageAction              string         `envconfig:"MESSAGE_ACTION"`
	HTTPWriteTimeout           *time.Duration `envconfig:"HTTP_WRITE_TIMEOUT"`

	AuthorisationConfig *authorisation.Config
}

Config represents service configuration for dp-identity-api

func Get

func Get() (*Config, error)

Get returns the default config with any modifications through environment variables

func (Config) String added in v1.4.0

func (config Config) String() string

String is implemented to prevent sensitive fields being logged. The config is returned as JSON with sensitive fields omitted.

Jump to

Keyboard shortcuts

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