conf

package
v0.0.4-beta Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init, init the config file.

Types

type Base

type Base struct {
	Title          string
	SystemLanguage string
	BeginTime      time.Time
	RestTime       [][]time.Time
	EndTime        time.Time
	Duration       uint
	Port           string
	Salt           string
	FlagPrefix     string
	FlagSuffix     string
	CheckDownScore int
	AttackScore    int
}

Base is the basic config of the cardinal.

type Config

type Config struct {
	Base  `toml:"base"`
	MySQL `toml:"mysql"`
}

Config is the config of the cardinal.

func Get

func Get() *Config

Get returns the config struct.

type MySQL

type MySQL struct {
	DBHost     string
	DBUsername string
	DBPassword string
	DBName     string
}

MySQL is the database config of the cardinal.

Jump to

Keyboard shortcuts

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