errors

package
v1.4.18 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCommonServerError

func IsCommonServerError(e error) bool

func IsResourceNotFound

func IsResourceNotFound(e error) bool

func NewCommonServerError

func NewCommonServerError(resource, name, action, message string) error

func NewResourceNotFoundError

func NewResourceNotFoundError(resource, name string, message ...string) error

Types

type Error

type Error struct {
	Type         ErrorType
	Message      string
	ResourceType string
	Action       string
	ResouceName  string
}

Error is an implementation of the 'error' interface, which represents an error of server.

func (*Error) Error

func (e *Error) Error() string

Error is method of error interface

type ErrorType

type ErrorType string
const (
	ResourceNotFound ErrorType = "ResourceNotFound"
	ServerError      ErrorType = "CommonServerError"
)

Jump to

Keyboard shortcuts

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