Documentation
¶
Overview ¶
Package conf generated by go-bindata.// sources: app.ini
Index ¶
- Variables
- func AppPath() string
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func CustomDir() string
- func Init(customConf string) error
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func WorkDir() string
- type CacheOpts
- type DatabaseOpts
- type EmailOpts
- type LogOpts
- type ServerOpts
- type StorageLocalOpts
- type StorageOpts
Constants ¶
This section is empty.
Variables ¶
var ( BuildTime string BuildCommit string )
Build time and commit information.
⚠️ WARNING: should only be set by "-ldflags".
var ( UseSQLite3 bool UseMySQL bool UsePostgreSQL bool UseMSSQL bool )
Indicates which database backend is currently being used.
var ( // App for project basic App = struct { Version string `ini:"-"` Name string Debug bool IPDBPath string `ini:"IPDB_PATH"` }{ Version: "no version", Name: "MDClubGo", Debug: true, IPDBPath: "conf/mdclubgo.ipdb", } )
var CustomConf string
CustomConf returns the absolute path of custom configuration file that is used.
var Installed bool
Installed whether the app is installed
var Source *ini.File
Source is the configuration object.
var TestConf = os.Getenv("TEST_CONF")
TestConf app config path read in ENV
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("nonexistent") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type DatabaseOpts ¶
type DatabaseOpts struct { Type string Host string Name string User string Password string SSLMode string `ini:"SSL_MODE"` Path string MaxOpenConns int MaxIdleConns int }
DatabaseOpts db options
var Database DatabaseOpts
Database settings
type LogOpts ¶
type LogOpts struct {
RootPath string `ini:"ROOT_PATH"`
}
LogOpts log options
var Log LogOpts
Log settings
type ServerOpts ¶
type ServerOpts struct { HTTPSEnable bool `ini:"HTTPS_ENABLE"` HTTPAddr string `ini:"HTTP_ADDR"` HTTPPort string `ini:"HTTP_PORT"` CertFile string KeyFile string AccessControlAllowOrigin string `ini:"ACCESS_CONTROL_ALLOW_ORIGIN"` SiteStaticURL string `ini:"SITE_STATIC_URL"` }
ServerOpts Server options
var Server ServerOpts
Server settings
type StorageLocalOpts ¶
type StorageLocalOpts struct {
URL string
}
StorageLocalOpts storage local options
var StorageLocal StorageLocalOpts
StorageLocal settings
type StorageOpts ¶
type StorageOpts struct {
Type string
}
StorageOpts storage options
var Storage StorageOpts
Storage settings