errors

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const ALREADY_EXISTS = "ALREADY_EXISTS"
View Source
const INTERNAL = "INTERNAL"
View Source
const INVALID_ARGUMENT = "INVALID_ARGUMENT"
View Source
const NOT_FOUND = "NOT_FOUND"
View Source
const PERMISSION_DENIED = "PERMISSION_DENIED"
View Source
const UNAUTHENTICATED = "UNAUTHENTICATED"

Variables

This section is empty.

Functions

func IsAlreadyExists

func IsAlreadyExists(err error) bool

func IsInternal

func IsInternal(err error) bool

func IsInvalidArgument

func IsInvalidArgument(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsPermissionDenied

func IsPermissionDenied(err error) bool

func IsUnauthenticated

func IsUnauthenticated(err error) bool

Types

type Error

type Error struct {
	Code    string
	Message string
}

func AlreadyExists

func AlreadyExists(msg ...string) *Error

func Internal

func Internal(msg ...string) *Error

func InvalidArgument

func InvalidArgument(msg ...string) *Error

func NotFound

func NotFound(msg ...string) *Error

func PermissionDenied

func PermissionDenied(msg ...string) *Error

func Unauthenticated

func Unauthenticated(msg ...string) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) GetHTTPStatus

func (e *Error) GetHTTPStatus() int

Jump to

Keyboard shortcuts

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