setting

package
v0.0.0-...-8960dd1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSetting

type AppSetting struct {
	DefaultPageSize int
	MaxPageSize     int
}

type DatabaseSetting

type DatabaseSetting struct {
	DBType       string
	UserName     string
	Password     string
	Host         string
	DBName       string
	TablePrefix  string
	Charset      string
	ParseTime    bool
	MaxIdleConns int
	MaxOpenConns int
	MaxLifetime  time.Duration
}

type LogSetting

type LogSetting struct {
	LogSavePath  string
	LogFileName  string
	LogFileExt   string
	LogMaxSize   int
	LogMaxAge    int
	LogLocalTime bool
}

type ServerSetting

type ServerSetting struct {
	RunMode        string
	HttpPort       string
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	MaxHeaderBytes int
}

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 any) error

Jump to

Keyboard shortcuts

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