configuration

package
v0.0.0-...-ed61a54 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllData

func GetAllData(interfaceElement []Data) (data map[string]interface{})

func GetConnection

func GetConnection() *sql.DB

GetConnection return

func GetInterface

func GetInterface(title string) (Env, Template)

Types

type Data

type Data interface {
	GetData() interface{}
}

type Env

type Env struct {
	HOST       string `json:"host"`
	HOSTPORT   string `json:"host-port"`
	DBPORT     string `json:"db-port"`
	DBUSER     string `json:"db-user"`
	DBPASSWORD string `json:"db-password"`
	DBNAME     string `json:"db-name"`
}

func (Env) GetData

func (e Env) GetData() interface{}

GetData obtains the data for the env file

type Template

type Template struct {
	TITLE string `json:"title"`
}

func (Template) GetData

func (t Template) GetData() interface{}

GetData is a method to get the data for the template executed

Jump to

Keyboard shortcuts

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