config

package
v0.0.0-...-5591726 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddr

func GetAddr() string

func GetEnv

func GetEnv() string

func GetOp

func GetOp() *qgrpc.Config

func Init

func Init(file string) error

Types

type Config

type Config struct {
	Port int           `toml:"port"`
	Env  string        `toml:"env"`
	Op   *qgrpc.Config `toml:"op"`

	HashId *HashIdCfg `toml:"hash_id"`

	LogType  string                 `toml:"logtype"`
	LogLevel types.LEVEL            `toml:"loglevel"`
	Log      map[string]interface{} `toml:"log"`
}

func GetConfig

func GetConfig() *Config

type HashIdCfg

type HashIdCfg struct {
	Mini       int    `toml:"mini"`
	Salt       string `toml:"salt"`
	Characters string `toml:"characters"`
}

func GetHashId

func GetHashId() *HashIdCfg

Jump to

Keyboard shortcuts

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