package
Version:
v1.3.1
Opens a new window with list of versions in this module.
Published: Apr 11, 2021
License: GPL-3.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
ProviderSet is a provider set for wire
New serve caller to create a viper.Viper
type APP struct {
Name string `json:"name" yaml:"name"`
ClientID string `json:"client_id" yaml:"clientID"`
}
APP declare information of application
type Config struct {
APP *APP `json:"app" yaml:"app"`
HTTP *HTTP `json:"http" yaml:"http"`
DB *DB `json:"db" yaml:"db"`
Log *Log `json:"log" yaml:"log"`
}
Config declare configuration for application
NewConfig serve caller to create a Config with config file path
type DB struct {
URL string `json:"url" yaml:"url"`
Debug bool `json:"debug" yaml:"debug"`
}
DB declare database configuration
type HTTP struct {
Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"`
Mode string `json:"mode" yaml:"mode"`
}
HTTP declare http configuration
GetAddress serve caller to get combine host and port, format is `host:port`
type Log struct {
Format string `json:"format" yaml:"format"`
Level string `json:"level" yaml:"level"`
}
Log declare log configuration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.