multisvc

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrderRequest

type CreateOrderRequest struct {
	UserID uint   `json:"user_id"`
	Item   string `json:"item"`
}

type CreateOrderResponse

type CreateOrderResponse struct {
	OrderID uint   `json:"order_id"`
	Error   string `json:"error,omitempty"`
}

type CreateUserRequest

type CreateUserRequest struct {
	Username string `json:"username"`
	Email    string `json:"email"`
}

type CreateUserResponse

type CreateUserResponse struct {
	ID    uint   `json:"id"`
	Error string `json:"error,omitempty"`
}

type GetOrderRequest

type GetOrderRequest struct {
	OrderID uint `json:"order_id"`
}

type GetOrderResponse

type GetOrderResponse struct {
	OrderID uint   `json:"order_id"`
	Item    string `json:"item"`
	Error   string `json:"error,omitempty"`
}

type GetUserRequest

type GetUserRequest struct {
	ID uint `json:"id"`
}

type GetUserResponse

type GetUserResponse struct {
	ID       uint   `json:"id"`
	Username string `json:"username"`
	Error    string `json:"error,omitempty"`
}

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 用户服务

Jump to

Keyboard shortcuts

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