grpcerror

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: 0BSD Imports: 3 Imported by: 0

Documentation

Overview

Package grpcerror provides serialization and deserialization of errors that follow apperror conventions.

When in doubt about code mappings, check this: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(err error) error

Decode a gRPC error into an application error.

func DecodeKind

func DecodeKind(code codes.Code) apperror.Kind

DecodeKind decodes a codes.Code into an apperror.Kind.

func Encode

func Encode(err error) error

Encode an application error into a gRPC error.

func EncodeKind

func EncodeKind(kind apperror.Kind) codes.Code

EncodeKind encodes an apperror.Kind into a gRPC codes.Code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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