helpers

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnString

func GetConnString(configFileName string) string

GetConnString function. Gets the configuration string of MySQL from a given json formated file

func GetFromToken added in v1.1.2

func GetFromToken(tokenString string) (string, error)

GetFromToken gets the value of a given token

func GetIP

func GetIP(configFileName string) string

GetIP function gets the ip of the configurated MySQL database from a given json formated file

func Tokenize added in v1.1.2

func Tokenize(id string) (string, error)

Tokenize returns a token from a given text

Types

type Configuration

type Configuration struct {
	IP         string
	Port       int
	ConnString string
}

Configuration type to read configuration file

type HTTPErrorHandler

type HTTPErrorHandler struct {
	Status      int               `json:"status"`
	Error       string            `json:"error"`
	Description string            `json:"description"`
	Fields      map[string]string `json:"fields"`
}

HTTPErrorHandler type to handle http errors

Jump to

Keyboard shortcuts

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