base

package
v0.0.0-...-2a34ce9 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StrToInt

func StrToInt(s string, def ...int) int

func StrToInt64

func StrToInt64(s string, def ...int64) int64

func TryMkdir

func TryMkdir(path string) bool

Types

type LocalTime

type LocalTime time.Time

func (*LocalTime) MarshalJSON

func (t *LocalTime) MarshalJSON() ([]byte, error)

func (*LocalTime) Scan

func (t *LocalTime) Scan(v interface{}) error

func (LocalTime) Value

func (t LocalTime) Value() (driver.Value, error)

type ServerConf

type ServerConf struct {
	SigningKey string
	EncryptKey string
	Host       string
	Port       int
	IPv6       bool
	CertFile   string
	KeyFile    string

	// 用户主目录
	WwwRoot    string
	WwwUser    string
	WwwGroup   string
	WwwUserId  int
	WwwGroupId int

	ZapMode string

	WebServer string
}

func (*ServerConf) GetUserHomeDir

func (s *ServerConf) GetUserHomeDir(username string) string

type ZapInfo

type ZapInfo struct {
	Version        string
	BuildDate      string
	BuildShortDate string
}

type ZapMap

type ZapMap map[string]any

func (ZapMap) Get

func (z ZapMap) Get(key string) (any, bool)

func (ZapMap) GetAny

func (z ZapMap) GetAny(key string) any

func (ZapMap) GetBool

func (z ZapMap) GetBool(key string) bool

func (ZapMap) GetFloat64

func (z ZapMap) GetFloat64(key string) float64

func (ZapMap) GetInt

func (z ZapMap) GetInt(key string) int

func (ZapMap) GetInt64

func (z ZapMap) GetInt64(key string) int64

func (ZapMap) GetString

func (z ZapMap) GetString(key string, def ...string) string

func (ZapMap) GetZapMap

func (z ZapMap) GetZapMap(key string) ZapMap

func (ZapMap) Len

func (z ZapMap) Len() int

func (ZapMap) Set

func (z ZapMap) Set(key string, value any)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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