cfg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CFG = &struct {
	AdminUser     string
	Host          string
	LoggerPath    string
	LoggerLevel   string
	APPUUID       string
	APPKey        []byte
	TimeFormat    string
	TimeZone      string
	Debug         bool
	FileUrlPrefix string
	FireDir       string
	DB            struct {
		Type string
		Addr string
		User string
		Pass string
		DB   string
	}
	ES *config.Config
}{
	APPUUID:       "jU5Jo5hM",
	APPKey:        []byte("cB43wF94MLTksyBK"),
	AdminUser:     "admin",
	Host:          "0.0.0.0:4001",
	LoggerPath:    "",
	LoggerLevel:   "debug",
	TimeFormat:    "2006/01/02 15:04:05",
	TimeZone:      "Asia/Shanghai",
	Debug:         true,
	FileUrlPrefix: "/file",
	FireDir:       "/Users/light/test/media/",
	DB: struct {
		Type string
		Addr string
		User string
		Pass string
		DB   string
	}{

		Addr: "127.0.0.1:3306",

		User: "root",
		Pass: "123456",
		DB:   "one_auth",
	},
	ES: &config.Config{
		URL:      "http://127.0.0.1:9200",
		Username: "elastic",
		Password: "123456",
	},
}
View Source
var Path = cmd.GetCfgPath("oa", "settings")

Functions

func ConnectDB

func ConnectDB() *gorm.DB

func ConnectES added in v1.0.0

func ConnectES() *elastic.Client

func DB

func DB() *gorm.DB

func ES added in v1.0.0

func ES() *elastic.Client

Types

This section is empty.

Jump to

Keyboard shortcuts

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