config

package
v0.0.0-...-831d999 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(configpath string) error

Init init

Types

type Config

type Config struct {
	Mongo `yaml:"mongo"`
	Port  int    `yaml:"port"`
	Db    string `yaml:"db"`
	LOG   `yaml:"log"`
}

Config project config

var (
	//Cfg config
	Cfg Config
)

type LOG

type LOG struct {
	Path         string        `yaml:"path"`
	RotationTime time.Duration `yaml:"rotation"`
	MaxAge       time.Duration `yaml:"age"`
}

LOG config

type Mongo

type Mongo struct {
	MongoURL  string `yaml:"url"`
	Poolsize  uint64 `yaml:"poolsize"`
	DbName    string `yaml:"dbname"`
	TableName string `yaml:"tablename"`
}

Mongo config

Jump to

Keyboard shortcuts

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