config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Gcfg = Configure{}

	VERSION   = "unknown"
	BUILDTIME = "unknown time"
	GITCOMMIT = "unknown git commit"
	SITE      = "https://github.com/lexkong/grapehttp"
)

Functions

This section is empty.

Types

type Configure

type Configure struct {
	Conf            *os.File `yaml:"-"`
	Addr            string   `yaml:"addr"`
	DbInit          bool     `yaml:"-"`
	DbInitForce     bool     `yaml:"-"`
	Count           bool     `yaml:"count"`
	AdminUsername   string   `yaml:"admin_username"`
	AdminPassword   string   `yaml:"admin_password"`
	AdminEmail      string   `yaml:"admin_email"`
	Root            string   `yaml:"root"`
	Rbac            Rbac     `yaml:"rbac"`
	HTTPAuth        string   `yaml:"httpauth"`
	SimpleAuth      bool     `yaml:"simpleauth"`
	Cert            string   `yaml:"cert"`
	Key             string   `yaml:"key"`
	Cors            bool     `yaml:"cors"`
	Theme           string   `yaml:"theme"`
	XHeaders        bool     `yaml:"xheaders"`
	Upload          bool     `yaml:"upload"`
	Delete          bool     `yaml:"delete"`
	NoAccess        bool     `yaml:"noaccess"`
	PlistProxy      string   `yaml:"plistproxy"`
	Title           string   `yaml:"title"`
	Debug           bool     `yaml:"debug"`
	GoogleTrackerId string   `yaml:"google-tracker-id"`
	Auth            struct {
		Type   string `yaml:"type"`
		OpenID string `yaml:"openid"`
		HTTP   string `yaml:"http"`
	} `yaml:"auth"`
}

func LoadConfig

func LoadConfig() (Configure, error)

type Rbac

type Rbac struct {
	Host string `yaml:"db_host"`
	Port string `yaml:"db_port"`
	User string `yaml:"db_user"`
	Pass string `yaml:"db_pass"`
	Name string `yaml:"db_name"`
}

Jump to

Keyboard shortcuts

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