messages

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCode

func GetCode(err error) string

Returns the code

func GetHttpCode

func GetHttpCode(err error) int

Returns the httpCode

func New

func New(code string, message string) error

func NewBadRequest

func NewBadRequest(code string, message string) error

func NewConflict

func NewConflict(code string, message string) error

func NewForbidden

func NewForbidden(code string, message string) error

func NewNotFound

func NewNotFound(code string, message string) error

func NewValidation

func NewValidation(err error) error

Returns the first error from a ozzo validation error in a proper way

Types

type Message

type Message struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	// contains filtered or unexported fields
}

func (Message) Error

func (m Message) Error() string

Jump to

Keyboard shortcuts

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