config

package
v0.0.0-...-4069d2e Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DevelopEnv    = "development"
	ProductEnv    = "production"
	OldProductEnv = "product"
)

Variables

View Source
var NoDbDriver = errors.New("no db driver for this server")

Functions

This section is empty.

Types

type Basic

type Basic struct {
	WwwRoot         string `yaml:"www_root"`
	Port            int    `yaml:"port"`
	ReadT0          int    `yaml:"read_timeout"`
	WriteT0         int    `yaml:"write_timeout"`
	PublicDir       string `yaml:"public_dir"`
	UploadsDir      string `yaml:"uploads_dir"`
	IgnoreUrlCase   bool   `yaml:"ignore_url_case"`
	HashSecret      string `yaml:"secret"`
	Env             string `yaml:"env"`
	DbEngine        string `yaml:"db_engine"`
	Version         string `yaml:"version"`
	HttpsEnable     bool   `yaml:"https"`
	HttpsCertFile   string `yaml:"https_certfile"`
	HttpsKey        string `yaml:"https_key"`
	DefaultType     string `yaml:"default_type"`
	EnableKeepAlive bool   `yaml:"keep_alive"`
}

func (*Basic) UnmarshalYAML

func (s *Basic) UnmarshalYAML(value *yaml.Node) (err error)

type Cache

type Cache struct {
	Enable bool `yaml:"enable"`
	Amount int  `yaml:"amount"`
}

func (*Cache) UnmarshalYAML

func (s *Cache) UnmarshalYAML(value *yaml.Node) (err error)

type Db

type Db struct {
	Host       string `yaml:"host"`
	User       string `yaml:"user"`
	Pwd        string `yaml:"password"`
	Name       string `yaml:"name"`
	Port       int    `yaml:"port"`
	TO         int    `yaml:"connect_timeout"`
	KaInterval int    `yaml:"ka_interval"`
	Prefix     string `yaml:"prefix"`
}

func (*Db) New

func (d *Db) New(engine string) (db *xorm.Engine, err error)

func (*Db) UnmarshalYAML

func (s *Db) UnmarshalYAML(value *yaml.Node) (err error)

type Log

type Log struct {
	File string `yaml:"file"`
}

Jump to

Keyboard shortcuts

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