config

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = Configure{
	Data:            "data",
	DefaultPassword: "123456",
	Web:             ":8080",

	Database: db.Options{
		Type:     "sqlite",
		URL:      "sqlite3.db",
		Debug:    false,
		LogLevel: 4,
		Sync:     true,
	},

	Broker: broker.Options{
		Url: "internal",
	},

	Log: log.Options{
		Level:  "trace",
		Caller: true,
		Text:   false,
	},
}

Config 全局配置

Functions

func Load

func Load() error

Load 加载

func Store

func Store() error

Types

type Configure

type Configure struct {
	Data            string         `yaml:"data" json:"data"`
	DefaultPassword string         `yaml:"default_password" json:"default_password"`
	Web             string         `yaml:"web" json:"web"`
	Broker          broker.Options `yaml:"broker" json:"broker"`
	Database        db.Options     `yaml:"database" json:"database"`
	Log             log.Options    `yaml:"log" json:"log"`
}

Configure 配置

type Web

type Web struct {
	Addr string `yaml:"addr" json:"addr"`
}

Web 参数

Jump to

Keyboard shortcuts

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