82 lines
2.5 KiB
Go
82 lines
2.5 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: delivery.proto
|
|
|
|
package car
|
|
|
|
import (
|
|
"context"
|
|
|
|
"bsm/full/module/ec/delivery/external/pb/delivery"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
CarItem = delivery.CarItem
|
|
CarListReply = delivery.CarListReply
|
|
Empty = delivery.Empty
|
|
FetchRequest = delivery.FetchRequest
|
|
IdentRequest = delivery.IdentRequest
|
|
MemberItem = delivery.MemberItem
|
|
MemberListReply = delivery.MemberListReply
|
|
SearchRequest = delivery.SearchRequest
|
|
StatusReply = delivery.StatusReply
|
|
TeamItem = delivery.TeamItem
|
|
TeamListReply = delivery.TeamListReply
|
|
VersionRequest = delivery.VersionRequest
|
|
|
|
Car interface {
|
|
// 配送车辆列表
|
|
CarList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CarListReply, error)
|
|
// 添加配送车辆信息
|
|
CarAdd(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 获取配送车辆信息
|
|
CarGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CarItem, error)
|
|
// 修改配送车辆信息
|
|
CarSet(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 删除配送车辆信息
|
|
CarDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
}
|
|
|
|
defaultCar struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewCar(cli zrpc.Client) Car {
|
|
return &defaultCar{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// 配送车辆列表
|
|
func (m *defaultCar) CarList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*CarListReply, error) {
|
|
client := delivery.NewCarClient(m.cli.Conn())
|
|
return client.CarList(ctx, in, opts...)
|
|
}
|
|
|
|
// 添加配送车辆信息
|
|
func (m *defaultCar) CarAdd(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
client := delivery.NewCarClient(m.cli.Conn())
|
|
return client.CarAdd(ctx, in, opts...)
|
|
}
|
|
|
|
// 获取配送车辆信息
|
|
func (m *defaultCar) CarGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*CarItem, error) {
|
|
client := delivery.NewCarClient(m.cli.Conn())
|
|
return client.CarGet(ctx, in, opts...)
|
|
}
|
|
|
|
// 修改配送车辆信息
|
|
func (m *defaultCar) CarSet(ctx context.Context, in *CarItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
client := delivery.NewCarClient(m.cli.Conn())
|
|
return client.CarSet(ctx, in, opts...)
|
|
}
|
|
|
|
// 删除配送车辆信息
|
|
func (m *defaultCar) CarDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
client := delivery.NewCarClient(m.cli.Conn())
|
|
return client.CarDel(ctx, in, opts...)
|
|
}
|