src

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ContextReqUUid = "req_uuid"

Variables

This section is empty.

Functions

func MakeLoginEndPoint

func MakeLoginEndPoint(s Service) endpoint.Endpoint

func NewGRPCServer

func NewGRPCServer(endpoint EndPointServer, log *zap.Logger) pb.UserServer

func NewGolangRateAllowMiddleware

func NewGolangRateAllowMiddleware(limit *rate.Limiter) endpoint.Middleware

func RequestGrpcLogin

func RequestGrpcLogin(_ context.Context, grpcReq interface{}) (interface{}, error)

func ResponseGrpcLogin

func ResponseGrpcLogin(_ context.Context, response interface{}) (interface{}, error)

Types

type EndPointServer

type EndPointServer struct {
	LoginEndPoint endpoint.Endpoint
}

func NewEndPointServer

func NewEndPointServer(svc Service, limit *rate.Limiter) EndPointServer

func (EndPointServer) Login

func (s EndPointServer) Login(ctx context.Context, in *pb.Login) (*pb.LoginAck, error)

type NewMiddlewareServer

type NewMiddlewareServer func(Service) Service

func NewLogMiddlewareServer

func NewLogMiddlewareServer(log *zap.Logger) NewMiddlewareServer

func NewMetricsMiddlewareServer

func NewMetricsMiddlewareServer(counter metrics.Counter, histogram metrics.Histogram) NewMiddlewareServer

type Service

type Service interface {
	Login(ctx context.Context, in *pb.Login) (ack *pb.LoginAck, err error)
}

func NewService

func NewService(log *zap.Logger, counter metrics.Counter, histogram metrics.Histogram) Service

Jump to

Keyboard shortcuts

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