config

package
v0.0.0-...-804c168 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(configFile string) error

InitConfig

Types

type CasterConfig

type CasterConfig struct {
	Name       string `mapstructure:"name", json:"name"`
	Host       string `mapstructure:"host", json:"host"`
	Port       uint16 `mapstructure:"port", json:"port"`
	Username   string `mapstructure:"username", json:"username"`
	Password   string `mapstructure:"password", json:"password"`
	Mountpoint string `mapstructure:"mountpoint", json:"mountpoint"`
}

CasterConfig

type Config

type Config struct {
	Server  ServerConfig   `mapstructure:"server", json:"server"`
	Casters []CasterConfig `mapstructure:"casters", json:"casters"`
	Log     LogConfig      `mapstructure:"log", json:"log"`
}

Config

func GetConfig

func GetConfig() Config

GetConfig

type LogConfig

type LogConfig struct {
	Development bool   `mapstructure:"development"`
	Level       string `mapstructure:"level"`
	Filename    string `mapstructure:"filename"`
	MaxSize     int    `mapstructure:"maxSize"`
	MaxBackups  int    `mapstructure:"maxBackups"`
	MaxAge      int    `mapstructure:"maxAge"`
	Compress    bool   `mapstructure:"compress"`
}

LogConfig

type ServerConfig

type ServerConfig struct {
	Host string `mapstructure:"host", json:"host"`
	Port uint16 `mapstructure:"port", json:"port"`
}

ServerConfig

Jump to

Keyboard shortcuts

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