Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyExists = errors.New("already exists")
View Source
var ErrFailedToGenerateCredentials = errors.New("failed to generate credentials")
View Source
var ErrInvalidFile = errors.New("invalid file")
View Source
var ErrInvalidPassword = errors.New("invalid password")
View Source
var ErrInvalidRequest = errors.New("invalid request")
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrNotImplemented = errors.New("not implemented")
View Source
var ErrUnexpected = errors.New("unexpected")
View Source
var ErrValidationFailed = errors.New("validation failed")
Functions ¶
func GRPCCode ¶ added in v0.1.6
GRPCCode returns the gRPC status code for an error. Done in accordance with https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
func HTTPStatusCode ¶
HTTPStatusCode returns the HTTP status code for the given error
func StreamServerInterceptor ¶ added in v0.1.6
func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor
StreamServerInterceptor returns a new streaming server interceptor for error translation.
func UnaryServerInterceptor ¶ added in v0.1.6
func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor for error translation.
Types ¶
type HandleErrFunc ¶ added in v0.1.6
HandleErrFunc is a function that transforms the error in some way
type Option ¶ added in v0.1.6
type Option func(*options)
func WithErrTranslation ¶ added in v0.1.6
func WithErrTranslation(f HandleErrFunc) Option
Click to show internal directories.
Click to hide internal directories.