config

package
v0.0.0-...-c015bec Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 1 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 {
	App struct {
		Name string `mapstructure:"name"`
		Cert string `mapstructure:"cert"`
		Key  string `mapstructure:"key"`
	} `mapstructure:"app"`

	Context struct {
		Timeout int `mapstructure:"timeout"`
	} `mapstructure:"context"`

	Jwt struct {
		AccessSigningKey  string `mapstructure:"access_signing_key"`
		AccessExpiration  int    `mapstructure:"access_expiration"`
		RefreshSigningKey string `mapstructure:"refresh_signing_key"`
		RefreshExpiration int    `mapstructure:"refresh_expiration"`
	} `mapstructure:"jwt"`

	Postgres struct {
		Dsn string `mapstructure:"dsn"`
	} `mapstructure:"postgres"`

	Kafka struct {
		Host string `mapstructure:"host"`
	} `mapstructure:"kafka"`

	Mongo struct {
		Dsn string `mapstructure:"dsn"`
	} `mapstructure:"mongo"`
}

func Load

func Load(service, env string) (Config, error)

Jump to

Keyboard shortcuts

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