config

package
v0.0.0-...-e31961d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFile

func ParseFile(configFile string, dest interface{}, envFiles ...string) error

ParseFile for parsing config file and return DefaultConfig struct

func Print

func Print(v interface{})

Print configuration in json schema all config with tag=protected:1 will be hidden from the print

Types

type DefaultConfig

type DefaultConfig struct {
	Servers   DefaultServers `json:"servers" yaml:"servers" toml:"servers"`
	Log       DefaultLog     `json:"log" yaml:"log" toml:"log"`
	Resources kothak.Config  `json:"resources" yaml:"resources" toml:"resources"`
}

DefaultConfig for the project

type DefaultLog

type DefaultLog struct {
	Level string `json:"level" yaml:"level" toml:"level"`
	File  string `json:"file" yaml:"file" toml:"file"`
	Color bool   `json:"use_color" yaml:"use_color" toml:"use_color"`
}

DefaultLog config for the project

type DefaultServers

type DefaultServers struct {
	Main  ServerConfig `json:"main" yaml:"main" toml:"main"`
	Debug ServerConfig `json:"debug" yaml:"debug" toml:"debug"`
	Admin ServerConfig `json:"admin" yaml:"admin" toml:"admin"`
}

DefaultServers struct

type ServerConfig

type ServerConfig struct {
	Address string `yaml:"address" toml:"address"`
}

ServerConfig struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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