lib

package
v1.0.1-0...-55f3d51 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEchoLogWriter io.Writer

DefaultEchoLogWriter displays errors logs on the good writer

View Source
var DefaultSqlLogWriter io.Writer

DefaultSqlLogWriter displays SQL logs on the good writer

Functions

func CheckError

func CheckError(err error, exitCode int)

CheckError manages errors

func CustomLog

func CustomLog(v ...interface{})

CustomLog displays logs

func DisplaySuccessMessage

func DisplaySuccessMessage(msg string)

DisplaySuccessMessage displays success message to output

func InArray

func InArray(value interface{}, array interface{}) (found bool, index int)

InArray search an element in an array

func InitConfig

func InitConfig(file string)

InitConfig : Lecture du fichier de configuration

func IsDatabaseConfigCorrect

func IsDatabaseConfigCorrect() bool

IsDatabaseConfigCorrect : La configuration de la base de données est-elle correcte ?

func IsServerConfigCorrect

func IsServerConfigCorrect() bool

IsServerConfigCorrect checks if server config is correct

func SQLLog

func SQLLog(latency time.Duration, query string, args ...interface{})

SQLLog displays SQL log in gin.DefaultWriter

func Ucfirst

func Ucfirst(s string) string

Ucfirst makes a string's first character uppercase

Types

type HTTPResponse

type HTTPResponse struct {
	Code    int         `json:"code" xml:"code"`
	Message string      `json:"message" xml:"message"`
	Data    interface{} `json:"data,omitempty" xml:"data"`
}

HTTPResponse type

func GetHTTPInternalServerError

func GetHTTPInternalServerError(message string) HTTPResponse

GetHTTPInternalServerError returns 500 error

func GetHTTPResponse

func GetHTTPResponse(code int, message string, data interface{}) HTTPResponse

GetHTTPResponse returns HTTPResponse type

Jump to

Keyboard shortcuts

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