utils

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(c *gin.Context, opt_msg ...string)

func Exists

func Exists(path string) bool

func ExpandPath

func ExpandPath(path string) (string, error)

func Forbidden

func Forbidden(c *gin.Context, opt_msg ...string)

func FormatBytes

func FormatBytes(s uint64) string

func InSlice

func InSlice(a string, list []string) bool

func ServerError

func ServerError(c *gin.Context, err error)

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"`
}

Used when sending a HTTP status response different than 200 swagger:response errorResponse

Jump to

Keyboard shortcuts

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