endpoint

package
v0.0.0-...-31e44ea Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(logger *zap.Logger) endpoint.Middleware

LoggingMiddleware 登录中间件 @param logger 日志

func MakeLoginEndPoint

func MakeLoginEndPoint(s service.Service) endpoint.Endpoint

MakeLoginEndPoint 创建登录端点 @param s 服务对象

func NewGolangRateAllowMiddleware

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

NewGolangRateAllowMiddleware 限流中间件 @param limit 限流对象

Types

type EndPointServer

type EndPointServer struct {
	LoginEndPoint endpoint.Endpoint // 登录端点

}

EndPointServer 端点服务

func NewEndPointServer

func NewEndPointServer(svc service.Service, log *zap.Logger, limit *rate.Limiter) EndPointServer

NewEndPointServer 新建端点服务 @param svc 服务对象 @param log 日志对象 @param limit 限流对象

func (EndPointServer) Login

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

Login 服务端点的登录方法 @param ctx 协程上下文方法 @param in 登录请求

Jump to

Keyboard shortcuts

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