config

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig added in v1.0.1

func LoadConfig()

func SaveConfig added in v1.0.1

func SaveConfig() error

Types

type Config

type Config struct {
	LogLevel  string    `toml:"log_level" mapstructure:"log_level"`
	EnableApi bool      `toml:"enable_api" mapstructure:"enable_api"`
	ApiPort   int64     `toml:"api_port" mapstructure:"api_port"`
	Servers   []*Server `toml:"servers" mapstructure:"servers"`
}
var Conf Config

type Server

type Server struct {
	DisplayName string `toml:"display_name" mapstructure:"display_name"`
	Ip          string `toml:"ip" mapstructure:"ip"`
	Port        int64  `toml:"port" mapstructure:"port"`
	Interval    int64  `toml:"interval" mapstructure:"interval"`
	Remark      string `toml:"remark" mapstructure:"remark"`
}

Jump to

Keyboard shortcuts

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