util

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorBadParams = 20
View Source
const ErrorDeleteNotAllowed = 10
View Source
const ErrorFailedCloning = 60
View Source
const ErrorFailedConsulConnection = 30
View Source
const ErrorFailedConsulTxn = 31
View Source
const ErrorFailedHTTPServer = 80
View Source
const ErrorFailedJsonDecode = 51
View Source
const ErrorFailedJsonEncode = 50
View Source
const ErrorFailedMustache = 70
View Source
const ErrorFailedReadingResponse = 40
View Source
const LogDebug = "DEBUG"
View Source
const LogErr = "ERROR"
View Source
const LogInfo = "INFO"
View Source
const LogLevelDebug = 30
View Source
const LogLevelErr = 10
View Source
const LogLevelInfo = 20

Variables

Levels are the log levels we respond to=o.

Functions

func ExitError

func ExitError(err error, errorCode int, logger ILogger)

Types

type GonsulError

type GonsulError struct {
	Code int
}

type ILogger

type ILogger interface {
	PrintError(msg string)
	PrintInfo(msg string)
	PrintDebug(msg string)
	AddMessage(msg string)
	GetMessages() []string
}

ILogger is our logger interface

func NewLogger

func NewLogger(level int) ILogger

NewLogger is our logger constructor

Jump to

Keyboard shortcuts

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