configs

package
v0.0.0-...-2e0bdef Latest Latest
Warning

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

Go to latest
Published: Mar 12, 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"`
	RecaptchaSecretKey string            `mapstructure:"recaptcha_secret_key"`
	APIUrl             string            `mapstructure:"api_url"`
	TelegramBot        TelegramBot       `mapstructure:"telegram_bot"`
	SwaggerPort        int               `mapstructure:"swagger_port"`
	TestMode           bool              `mapstructure:"test_mode"`
}

func InitConfig

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

type MongoDB

type MongoDB struct {
	Database string `mapstructure:"database"`
	Host     string `mapstructure:"host"`
	Port     string `mapstructure:"port"`
	Password string `mapstructure:"password"`
	Username string `mapstructure:"username"`
}

type PostgresDB

type PostgresDB struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Name     string `mapstructure:"name"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	SSLMode  string `mapstructure:"ssl_mode"`
}

type Server

type Server struct {
	Address    string     `mapstructure:"address,omitempty"`
	PostgresDB PostgresDB `mapstructure:"postgres_db"`
	MongoDB    MongoDB    `mapstructure:"mongo_db"`
}

type TelegramBot

type TelegramBot struct {
	Enable bool   `mapstructure:"enable"`
	Token  string `mapstructure:"token"`
}

Jump to

Keyboard shortcuts

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