rest_err

package
v0.0.0-...-e7e69c2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 2 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 RestErr

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

func ConvertError

func ConvertError(internalError *internal_error.InternalError) *RestErr

func NewBadRequestError

func NewBadRequestError(message string, causes ...Causes) *RestErr

func NewInternalServerError

func NewInternalServerError(message string) *RestErr

func NewNotFoundError

func NewNotFoundError(message string) *RestErr

func (*RestErr) Error

func (r *RestErr) Error() string

Jump to

Keyboard shortcuts

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