errs

package
v0.0.0-...-de28e55 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Causes

type Causes struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

type Errs

type Errs struct {
	Message string   `json:"message"`
	Err     string   `json:"err"`
	Code    int      `json:"code"`
	Causes  []Causes `json:"causes"`
}

func NewBadRequestErrs

func NewBadRequestErrs(message string) *Errs

NewBadRequestErrs create a new bad request error

func NewBadRequestValidationErrs

func NewBadRequestValidationErrs(message string, causes []Causes) *Errs

NewBadRequestValidationErrs create a new bad request validation error

func NewErrs

func NewErrs(message, err string, code int, causes []Causes) *Errs

NewErrs create a new error

func NewForbiddenErrs

func NewForbiddenErrs(message string) *Errs

NewForbiddenErrs create a new forbidden error

func NewInternalServerErrs

func NewInternalServerErrs(message string) *Errs

NewInternalServerErrs create a new internal server error

func NewNotFoundErrs

func NewNotFoundErrs(message string) *Errs

NewNotFoundErrs create a new not found error

func (*Errs) Error

func (e *Errs) Error() string

Error returns the error message. When you need to pass an error as a parameter

Jump to

Keyboard shortcuts

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