config

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

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigTypeJson = "json"
	ConfigTypeXml  = "xml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppNode

type AppNode struct {
	Version     string
	Domain      string
	RunMode     string
	EnablePProf bool
	PProfPort   int
	LogPath     string
	EnableLog   bool
}

type Config

type Config struct {
	App      *AppNode
	Server   *ServerNode
	Template *TemplateNode
	Jwt      *JwtNode
}

func InitConfig

func InitConfig(configFile string, configType string) (config *Config, err error)

func New

func New() *Config

type JwtNode

type JwtNode struct {
	Domain       string
	Expire       int64
	Name         string
	EnableJwt    bool
	CookieMaxAge int64
	SignKey      string
}

type ServerNode

type ServerNode struct {
	EnableListDir           bool
	EnableDetailRequestData bool
	EnableAutoHEAD          bool
	EnableIgnoreFavicon     bool
}

type TemplateNode

type TemplateNode struct {
	TplDir string
	TplExt string
}

Jump to

Keyboard shortcuts

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