errors

package
v0.0.0-...-0eeeb36 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ApiError_UserToken          = "Your user token is not valid or has expired."
	ApiError_DeviceToken        = "Your device token is not valid or has expired."
	ApiError_Json               = "Could not parse request. Some fields may be missing."
	ApiError_UserDoesntExist    = "User Doesn't Exist."
	ApiError_UserAlreadyExists  = "User Already Exists."
	ApiError_Permissions        = "You do not have access."
	ApiError_Bad_Email_Password = "You entered an incorrect Email or Password."
	ApiError_User_Disabled      = "Account is currently deactivated."
	ApiError_Server             = "Something went wrong. Please try again."
	ApiError_Activating_Email   = "Email couldn't be activate. The activation code has likely expired. Try requesting a new activation code."
)

Variables

This section is empty.

Functions

func New

func New(m string) appError

func NewToUser

func NewToUser(m string) appError

func Response

func Response(c *gin.Context, code int, message string, err interface{}, a ...interface{})

func ResponseWithSoftRedirect

func ResponseWithSoftRedirect(c *gin.Context, code int, message string, redirect string, a ...interface{})

Types

type ErrorResponse

type ErrorResponse struct {
	Code     int         `json:"code,string"`
	Message  string      `json:"message,string"`
	Redirect string      `json:"redirect,string"`
	Data     interface{} `json:"data,string"`
}

An Error Response is the default error that is used for api responses.

swagger:model error

Jump to

Keyboard shortcuts

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