setting

package
v0.0.0-...-7ed5fb6 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 4 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 {
	MaxPageSize     int
	DefaultPageSize int
	AllowDownload   bool
}

type DatabaseSettingS

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

type JWTSettingS

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

type ServerSettingS

type ServerSettingS struct {
	RunModel     string
	HttpPort     string
	ReadTimeOut  time.Duration
	WriteTimeOut time.Duration
	ProjectName  string
}

type Setting

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

func NewSetting

func NewSetting(paths ...string) (*Setting, error)

func (*Setting) ReadAllSection

func (s *Setting) ReadAllSection() error

func (*Setting) ReadSection

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

func (*Setting) WatchSettingChange

func (s *Setting) WatchSettingChange()

配置文件修改刷新配置项

Jump to

Keyboard shortcuts

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