config

package
v0.0.0-...-fe60696 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	rest.RestConf
	Auth  JWT   `json:"Auth" yaml:"Auth"`
	Zap   Zap   `json:"Zap" yaml:"Zap"`
	Redis Redis `json:"Redis" yaml:"Redis"`
	Mongo Mongo `json:"Mongo" yaml:"Mongo"`
}

type JWT

type JWT struct {
	AccessSecret string `json:"AccessSecret" yaml:"AccessSecret"` // 签名
	AccessExpire int64  `json:"AccessExpire" yaml:"AccessExpire"` // 过期时间
}

type Mongo

type Mongo struct {
	Addr string `json:"Addr" yaml:"Addr"`
}

type Redis

type Redis struct {
	DB       int    `json:"DB" yaml:"DB"`             // redis的哪个数据库
	Addr     string `json:"Addr" yaml:"Addr"`         // 服务器地址:端口
	Password string `json:"Password" yaml:"Password"` // 密码
}

type Zap

type Zap struct {
	Level         string `json:"level" yaml:"level"`                   // 级别
	Format        string `json:"format" yaml:"format"`                 // 输出
	Prefix        string `json:"prefix" yaml:"prefix"`                 // 日志前缀
	Director      string `json:"director" yaml:"director"`             // 日志文件夹
	ShowLine      bool   `json:"showLine" yaml:"showLine"`             // 显示行
	EncodeLevel   string `json:"encode-level" yaml:"encode-level"`     // 编码级
	StacktraceKey string `json:"stacktrace-key" yaml:"stacktrace-key"` // 栈名
	LogInConsole  bool   `json:"log-in-console" yaml:"log-in-console"` // 输出控制台
}

Jump to

Keyboard shortcuts

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