biz

package
v0.0.0-...-fefde71 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogisticsService_CreateDelivery_FullMethodName = "/logistics.LogisticsService/CreateDelivery"
	LogisticsService_ListDeliveries_FullMethodName = "/logistics.LogisticsService/ListDeliveries"
)

Variables

View Source
var File_domain_logistics_biz_logistics_proto protoreflect.FileDescriptor
View Source
var LogisticsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "logistics.LogisticsService",
	HandlerType: (*LogisticsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateDelivery",
			Handler:    _LogisticsService_CreateDelivery_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListDeliveries",
			Handler:       _LogisticsService_ListDeliveries_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "domain/logistics/biz/logistics.proto",
}

LogisticsService_ServiceDesc is the grpc.ServiceDesc for LogisticsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLogisticsServiceServer

func RegisterLogisticsServiceServer(s grpc.ServiceRegistrar, srv LogisticsServiceServer)

Types

type CreateDeliveryRequest

type CreateDeliveryRequest struct {
	OrderId int64          `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	UserId  string         `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Address *model.Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	Phone   string         `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
	Note    string         `protobuf:"bytes,5,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDeliveryRequest) Descriptor deprecated

func (*CreateDeliveryRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateDeliveryRequest.ProtoReflect.Descriptor instead.

func (*CreateDeliveryRequest) GetAddress

func (x *CreateDeliveryRequest) GetAddress() *model.Address

func (*CreateDeliveryRequest) GetNote

func (x *CreateDeliveryRequest) GetNote() string

func (*CreateDeliveryRequest) GetOrderId

func (x *CreateDeliveryRequest) GetOrderId() int64

func (*CreateDeliveryRequest) GetPhone

func (x *CreateDeliveryRequest) GetPhone() string

func (*CreateDeliveryRequest) GetUserId

func (x *CreateDeliveryRequest) GetUserId() string

func (*CreateDeliveryRequest) ProtoMessage

func (*CreateDeliveryRequest) ProtoMessage()

func (*CreateDeliveryRequest) ProtoReflect

func (x *CreateDeliveryRequest) ProtoReflect() protoreflect.Message

func (*CreateDeliveryRequest) Reset

func (x *CreateDeliveryRequest) Reset()

func (*CreateDeliveryRequest) String

func (x *CreateDeliveryRequest) String() string

type DeliveryStatusChangedHandler

type DeliveryStatusChangedHandler interface {
	On(ctx contextx.Contextx) (ch chan *model.DeliveryEvent, err error)
}

DeliveryStatusChangedHandler represents the interface for handling delivery status changed events.

type ListDeliveriesRequest

type ListDeliveriesRequest struct {
	Page     int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDeliveriesRequest) Descriptor deprecated

func (*ListDeliveriesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListDeliveriesRequest.ProtoReflect.Descriptor instead.

func (*ListDeliveriesRequest) GetPage

func (x *ListDeliveriesRequest) GetPage() int64

func (*ListDeliveriesRequest) GetPageSize

func (x *ListDeliveriesRequest) GetPageSize() int64

func (*ListDeliveriesRequest) ProtoMessage

func (*ListDeliveriesRequest) ProtoMessage()

func (*ListDeliveriesRequest) ProtoReflect

func (x *ListDeliveriesRequest) ProtoReflect() protoreflect.Message

func (*ListDeliveriesRequest) Reset

func (x *ListDeliveriesRequest) Reset()

func (*ListDeliveriesRequest) String

func (x *ListDeliveriesRequest) String() string

type LogisticsServiceClient

type LogisticsServiceClient interface {
	CreateDelivery(ctx context.Context, in *CreateDeliveryRequest, opts ...grpc.CallOption) (*model.Delivery, error)
	ListDeliveries(ctx context.Context, in *ListDeliveriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[model.Delivery], error)
}

LogisticsServiceClient is the client API for LogisticsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type LogisticsServiceServer

type LogisticsServiceServer interface {
	CreateDelivery(context.Context, *CreateDeliveryRequest) (*model.Delivery, error)
	ListDeliveries(*ListDeliveriesRequest, grpc.ServerStreamingServer[model.Delivery]) error
}

LogisticsServiceServer is the server API for LogisticsService service. All implementations should embed UnimplementedLogisticsServiceServer for forward compatibility.

type LogisticsService_ListDeliveriesClient

type LogisticsService_ListDeliveriesClient = grpc.ServerStreamingClient[model.Delivery]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type LogisticsService_ListDeliveriesServer

type LogisticsService_ListDeliveriesServer = grpc.ServerStreamingServer[model.Delivery]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type MockLogisticsServiceClient

type MockLogisticsServiceClient struct {
	// contains filtered or unexported fields
}

MockLogisticsServiceClient is a mock of LogisticsServiceClient interface.

func NewMockLogisticsServiceClient

func NewMockLogisticsServiceClient(ctrl *gomock.Controller) *MockLogisticsServiceClient

NewMockLogisticsServiceClient creates a new mock instance.

func (*MockLogisticsServiceClient) CreateDelivery

CreateDelivery mocks base method.

func (*MockLogisticsServiceClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLogisticsServiceClient) ListDeliveries

ListDeliveries mocks base method.

type MockLogisticsServiceClientMockRecorder

type MockLogisticsServiceClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockLogisticsServiceClientMockRecorder is the mock recorder for MockLogisticsServiceClient.

func (*MockLogisticsServiceClientMockRecorder) CreateDelivery

func (mr *MockLogisticsServiceClientMockRecorder) CreateDelivery(ctx, in interface{}, opts ...interface{}) *gomock.Call

CreateDelivery indicates an expected call of CreateDelivery.

func (*MockLogisticsServiceClientMockRecorder) ListDeliveries

func (mr *MockLogisticsServiceClientMockRecorder) ListDeliveries(ctx, in interface{}, opts ...interface{}) *gomock.Call

ListDeliveries indicates an expected call of ListDeliveries.

type MockLogisticsServiceServer

type MockLogisticsServiceServer struct {
	// contains filtered or unexported fields
}

MockLogisticsServiceServer is a mock of LogisticsServiceServer interface.

func NewMockLogisticsServiceServer

func NewMockLogisticsServiceServer(ctrl *gomock.Controller) *MockLogisticsServiceServer

NewMockLogisticsServiceServer creates a new mock instance.

func (*MockLogisticsServiceServer) CreateDelivery

CreateDelivery mocks base method.

func (*MockLogisticsServiceServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLogisticsServiceServer) ListDeliveries

ListDeliveries mocks base method.

type MockLogisticsServiceServerMockRecorder

type MockLogisticsServiceServerMockRecorder struct {
	// contains filtered or unexported fields
}

MockLogisticsServiceServerMockRecorder is the mock recorder for MockLogisticsServiceServer.

func (*MockLogisticsServiceServerMockRecorder) CreateDelivery

func (mr *MockLogisticsServiceServerMockRecorder) CreateDelivery(ctx, in interface{}) *gomock.Call

CreateDelivery indicates an expected call of CreateDelivery.

func (*MockLogisticsServiceServerMockRecorder) ListDeliveries

func (mr *MockLogisticsServiceServerMockRecorder) ListDeliveries(blob, server interface{}) *gomock.Call

ListDeliveries indicates an expected call of ListDeliveries.

type MockLogisticsService_ListDeliveriesClient

type MockLogisticsService_ListDeliveriesClient struct {
	// contains filtered or unexported fields
}

MockLogisticsService_ListDeliveriesClient is a mock of LogisticsService_ListDeliveriesClient interface.

func NewMockLogisticsService_ListDeliveriesClient

func NewMockLogisticsService_ListDeliveriesClient(ctrl *gomock.Controller) *MockLogisticsService_ListDeliveriesClient

NewMockLogisticsService_ListDeliveriesClient creates a new mock instance.

func (*MockLogisticsService_ListDeliveriesClient) CloseSend

CloseSend mocks base method.

func (*MockLogisticsService_ListDeliveriesClient) Context

Context mocks base method.

func (*MockLogisticsService_ListDeliveriesClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLogisticsService_ListDeliveriesClient) Header

Header mocks base method.

func (*MockLogisticsService_ListDeliveriesClient) Recv

Recv mocks base method.

func (*MockLogisticsService_ListDeliveriesClient) RecvMsg

func (m *MockLogisticsService_ListDeliveriesClient) RecvMsg(arg0 interface{}) error

RecvMsg mocks base method.

func (*MockLogisticsService_ListDeliveriesClient) SendMsg

func (m *MockLogisticsService_ListDeliveriesClient) SendMsg(arg0 interface{}) error

SendMsg mocks base method.

func (*MockLogisticsService_ListDeliveriesClient) Trailer

Trailer mocks base method.

type MockLogisticsService_ListDeliveriesClientMockRecorder

type MockLogisticsService_ListDeliveriesClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockLogisticsService_ListDeliveriesClientMockRecorder is the mock recorder for MockLogisticsService_ListDeliveriesClient.

func (*MockLogisticsService_ListDeliveriesClientMockRecorder) CloseSend

CloseSend indicates an expected call of CloseSend.

func (*MockLogisticsService_ListDeliveriesClientMockRecorder) Context

Context indicates an expected call of Context.

func (*MockLogisticsService_ListDeliveriesClientMockRecorder) Header

Header indicates an expected call of Header.

func (*MockLogisticsService_ListDeliveriesClientMockRecorder) Recv

Recv indicates an expected call of Recv.

func (*MockLogisticsService_ListDeliveriesClientMockRecorder) RecvMsg

func (mr *MockLogisticsService_ListDeliveriesClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call

RecvMsg indicates an expected call of RecvMsg.

func (*MockLogisticsService_ListDeliveriesClientMockRecorder) SendMsg

func (mr *MockLogisticsService_ListDeliveriesClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call

SendMsg indicates an expected call of SendMsg.

func (*MockLogisticsService_ListDeliveriesClientMockRecorder) Trailer

Trailer indicates an expected call of Trailer.

type MockLogisticsService_ListDeliveriesServer

type MockLogisticsService_ListDeliveriesServer struct {
	// contains filtered or unexported fields
}

MockLogisticsService_ListDeliveriesServer is a mock of LogisticsService_ListDeliveriesServer interface.

func NewMockLogisticsService_ListDeliveriesServer

func NewMockLogisticsService_ListDeliveriesServer(ctrl *gomock.Controller) *MockLogisticsService_ListDeliveriesServer

NewMockLogisticsService_ListDeliveriesServer creates a new mock instance.

func (*MockLogisticsService_ListDeliveriesServer) Context

Context mocks base method.

func (*MockLogisticsService_ListDeliveriesServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLogisticsService_ListDeliveriesServer) RecvMsg

func (m *MockLogisticsService_ListDeliveriesServer) RecvMsg(arg0 interface{}) error

RecvMsg mocks base method.

func (*MockLogisticsService_ListDeliveriesServer) Send

Send mocks base method.

func (*MockLogisticsService_ListDeliveriesServer) SendHeader

SendHeader mocks base method.

func (*MockLogisticsService_ListDeliveriesServer) SendMsg

func (m *MockLogisticsService_ListDeliveriesServer) SendMsg(arg0 interface{}) error

SendMsg mocks base method.

func (*MockLogisticsService_ListDeliveriesServer) SetHeader

SetHeader mocks base method.

func (*MockLogisticsService_ListDeliveriesServer) SetTrailer

SetTrailer mocks base method.

type MockLogisticsService_ListDeliveriesServerMockRecorder

type MockLogisticsService_ListDeliveriesServerMockRecorder struct {
	// contains filtered or unexported fields
}

MockLogisticsService_ListDeliveriesServerMockRecorder is the mock recorder for MockLogisticsService_ListDeliveriesServer.

func (*MockLogisticsService_ListDeliveriesServerMockRecorder) Context

Context indicates an expected call of Context.

func (*MockLogisticsService_ListDeliveriesServerMockRecorder) RecvMsg

func (mr *MockLogisticsService_ListDeliveriesServerMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call

RecvMsg indicates an expected call of RecvMsg.

func (*MockLogisticsService_ListDeliveriesServerMockRecorder) Send

Send indicates an expected call of Send.

func (*MockLogisticsService_ListDeliveriesServerMockRecorder) SendHeader

func (mr *MockLogisticsService_ListDeliveriesServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call

SendHeader indicates an expected call of SendHeader.

func (*MockLogisticsService_ListDeliveriesServerMockRecorder) SendMsg

func (mr *MockLogisticsService_ListDeliveriesServerMockRecorder) SendMsg(arg0 interface{}) *gomock.Call

SendMsg indicates an expected call of SendMsg.

func (*MockLogisticsService_ListDeliveriesServerMockRecorder) SetHeader

func (mr *MockLogisticsService_ListDeliveriesServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call

SetHeader indicates an expected call of SetHeader.

func (*MockLogisticsService_ListDeliveriesServerMockRecorder) SetTrailer

func (mr *MockLogisticsService_ListDeliveriesServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call

SetTrailer indicates an expected call of SetTrailer.

type UnimplementedLogisticsServiceServer

type UnimplementedLogisticsServiceServer struct{}

UnimplementedLogisticsServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedLogisticsServiceServer) CreateDelivery

func (UnimplementedLogisticsServiceServer) ListDeliveries

type UnsafeLogisticsServiceServer

type UnsafeLogisticsServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeLogisticsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogisticsServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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