117 lines
5.3 KiB
Go
117 lines
5.3 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: order.proto
|
|
|
|
package orderservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"juwan-backend/app/order/rpc/pb"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
AddOrderStateLogsReq = pb.AddOrderStateLogsReq
|
|
AddOrderStateLogsResp = pb.AddOrderStateLogsResp
|
|
AddOrdersReq = pb.AddOrdersReq
|
|
AddOrdersResp = pb.AddOrdersResp
|
|
DelOrderStateLogsReq = pb.DelOrderStateLogsReq
|
|
DelOrderStateLogsResp = pb.DelOrderStateLogsResp
|
|
DelOrdersReq = pb.DelOrdersReq
|
|
DelOrdersResp = pb.DelOrdersResp
|
|
GetOrderStateLogsByIdReq = pb.GetOrderStateLogsByIdReq
|
|
GetOrderStateLogsByIdResp = pb.GetOrderStateLogsByIdResp
|
|
GetOrdersByIdReq = pb.GetOrdersByIdReq
|
|
GetOrdersByIdResp = pb.GetOrdersByIdResp
|
|
OrderStateLogs = pb.OrderStateLogs
|
|
Orders = pb.Orders
|
|
SearchOrderStateLogsReq = pb.SearchOrderStateLogsReq
|
|
SearchOrderStateLogsResp = pb.SearchOrderStateLogsResp
|
|
SearchOrdersReq = pb.SearchOrdersReq
|
|
SearchOrdersResp = pb.SearchOrdersResp
|
|
UpdateOrderStateLogsReq = pb.UpdateOrderStateLogsReq
|
|
UpdateOrderStateLogsResp = pb.UpdateOrderStateLogsResp
|
|
UpdateOrdersReq = pb.UpdateOrdersReq
|
|
UpdateOrdersResp = pb.UpdateOrdersResp
|
|
|
|
OrderService interface {
|
|
// -----------------------orders-----------------------
|
|
AddOrders(ctx context.Context, in *AddOrdersReq, opts ...grpc.CallOption) (*AddOrdersResp, error)
|
|
UpdateOrders(ctx context.Context, in *UpdateOrdersReq, opts ...grpc.CallOption) (*UpdateOrdersResp, error)
|
|
DelOrders(ctx context.Context, in *DelOrdersReq, opts ...grpc.CallOption) (*DelOrdersResp, error)
|
|
GetOrdersById(ctx context.Context, in *GetOrdersByIdReq, opts ...grpc.CallOption) (*GetOrdersByIdResp, error)
|
|
SearchOrders(ctx context.Context, in *SearchOrdersReq, opts ...grpc.CallOption) (*SearchOrdersResp, error)
|
|
// -----------------------orderStateLogs-----------------------
|
|
AddOrderStateLogs(ctx context.Context, in *AddOrderStateLogsReq, opts ...grpc.CallOption) (*AddOrderStateLogsResp, error)
|
|
UpdateOrderStateLogs(ctx context.Context, in *UpdateOrderStateLogsReq, opts ...grpc.CallOption) (*UpdateOrderStateLogsResp, error)
|
|
DelOrderStateLogs(ctx context.Context, in *DelOrderStateLogsReq, opts ...grpc.CallOption) (*DelOrderStateLogsResp, error)
|
|
GetOrderStateLogsById(ctx context.Context, in *GetOrderStateLogsByIdReq, opts ...grpc.CallOption) (*GetOrderStateLogsByIdResp, error)
|
|
SearchOrderStateLogs(ctx context.Context, in *SearchOrderStateLogsReq, opts ...grpc.CallOption) (*SearchOrderStateLogsResp, error)
|
|
}
|
|
|
|
defaultOrderService struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewOrderService(cli zrpc.Client) OrderService {
|
|
return &defaultOrderService{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// -----------------------orders-----------------------
|
|
func (m *defaultOrderService) AddOrders(ctx context.Context, in *AddOrdersReq, opts ...grpc.CallOption) (*AddOrdersResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.AddOrders(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) UpdateOrders(ctx context.Context, in *UpdateOrdersReq, opts ...grpc.CallOption) (*UpdateOrdersResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.UpdateOrders(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) DelOrders(ctx context.Context, in *DelOrdersReq, opts ...grpc.CallOption) (*DelOrdersResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.DelOrders(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) GetOrdersById(ctx context.Context, in *GetOrdersByIdReq, opts ...grpc.CallOption) (*GetOrdersByIdResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.GetOrdersById(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) SearchOrders(ctx context.Context, in *SearchOrdersReq, opts ...grpc.CallOption) (*SearchOrdersResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.SearchOrders(ctx, in, opts...)
|
|
}
|
|
|
|
// -----------------------orderStateLogs-----------------------
|
|
func (m *defaultOrderService) AddOrderStateLogs(ctx context.Context, in *AddOrderStateLogsReq, opts ...grpc.CallOption) (*AddOrderStateLogsResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.AddOrderStateLogs(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) UpdateOrderStateLogs(ctx context.Context, in *UpdateOrderStateLogsReq, opts ...grpc.CallOption) (*UpdateOrderStateLogsResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.UpdateOrderStateLogs(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) DelOrderStateLogs(ctx context.Context, in *DelOrderStateLogsReq, opts ...grpc.CallOption) (*DelOrderStateLogsResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.DelOrderStateLogs(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) GetOrderStateLogsById(ctx context.Context, in *GetOrderStateLogsByIdReq, opts ...grpc.CallOption) (*GetOrderStateLogsByIdResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.GetOrderStateLogsById(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOrderService) SearchOrderStateLogs(ctx context.Context, in *SearchOrderStateLogsReq, opts ...grpc.CallOption) (*SearchOrderStateLogsResp, error) {
|
|
client := pb.NewOrderServiceClient(m.cli.Conn())
|
|
return client.SearchOrderStateLogs(ctx, in, opts...)
|
|
}
|