config

package
v0.0.0-...-20ebf41 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT 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 {
	AuthenticationService struct {
		Environment string `mapstructure:"environment"`
		LogLevel    string `mapstructure:"log_level"`
		PrivateKey  string `mapstructure:"private_key"`
		PublicKey   string `mapstructure:"public_key"`
		Claims      struct {
			Issuer                      string        `mapstructure:"issuer"`
			AccessTokenExpiration       time.Duration `mapstructure:"access_token_expiration"`
			AnonymousExpiration         time.Duration `mapstructure:"anonymous_expiration"`
			ShortRefreshTokenExpiration time.Duration `mapstructure:"short_refresh_token_expiration"`
			LongRefreshTokenExpiration  time.Duration `mapstructure:"long_refresh_token_expiration"`
		} `mapstructure:"claims"`
		Server struct {
			Port         string        `mapstructure:"port"`
			ReadTimeout  time.Duration `mapstructure:"read_timeout"`
			WriteTimeout time.Duration `mapstructure:"write_timeout"`
			IdleTimeout  time.Duration `mapstructure:"idle_timeout"`
		} `mapstructure:"server"`
	} `mapstructure:"authentication_service"`
	UserService struct {
		Endpoint string        `mapstructure:"endpoint"`
		Timeout  time.Duration `mapstructure:"timeout"`
	} `mapstructure:"user_service"`
	Redis struct {
		Addr string `mapstructure:"addr"`
	} `mapstructure:"redis"`
}

Config contains the application configuration parameters.

func New

func New(env string) (*Config, error)

New returns a new instance of Config.

Jump to

Keyboard shortcuts

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