Documentation ¶
Index ¶
- Variables
- func DecodeGRPCGetUserInfoReq(_ context.Context, request interface{}) (interface{}, error)
- func DecodeGRPCGetUserInfoRes(_ context.Context, response interface{}) (interface{}, error)
- func EncodeGRPCGetUserInfoReq(_ context.Context, request interface{}) (interface{}, error)
- func EncodeGRPCGetUserInfoRes(_ context.Context, response interface{}) (interface{}, error)
- func EncodeHTTPGenericResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
- func EndpointInstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
- func EndpointLoggingMiddleware(logger log.Logger) endpoint.Middleware
- func MakeGRPCHandler(endpoints Endpoints, tracer stdopentracing.Tracer, logger log.Logger) pb.UserServer
- func MakeGetUserInfoEndpoint(s Service) endpoint.Endpoint
- func RC4Crypt(s []byte) []byte
- type Endpoints
- type Middleware
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBadRequest = errors.New("bad request")
)
View Source
var (
ErrLoadToMem = errors.New("err occur on loading data from db to memory")
)
Functions ¶
func DecodeGRPCGetUserInfoReq ¶
for server
func EncodeGRPCGetUserInfoReq ¶
for client
func EncodeHTTPGenericResponse ¶
func EncodeHTTPGenericResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
func EndpointInstrumentingMiddleware ¶
func EndpointInstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
func EndpointLoggingMiddleware ¶
func EndpointLoggingMiddleware(logger log.Logger) endpoint.Middleware
EndpointLoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
func MakeGRPCHandler ¶
func MakeGRPCHandler(endpoints Endpoints, tracer stdopentracing.Tracer, logger log.Logger) pb.UserServer
func MakeGetUserInfoEndpoint ¶
Types ¶
type Middleware ¶
func ServiceInstrumentingMiddleware ¶
func ServiceInstrumentingMiddleware(requestCount metrics.Counter, requestLatency metrics.Histogram) Middleware
func ServiceLoggingMiddleware ¶
func ServiceLoggingMiddleware(logger log.Logger) Middleware
Click to show internal directories.
Click to hide internal directories.