config

package
v0.0.0-...-7f3b7f6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MysqlConnect

func MysqlConnect(cfg Config) (*sql.DB, error)

Types

type App

type App struct {
	Name     string `json:"name"`
	HttpPort string `json:"http_port"`
}

type Config

type Config struct {
	App     App
	MysqlDB MysqlDB
	MongoDB MongoDB
}

func LoadConfiguration

func LoadConfiguration() Config

type MongoDB

type MongoDB struct {
	Name     string `json:"name"`
	Host     string `json:"host"`
	User     string `json:"user"`
	Port     string `json:"port"`
	Password string `json:"password"`
}

type MysqlDB

type MysqlDB struct {
	Name     string `json:"name"`
	Host     string `json:"host"`
	User     string `json:"user"`
	Port     string `json:"port"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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