errors

package
v0.0.0-...-a7a54b8 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Error   string `json:"error"`
	Status  int    `json:"status"`
	Message string `json:"message"`
}

func NewBadRequestError

func NewBadRequestError(message string) *AppError

func NewError

func NewError(err error, message string) *AppError

func NewNotFoundError

func NewNotFoundError(message string) *AppError

func NewUnauthorizedError

func NewUnauthorizedError() *AppError

type ValidationErrorResponse

type ValidationErrorResponse struct {
	FailedField string `json:"field"`
	Tag         string `json:"tag"`
	Value       string `json:"value"`
}

func Validation

func Validation(err interface{}) []*ValidationErrorResponse

Jump to

Keyboard shortcuts

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