errors

package
v0.0.0-...-6f4a0f0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RestErr

type RestErr struct {
	Message string `json:"message"`
	Status  int    `json:"status"`
	Code    string `json:"code"`
}

RestErr : "common"

func NewBadRequestError

func NewBadRequestError(message string) *RestErr

NewBadRequestError : check the error is for bad request status

func NewInternalServerError

func NewInternalServerError(message string) *RestErr

NewInternalServerError : check the error is caused by the server

func NewNotFoundError

func NewNotFoundError(message string) *RestErr

NewNotFoundError : check the error is for bad request status

Jump to

Keyboard shortcuts

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