setting

package
v0.0.0-...-c6f1323 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSettingS

type AppSettingS struct {
	DefaultPageSize         int
	MaxPageSize             int
	LogSavePath             string
	LogFileName             string
	LogFileExt              string
	UploadSavePath          string
	UploadServerUrl         string
	UploadImageMaxSize      int
	UploadImageAllowExts    []string
	UploadMarkdownAllowExts []string
	QrCodeSavePath          string
	PrefixUrl               string
}

应用配置

type DatabaseSettingS

type DatabaseSettingS struct {
	DBType       string
	UserName     string
	Password     string
	Host         string
	DBName       string
	TablePrefix  string
	Charset      string
	ParseTime    bool
	LogMode      string
	MaxIdleConns int
	MaxOpenConns int
}

数据库配置

type JwtSettingS

type JwtSettingS struct {
	Secret string        // 密钥
	Issuer string        // JWT的签发者
	Expire time.Duration // 所签发的 JWT 过期时间,过期时间必须大于签发时间。
}

JWT配置

type Pay

type Pay struct {
	AlipayPrivateKey string
	AlipayAppId      string
	AlipayPublicKey  string
}

支付配置

type Redis

type Redis struct {
	Host        string
	Password    string
	MaxIdle     int
	MaxActive   int
	IdleTimeout time.Duration
}

Redis配置

type ServerSettingS

type ServerSettingS struct {
	RunMode      string
	HttpPort     string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

服务器配置

type Setting

type Setting struct {
	// contains filtered or unexported fields
}

func NewSetting

func NewSetting() (*Setting, error)

func (*Setting) ReadSection

func (s *Setting) ReadSection(k string, v interface{}) error

解码key到struct

Jump to

Keyboard shortcuts

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