conf

package
v0.0.0-...-fa3ab40 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Global = &Config{
	Log: Log{
		DisableTimestamp: false,
		Level:            "info",
		Format:           "text",
		MaxSize:          20,
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	System System `json:"system" toml:"system"`
	Log    Log    `json:"log" toml:"log"`
	Server Server `json:"server" toml:"server"`
}

func (*Config) Load

func (c *Config) Load(path string, override func(cfg *Config)) error

func (*Config) String

func (cg *Config) String() string

type Log

type Log struct {
	DisableTimestamp bool   `json:"disable-timestamp" toml:"disable-timestamp"`
	Level            string `json:"level" toml:"level"`
	Format           string `json:"format" toml:"format"`
	MaxSize          int    `json:"maxsize" toml:"maxsize"`
}

type Server

type Server struct {
	Host string `json:"host" toml:"host"`
	Port int    `json:"port" toml:"port"`
}

type System

type System struct {
	FileDir string `json:"file-dir" toml:"file-dir"`
}

Jump to

Keyboard shortcuts

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