Documentation
¶
Index ¶
- Constants
- Variables
- func AliasCommand() *cobra.Command
- func CompletionCommand() *cobra.Command
- func GetFileBytes(path string) ([]byte, error)
- func GetFileString(path string) (string, error)
- func GetFirstArg(args []string) (string, error)
- func LoadConfig() (err error)
- func Output(s string) error
- func TableOutput(data []map[int]string, header_footer ...[]string) string
- func TableOutputV2(datas [][]*simpletable.Cell, header_footer ...[]*simpletable.Cell) string
- func TemplateConfig() (data []byte, err error)
- func VersionCommand(name, version, buildID string) *cobra.Command
- type Config
- type DNSConfig
- type JWTConfig
- type MailConfig
- type MySQLConfig
- type QQConfig
- type QiniuConfig
- type RedisConfig
- type ServerConfig
- type WeChatConfig
Constants ¶
View Source
const ( Author = "陌竹" Email = "mozhu233@outlook.com" )
View Source
const CONFIG_FILE = "config.yaml"
Variables ¶
View Source
var ( DebugMode bool = false Mode string = "dev" )
View Source
var (
// ConfigName -
ConfigName = "config.yaml"
)
Functions ¶
func AliasCommand ¶
func CompletionCommand ¶
func GetFileBytes ¶
func GetFileString ¶
func TableOutput ¶
TableOutput func(data []map[int]string, header,footer []string)
func TableOutputV2 ¶
func TableOutputV2(datas [][]*simpletable.Cell, header_footer ...[]*simpletable.Cell) string
func TemplateConfig ¶
TemplateConfig show config template
func VersionCommand ¶
Types ¶
type Config ¶
type Config struct {
MySQL MySQLConfig `yaml:"mysql"`
Redis RedisConfig `yaml:"redis"`
Server ServerConfig `yaml:"server"`
DNS DNSConfig `yaml:"dns"`
Jwt JWTConfig `yaml:"jwt"`
WeChat WeChatConfig `yaml:"wechat"`
Qiniu QiniuConfig `yaml:"qiniu"`
QQ QQConfig `yaml:"qq"`
Mail MailConfig `yaml:"mail"`
}
var Conf Config
type MailConfig ¶
type MySQLConfig ¶
type QiniuConfig ¶
type RedisConfig ¶
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.