configs

package
v0.0.0-...-b3f0c1d Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthMiddlewareContextKey = "claims"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Env                     Env           `mapstructure:"env"`
	Debug                   bool          `mapstructure:"debug"`
	GracefulShutdownTimeout time.Duration `mapstructure:"graceful_shutdown_timeout"`
}

type Config

type Config struct {
	Application Application        `mapstructure:"application"`
	HTTPServer  HTTPServer         `mapstructure:"http_server"`
	Logger      logger.Config      `mapstructure:"logger"`
	Mysql       mysql.Config       `mapstructure:"mysql"`
	Redis       redis.Config       `mapstructure:"redis"`
	Auth        authservice.Config `mapstructure:"auth"`
}

func Load

func Load(env Env) *Config

type Env

type Env string
const (
	Development Env = "development"
	Production  Env = "production"
)

type HTTPServer

type HTTPServer struct {
	Port    string        `mapstructure:"port"`
	Timeout time.Duration `mapstructure:"timeout"`
}

Jump to

Keyboard shortcuts

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