config

package
v0.0.0-...-7d51d8f Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const FileName = "configs/config.toml"

FileName где лежит.

Variables

This section is empty.

Functions

func GetGatewayAddress

func GetGatewayAddress() (result string)

func GetServerAddress

func GetServerAddress() (result string)

func Load

func Load() (err error)

Load from file

Types

type Config

type Config struct {
	Server  ServerCfg  `toml:"server"`
	Gateway GatewayCfg `toml:"gateway"`
	Storage StorageCfg `toml:"storage"`
}

func Get

func Get() *Config

type GatewayCfg

type GatewayCfg struct {
	Host string `toml:"host"`
	Port string `toml:"port"`
}

type ServerCfg

type ServerCfg struct {
	Host string `toml:"host"`
	Port string `toml:"port"`
}

type StorageCfg

type StorageCfg struct {
	Path    string `toml:"path"`
	Timeout string `toml:"timeout"`
}

Jump to

Keyboard shortcuts

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