order

package
v0.0.0-...-9affd3a Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_order_proto protoreflect.FileDescriptor
View Source
var Order_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "order.Order",
	HandlerType: (*OrderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Orders",
			Handler:    _Order_Orders_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "order.proto",
}

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

Functions

func RegisterOrderServer

func RegisterOrderServer(s grpc.ServiceRegistrar, srv OrderServer)

Types

type Order

type Order interface {
	Orders(ctx context.Context, in *OrdersRequest, opts ...grpc.CallOption) (*OrdersResponse, error)
}

func NewOrder

func NewOrder(cli zrpc.Client) Order

type OrderClient

type OrderClient interface {
	Orders(ctx context.Context, in *OrdersRequest, opts ...grpc.CallOption) (*OrdersResponse, error)
}

OrderClient is the client API for Order 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.

func NewOrderClient

func NewOrderClient(cc grpc.ClientConnInterface) OrderClient

type OrderItem

type OrderItem struct {
	OrderId    string  `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	Quantity   int64   `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	Payment    float32 `protobuf:"fixed32,3,opt,name=payment,proto3" json:"payment,omitempty"`
	ProductId  int64   `protobuf:"varint,4,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	UserId     int64   `protobuf:"varint,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	CreateTime int64   `protobuf:"varint,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderItem) Descriptor deprecated

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

Deprecated: Use OrderItem.ProtoReflect.Descriptor instead.

func (*OrderItem) GetCreateTime

func (x *OrderItem) GetCreateTime() int64

func (*OrderItem) GetOrderId

func (x *OrderItem) GetOrderId() string

func (*OrderItem) GetPayment

func (x *OrderItem) GetPayment() float32

func (*OrderItem) GetProductId

func (x *OrderItem) GetProductId() int64

func (*OrderItem) GetQuantity

func (x *OrderItem) GetQuantity() int64

func (*OrderItem) GetUserId

func (x *OrderItem) GetUserId() int64

func (*OrderItem) ProtoMessage

func (*OrderItem) ProtoMessage()

func (*OrderItem) ProtoReflect

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

func (*OrderItem) Reset

func (x *OrderItem) Reset()

func (*OrderItem) String

func (x *OrderItem) String() string

type OrderServer

type OrderServer interface {
	Orders(context.Context, *OrdersRequest) (*OrdersResponse, error)
	// contains filtered or unexported methods
}

OrderServer is the server API for Order service. All implementations must embed UnimplementedOrderServer for forward compatibility

type OrdersRequest

type OrdersRequest struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Cursor int64 `protobuf:"varint,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
	Ps     int32 `protobuf:"varint,4,opt,name=ps,proto3" json:"ps,omitempty"`
	// contains filtered or unexported fields
}

func (*OrdersRequest) Descriptor deprecated

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

Deprecated: Use OrdersRequest.ProtoReflect.Descriptor instead.

func (*OrdersRequest) GetCursor

func (x *OrdersRequest) GetCursor() int64

func (*OrdersRequest) GetPs

func (x *OrdersRequest) GetPs() int32

func (*OrdersRequest) GetStatus

func (x *OrdersRequest) GetStatus() int32

func (*OrdersRequest) GetUserId

func (x *OrdersRequest) GetUserId() int64

func (*OrdersRequest) ProtoMessage

func (*OrdersRequest) ProtoMessage()

func (*OrdersRequest) ProtoReflect

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

func (*OrdersRequest) Reset

func (x *OrdersRequest) Reset()

func (*OrdersRequest) String

func (x *OrdersRequest) String() string

type OrdersResponse

type OrdersResponse struct {
	Orders     []*OrderItem `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"`
	IsEnd      bool         `protobuf:"varint,2,opt,name=is_end,json=isEnd,proto3" json:"is_end,omitempty"`
	CreateTime string       `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func (*OrdersResponse) Descriptor deprecated

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

Deprecated: Use OrdersResponse.ProtoReflect.Descriptor instead.

func (*OrdersResponse) GetCreateTime

func (x *OrdersResponse) GetCreateTime() string

func (*OrdersResponse) GetIsEnd

func (x *OrdersResponse) GetIsEnd() bool

func (*OrdersResponse) GetOrders

func (x *OrdersResponse) GetOrders() []*OrderItem

func (*OrdersResponse) ProtoMessage

func (*OrdersResponse) ProtoMessage()

func (*OrdersResponse) ProtoReflect

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

func (*OrdersResponse) Reset

func (x *OrdersResponse) Reset()

func (*OrdersResponse) String

func (x *OrdersResponse) String() string

type UnimplementedOrderServer

type UnimplementedOrderServer struct {
}

UnimplementedOrderServer must be embedded to have forward compatible implementations.

func (UnimplementedOrderServer) Orders

type UnsafeOrderServer

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

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

Jump to

Keyboard shortcuts

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