configuration

package
v0.0.0-...-c53e812 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HTTPConfig     HTTPConfig
	PrivateKeyPath string `envconfig:"PRIVATE_KEY_PATH" default:"tests/partner/fakekey.pem"`
	// PublicKeyLocation can be used to specify a file or a URL.
	// To specify a file: "file://./tests/stone/fakekey1.pub.jwt"
	// To specify a URL: "url://https://sandbox-api.openbank.stone.com.br/api/v1/discovery/keys"
	PublicKeyLocation string `envconfig:"PUBLIC_KEY_PATH" default:"url://https://sandbox-api.openbank.stone.com.br/api/v1/discovery/keys"`
	// NotifierList has stdout and proxy availables.
	NotifierList string `envconfig:"NOTIFIER_LIST" default:"stdout"`
}

Config defines the service configuration

func LoadConfig

func LoadConfig() (*Config, error)

func (Config) String

func (cfg Config) String() string

type HTTPConfig

type HTTPConfig struct {
	Port            int           `envconfig:"API_PORT" default:"3000"`
	ShutdownTimeout time.Duration `envconfig:"API_SHUTDOWN_TIMEOUT" default:"5s"`
}

Jump to

Keyboard shortcuts

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