util

package
v0.0.0-...-5346f80 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnauthenticated represents unauthenticated error
	ErrUnauthenticated = status.Error(codes.Unauthenticated, "unauthenticated")
	// ErrNotFound represents not found error
	ErrNotFound = status.Error(codes.NotFound, "not found")
)

Functions

func CodeFromHTTPStatus

func CodeFromHTTPStatus(status int) codes.Code

CodeFromHTTPStatus converts corresponding HTTP response status into the gRPC error code. See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto

func ErrorFromRecover

func ErrorFromRecover(err interface{}) error

ErrorFromRecover creates error with stacktrace from recover

Types

This section is empty.

Jump to

Keyboard shortcuts

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