configs

package
v0.0.0-...-cfcd8fe Latest Latest
Warning

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

Go to latest
Published: May 8, 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"`
	RabbitMQ     RabbitMQ          `mapstructure:"rabbit_mq"`
}

func InitConfig

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

type MongoDB

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

type RabbitMQ

type RabbitMQ struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	Host     string `mapstructure:"host"`
	Vhost    string `mapstructure:"vhost"`
}

type Redis

type Redis struct {
	Address  string `mapstructure:"address"`
	Password string `mapstructure:"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