Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOrderRequest ¶
type CreateOrderResponse ¶
type CreateUserRequest ¶
type CreateUserResponse ¶
type GetOrderRequest ¶
type GetOrderRequest struct {
OrderID uint `json:"order_id"`
}
type GetOrderResponse ¶
type GetUserRequest ¶
type GetUserRequest struct {
ID uint `json:"id"`
}
type GetUserResponse ¶
type OrderService ¶
type OrderService interface {
// CreateOrder 创建订单
CreateOrder(ctx context.Context, req CreateOrderRequest) (CreateOrderResponse, error)
// GetOrder 获取订单
GetOrder(ctx context.Context, req GetOrderRequest) (GetOrderResponse, error)
}
OrderService 订单服务
type UserService ¶
type UserService interface {
// CreateUser 创建用户
CreateUser(ctx context.Context, req CreateUserRequest) (CreateUserResponse, error)
// GetUser 获取用户
GetUser(ctx context.Context, req GetUserRequest) (GetUserResponse, error)
}
UserService 用户服务
Click to show internal directories.
Click to hide internal directories.