interceptor

package
v0.0.0-...-b05257f Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTranslateMap

func DefaultTranslateMap() map[codes.Code]codes.Code

func TranslateUnaryServerInterceptor

func TranslateUnaryServerInterceptor(t Translator) grpc.UnaryServerInterceptor

Types

type MapTranslator

type MapTranslator struct {
	TranslateMap map[codes.Code]codes.Code
}

func DefaultTranslator

func DefaultTranslator() *MapTranslator

func (*MapTranslator) Translate

func (nt *MapTranslator) Translate(err error) error

type Translator

type Translator interface {
	Translate(err error) error
}

Jump to

Keyboard shortcuts

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