config

package
v0.0.0-...-e75800c Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfiguration

func LoadConfiguration()

Types

type AppConfig

type AppConfig struct {
	ListenAddr string `mapstructure:"listen_addr" json:"listen_addr"`
}

type AwsConfig

type AwsConfig struct {
	Region            string `mapstructure:"region" json:"region"`
	Profile           string `mapstructure:"profile" json:"profile"`
	S3AccessKeyId     string `mapstructure:"s3_access_key_id" json:"s3_access_key_id"`
	S3AccessSecretKey string `mapstructure:"s3_access_secret_key" json:"s3_access_secret_key"`
}

type Configuration

type Configuration struct {
	Debug     bool            `json:"debug"`
	Env       string          `json:"env"`
	Aws       AwsConfig       `json:"aws"`
	Db        DbConf          `json:"db"`
	Redis     RedisConf       `json:"redis"`
	App       AppConfig       `json:"app"`
	Websocket WebsocketConfig `json:"websocket"`
	Security  SecurityConfig  `json:"security"`
	Icons     IconsConfig     `json:"icons"`
}
var Config Configuration

func (*Configuration) IsTestingEnv

func (c *Configuration) IsTestingEnv() bool

type DbConf

type DbConf struct {
	Host     string `mapstructure:"mysql_host" json:"host"`
	Port     int    `mapstructure:"mysql_port" json:"port"`
	Username string `mapstructure:"mysql_username" json:"username"`
	Password string `mapstructure:"mysql_password" json:"password"`
	Database string `mapstructure:"mysql_database" json:"database"`
}

type IconsConfig

type IconsConfig struct {
	AwsProfile        string `mapstructure:"aws_profile" json:"aws_profile"`
	S3Bucket          string `mapstructure:"s3_bucket" json:"s3_bucket"`
	S3AccessKeyId     string `mapstructure:"s3_access_key_id" json:"s3_access_key_id"`
	S3AccessSecretKey string `mapstructure:"s3_access_secret_key" json:"s3_access_secret_key"`
}

type RedisConf

type RedisConf struct {
	ServiceUrl           string `mapstructure:"service_url" json:"service_url"`
	Port                 int    `mapstructure:"port" json:"port"`
	PersistentConnection bool   `mapstructure:"persistent_connection" json:"persistent_connection"`
}

type SecurityConfig

type SecurityConfig struct {
	RateLimitIP     int `mapstructure:"rate_limit_ip" json:"rate_limit_ip"`
	RateLimitMobile int `mapstructure:"rate_limit_mobile" json:"rate_limit_mobile"`
	RateLimitBE     int `mapstructure:"rate_limit_be" json:"rate_limit_be"`
}

type WebsocketConfig

type WebsocketConfig struct {
	ListenAddr string `mapstructure:"listen_addr" json:"listen_addr"`
	ApiUrl     string `mapstructure:"url" json:"api_url"`
}

Jump to

Keyboard shortcuts

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