errutil

package
v0.0.0-...-cbc3a0c Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorConflict = grpc.Errorf(codes.AlreadyExists, "Resource conflict")

ErrorConflict is for resource conflict error.

View Source
var ErrorInternal = grpc.Errorf(codes.Internal, "Internal Server Error")

ErrorInternal for Internal Server Error.

View Source
var ErrorNotFound = grpc.Errorf(codes.NotFound, "not found")

ErrorNotFound for not found error.

View Source
var ErrorPermissionDenied = grpc.Errorf(codes.PermissionDenied, "Permission Denied")

ErrorPermissionDenied for permission denied errror.

View Source
var ErrorUnauthenticated = grpc.Errorf(codes.Unauthenticated, "Unauthenticated")

ErrorUnauthenticated for unauthenticated error.

Functions

func ErrorBadRequest

func ErrorBadRequest(message string) error

ErrorBadRequest makes bad request error.

func ErrorBadRequestf

func ErrorBadRequestf(format string, a ...interface{}) error

ErrorBadRequestf makes bad request error with format.

func ErrorConflictf

func ErrorConflictf(format string, a ...interface{}) error

ErrorConflictf makes not found error.

func ErrorForbidden

func ErrorForbidden(message string) error

ErrorForbidden makes forbidden error.

func ErrorForbiddenf

func ErrorForbiddenf(format string, a ...interface{}) error

ErrorForbiddenf makes forbidden error with format.

func ErrorNotFoundf

func ErrorNotFoundf(message string, a ...interface{}) error

ErrorNotFoundf makes not found error.

func IsConflict

func IsConflict(err error) bool

IsConflict returns true if error is of Conflict type.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if error is of NotFound type.

func ToHTTPError

func ToHTTPError(err error) error

ToHTTPError translates grpc error to error.

Types

type MultiError

type MultiError []error

MultiError implements errors with multiple causes.

func (MultiError) Cause

func (m MultiError) Cause() error

Cause returns the first error.

func (MultiError) Error

func (m MultiError) Error() string

Error implements default errors interface for MultiError.

Jump to

Keyboard shortcuts

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