configure

package
v1.0.31 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: GPL-3.0 Imports: 9 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 {
	HTTP   HTTP
	System System
	Cookie Cookie
	Logger logger.Options
	// contains filtered or unexported fields
}

Configure global configure

func Single

func Single() *Configure

Single single Configure

func (*Configure) BasePath

func (c *Configure) BasePath() string

BasePath .

func (*Configure) Format

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

Format format global configure

func (*Configure) Load

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

Load load configure file

func (*Configure) String

func (c *Configure) String() string
type Cookie struct {
	Filename string
	MaxAge   time.Duration
}

Cookie configure cookie

func (*Cookie) Format

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

Format .

type HTTP

type HTTP struct {
	Addr string

	CertFile string
	KeyFile  string

	MaxBytesReader int64
}

HTTP configure http

func (*HTTP) Format

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

Format .

func (*HTTP) TLS

func (c *HTTP) TLS() bool

TLS if tls return true

type Mount

type Mount struct {
	// 網頁上 顯示的 目錄名稱
	Name string
	// 要映射的本地路徑
	Root string

	// 設置目錄可讀 有讀取/寫入權限的用戶 可以 讀取檔案
	Read bool

	// 設置目錄可寫 有寫入權限的用戶可以 寫入檔案
	// 如果 Write 爲 true 則 Read 會被強制設置爲 true
	Write bool

	// 設置爲共享目錄 允許任何人讀取檔案
	// 如果 Shared 爲 true 則 Read 會被強制設置爲 true
	Shared bool
}

Mount .

func (*Mount) Format

func (m *Mount) Format(basePath string) (e error)

Format .

type System

type System struct {
	// 用戶數據庫
	DB string
	// 用戶shell 啓動腳本
	Shell string
	// 映射到web的目錄
	Mount []Mount
}

System 系統配置

func (*System) Format

func (s *System) Format(basePath string) (e error)

Format .

Jump to

Keyboard shortcuts

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