configs

package
v0.0.0-...-94c8c1a Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 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 {
	Servers      map[string]Server `mapstructure:"servers"`
	JWTSecretKey string            `mapstructure:"jwt_secret_key"`
	APIUrl       string            `mapstructure:"api_url"`
	SwaggerPort  int               `mapstructure:"swagger_port"`
	TestMode     bool              `mapstructure:"test_mode"`
	MongoDB      MongoDB           `mapstructure:"mongodb"`
	Redis        Redis             `mapstructure:"redis"`
}

func InitConfig

func InitConfig(file string) (*Config, error)

type MongoDB

type MongoDB struct {
	Database string `mapstructure:"database"`
	URI      string `mapstructure:"uri"`
}

type Redis

type Redis struct {
	Address  string `json:"address"`
	Password string `json:"password"`
}

type Server

type Server struct {
	Address string `mapstructure:"address,omitempty"`
}

Jump to

Keyboard shortcuts

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