grpcerror

package module
v0.0.0-...-6d78eec Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT 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