setting

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliossSettingS

type AliossSettingS struct {
	AliossAccessKeyID     string
	AliossAccessKeySecret string
	AliossEndpoint        string
	AliossBucket          string
	AliossDomain          string
}

type AppSettingS

type AppSettingS struct {
	BarkToken             string
	MaxCommentCount       int64
	AttachmentIncomeRate  float64
	DefaultContextTimeout time.Duration
	DefaultPageSize       int
	MaxPageSize           int
	IsShastaTestnet       bool
	TronApiKeys           []string
	SmsJuheKey            string
	SmsJuheTplID          string
	SmsJuheTplVal         string
	AlipayAppID           string
	AlipayPrivateKey      string
}

type DatabaseSettingS

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

type JWTSettingS

type JWTSettingS struct {
	Secret string
	Issuer string
	Expire time.Duration
}

type LogType

type LogType string
const LogFileType LogType = "file"
const LogZincType LogType = "zinc"

type LoggerSettingS

type LoggerSettingS struct {
	LogType         LogType
	LogFileSavePath string
	LogFileName     string
	LogFileExt      string
	LogZincHost     string
	LogZincIndex    string
	LogZincUser     string
	LogZincPassword string
}

type RedisSettingS

type RedisSettingS struct {
	Host     string
	Password string
	DB       int
}

type RuntimeSettingS

type RuntimeSettingS struct {
	DisablePhoneVerify bool
}

type SearchSettingS

type SearchSettingS struct {
	ZincHost     string
	ZincIndex    string
	ZincUser     string
	ZincPassword string
}

type ServerSettingS

type ServerSettingS struct {
	RunMode      string
	HttpIp       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

Jump to

Keyboard shortcuts

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