Documentation ¶
Index ¶
- Variables
- func CheckError(err error, exitCode int)
- func CustomLog(v ...interface{})
- func DisplaySuccessMessage(msg string)
- func InArray(value interface{}, array interface{}) (found bool, index int)
- func InitConfig(file string)
- func IsDatabaseConfigCorrect() bool
- func IsServerConfigCorrect() bool
- func SQLLog(latency time.Duration, query string, args ...interface{})
- func Ucfirst(s string) string
- type HTTPResponse
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 DisplaySuccessMessage ¶
func DisplaySuccessMessage(msg string)
DisplaySuccessMessage displays success message to output
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
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
Click to show internal directories.
Click to hide internal directories.