Documentation ¶
Overview ¶
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.
Index ¶
- func Api(level log.Verbosity, c *gin.Context, format string, args ...interface{})
- func BadRequest(c *gin.Context, opt_msg ...string)
- func Exists(path string) bool
- func ExpandPath(path string) (string, error)
- func Forbidden(c *gin.Context, opt_msg ...string)
- func FormatBytes(s uint64) string
- func InSlice(a string, list []string) bool
- func IsFolder(path string) bool
- func NotFound(c *gin.Context, opt_msg ...string)
- func ServerError(c *gin.Context, err error)
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
BadRequest log 400 eror message in JSON format
func ExpandPath ¶
ExpandPath return Absolute path replace ~ by the path to home directory
func FormatBytes ¶
func ServerError ¶
ServerError log 500 error message in JSON format
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { // The error description. // in: body // Error code. Code int `json:"code"` // Error message. // in: body Message string `json:"message"` }
ErrorResponse is used when sending a HTTP status response different than 200 swagger:response errorResponse Code reference http://www.restapitutorial.com/httpstatuscodes.html