configure

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configure

type Configure struct {
	Logger   logger.Options
	HTTP     HTTP
	Database Database
}

Configure global configure

func Single

func Single() *Configure

Single single Configure

func (*Configure) Format

func (c *Configure) Format(basePath string) (e error)

Format format global configure

func (*Configure) Load

func (c *Configure) Load(filename string) (e error)

Load load configure file

func (*Configure) String

func (c *Configure) String() string

type Database

type Database struct {
	// 數據源 位置
	Source string
}

Database 數據庫配置

func (*Database) Format

func (d *Database) Format(basePath string) (e error)

Format .

type HTTP

type HTTP struct {
	Addr string

	CertFile string
	KeyFile  string

	// cookie 過期時間
	Maxage time.Duration
	// cookie 密鑰
	Secret string
}

HTTP configure http

func (*HTTP) Format

func (c *HTTP) Format(basePath string) (e error)

Format .

func (*HTTP) Safe

func (c *HTTP) Safe() bool

Safe if tls return true

Jump to

Keyboard shortcuts

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