config

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path string) error

Parse Config file

func ReadFile

func ReadFile(path string) ([]byte, error)

从本地文件或者http链接读取配置文件内容

Types

type ConfigOptions

type ConfigOptions struct {
	ServerUrl       []string `json:"server_url" yaml:"server_url"`
	Request         string   `json:"request" yaml:"request"`
	Domain          string   `json:"domain" yaml:"domain"`
	Port            string   `json:"port" yaml:"port"`
	SpeedTest       bool     `json:"speedtest" yaml:"speedtest"`
	Connection      int      `json:"connection" yaml:"connection"`
	Timeout         int      `json:"timeout" yaml:"timeout"`
	ShowRemoteSpeed bool     `json:"show_remote_speed" yaml:"show_remote_speed"`
	CronInterval    uint64   `json:"cron_interval" yaml:"cron_interval"`
}

ConfigOptions is a struct that represents config files

var Config ConfigOptions

Jump to

Keyboard shortcuts

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