config

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version        = 1
	RECOVERY       = "recovery"
	ALERT          = "alert"
	JudgesReplicas = 500
)

Variables

This section is empty.

Functions

func CryptoPass

func CryptoPass(raw string) string

CryptoPass crypto password use salt

func InSlice

func InSlice(val string, slice []string) bool

func InitLogger

func InitLogger()

InitLogger x

func Parse

func Parse(ymlfile string) error

Parse configuration file

func Set

func Set(s []string) []string

slice set

func SplitN

func SplitN(m, n int) [][]int

Types

type Config

type Config struct {
	Salt    string              `yaml:"salt"`
	Logger  loggerSection       `yaml:"logger"`
	HTTP    httpSection         `yaml:"http"`
	LDAP    ldapSection         `yaml:"ldap"`
	Redis   redisSection        `yaml:"redis"`
	Queue   queueSection        `yaml:"queue"`
	Cleaner cleanerSection      `yaml:"cleaner"`
	Link    linkSection         `yaml:"link"`
	Notify  map[string][]string `yaml:"notify"`
	Tokens  []string            `yaml:"tokens"`
}

func Get

func Get() *Config

Get configuration file

Jump to

Keyboard shortcuts

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