rest_errors

package
v0.0.0-...-ac058c7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RestError

type RestError interface {
	Message() string
	Status() int64
	Code() string
}

RestError : this hold the signature of the function

func NewBadRequestError

func NewBadRequestError(message string) RestError

NewBadRequestError : this method implements the bad request error

func NewError

func NewError(message string, code string, status int64) RestError

NewError : this will creates the New Error

func NewInternalServerError

func NewInternalServerError(message string) RestError

NewInternalServerError : this method implements the internal server error

func NewNotFoundError

func NewNotFoundError(message string) RestError

NewNotFoundError : this method implements the not found error

func NewRestErrorFromBytes

func NewRestErrorFromBytes(byte []byte) (RestError, error)

NewRestErrorFromBytes : creates the resterror domain by taking the paramter as a slice of bytes

func NewUnauthorizedError

func NewUnauthorizedError(message string) RestError

NewUnauthorizedError : this method implements the unauthorized error

func TokenExpired

func TokenExpired() RestError

TokenExpired : this will return when the token get expired

Jump to

Keyboard shortcuts

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