endpoint

package
v0.0.0-...-de569a9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeLoginEndpoint

func MakeLoginEndpoint(userService service.UserService) endpoint.Endpoint

func MakeRegisterEndpoint

func MakeRegisterEndpoint(userService service.UserService) endpoint.Endpoint

Types

type Endpoint

type Endpoint struct {
}

type LoginReq

type LoginReq struct {
	Email    string
	Password string
}

登录请求

type LoginResp

type LoginResp struct {
	UserInfo *service.UserInfoDTO `json:"user_info"`
}

登录响应

type RegisterRequest

type RegisterRequest struct {
	Username string
	Email    string
	Password string
}

type RegisterResponse

type RegisterResponse struct {
	UserInfo *service.UserInfoDTO `json:"user_info"`
}

type UserEndpoints

type UserEndpoints struct {
	// 注册终端
	RegisterEndpoint endpoint.Endpoint
	// 登录终端
	LoginEndpoint endpoint.Endpoint
}

用户终端,负责接收请求,处理请求,并返回结果。可以添加熔断、日志、限流、负载均衡等能力

Jump to

Keyboard shortcuts

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