grpc

package
v0.0.0-...-3898045 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGenerateTokenHandler

func NewGenerateTokenHandler(generateTokenEndpoint endpoint.Endpoint) grpcTransport.Handler

func NewTokenServer

func NewTokenServer(generateTokenEndpoint, validateTokenEndpoint endpoint.Endpoint) pb.TokenServer

func NewValidateTokenHandler

func NewValidateTokenHandler(validateTokenEndpoint endpoint.Endpoint) grpcTransport.Handler

func RegisterRoutes

func RegisterRoutes(s *grpc.Server, generateTokenEndpoint, validateTokenEndpoint endpoint.Endpoint)

Types

type Error

type Error struct {
	Err  error
	Code int
}

Error is grpc transport error structure

func TranslateError

func TranslateError(err error) Error

TranslateError translate service error to grpc transport error. panics on passing inappropriate error

func (*Error) Error

func (e *Error) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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