conf

package
v0.0.0-...-f123b97 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommitSHA = "debug"

CommitSHA 在编译时注入,为当前 Git Commit 哈希值。

Functions

func Load

func Load() error

Load 从配置文件中加载配置。

Types

type MailSegment

type MailSegment struct {
	Account  string `toml:"account"`
	Password string `toml:"password"`
	SMTP     string `toml:"smtp"`
	Port     int    `toml:"port"`
}
var Mail MailSegment

type MySQLSegment

type MySQLSegment struct {
	User     string `toml:"user"`
	Password string `toml:"password"`
	Addr     string `toml:"addr"`
	Name     string `toml:"name"`
}
var MySQL MySQLSegment

type RedisSegment

type RedisSegment struct {
	Addr     string `toml:"addr"`
	Password string `toml:"password"`
}
var Redis RedisSegment

type SiteSegment

type SiteSegment struct {
	Name        string `toml:"name"`
	BaseURL     string `toml:"base_url"`
	Port        int    `toml:"port"`
	ICP         string `toml:"icp"`
	SecurityKey string `toml:"security_key"`
	CSRFKey     string `toml:"csrf_key"`
}
var Site SiteSegment

Jump to

Keyboard shortcuts

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