utils

package
v0.0.0-...-82869e8 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

DB *mongo.Database

Functions

func InitializeDB

func InitializeDB()

InitializeDB initializes DB

func ParseConfig

func ParseConfig(p ...string)

ParseConfig decodes toml config to Config

Types

type TomlConfig

type TomlConfig struct {
	Server struct {
		Version     string `toml:"version"`
		Addr        string `toml:"addr"`
		Development bool   `toml:"development"`
	} `toml:"server"`
	Database struct {
		URI     string `toml:"uri"`
		DB      string `toml:"db"`
		Timeout int    `toml:"timeout"`
	} `toml:"database"`
}

TomlConfig struct

var Config TomlConfig

Config TomlConfig

Jump to

Keyboard shortcuts

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