82 lines
2.6 KiB
Go
82 lines
2.6 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: delivery.proto
|
|
|
|
package team
|
|
|
|
import (
|
|
"context"
|
|
|
|
"bsm/full/module/ec/delivery/external/pb/delivery"
|
|
|
|
"bsm/full/shared/grpcconn"
|
|
"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
|
|
|
|
Team interface {
|
|
// 配送团队列表
|
|
TeamList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error)
|
|
// 添加配送团队
|
|
TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 配送团队详情
|
|
TeamGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TeamItem, error)
|
|
// 修改配送团队信息
|
|
TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 删除配送团队
|
|
TeamDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
}
|
|
|
|
defaultTeam struct {
|
|
cli grpcconn.Provider
|
|
}
|
|
)
|
|
|
|
func NewTeam(cli grpcconn.Provider) Team {
|
|
return &defaultTeam{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// 配送团队列表
|
|
func (m *defaultTeam) TeamList(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*TeamListReply, error) {
|
|
client := delivery.NewTeamClient(m.cli.Conn())
|
|
return client.TeamList(ctx, in, opts...)
|
|
}
|
|
|
|
// 添加配送团队
|
|
func (m *defaultTeam) TeamAdd(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
client := delivery.NewTeamClient(m.cli.Conn())
|
|
return client.TeamAdd(ctx, in, opts...)
|
|
}
|
|
|
|
// 配送团队详情
|
|
func (m *defaultTeam) TeamGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*TeamItem, error) {
|
|
client := delivery.NewTeamClient(m.cli.Conn())
|
|
return client.TeamGet(ctx, in, opts...)
|
|
}
|
|
|
|
// 修改配送团队信息
|
|
func (m *defaultTeam) TeamSet(ctx context.Context, in *TeamItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
client := delivery.NewTeamClient(m.cli.Conn())
|
|
return client.TeamSet(ctx, in, opts...)
|
|
}
|
|
|
|
// 删除配送团队
|
|
func (m *defaultTeam) TeamDel(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
client := delivery.NewTeamClient(m.cli.Conn())
|
|
return client.TeamDel(ctx, in, opts...)
|
|
}
|