proto

package
v0.0.0-...-87b546a Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_orders_proto protoreflect.FileDescriptor

Functions

func OrdersToNative

func OrdersToNative(in []*Order) []*model.Order

func RegisterOrderServiceServer

func RegisterOrderServiceServer(s *grpc.Server, srv OrderServiceServer)

Types

type Order

type Order struct {
	UniqueID    string               `protobuf:"bytes,1,opt,name=uniqueID,proto3" json:"uniqueID,omitempty"`
	UserID      string               `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
	ReferenceID string               `protobuf:"bytes,3,opt,name=referenceID,proto3" json:"referenceID,omitempty"`
	ProductID   string               `protobuf:"bytes,4,opt,name=productID,proto3" json:"productID,omitempty"`
	Price       float64              `protobuf:"fixed64,5,opt,name=price,proto3" json:"price,omitempty"`
	Status      string               `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
	SourceURL   string               `protobuf:"bytes,7,opt,name=sourceURL,proto3" json:"sourceURL,omitempty"`
	AddedAt     *timestamp.Timestamp `protobuf:"bytes,8,opt,name=AddedAt,proto3" json:"AddedAt,omitempty"`
	// contains filtered or unexported fields
}

func NativeToOrders

func NativeToOrders(native []*model.Order) []*Order

func (*Order) Descriptor deprecated

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

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) FromNative

func (m *Order) FromNative(n *model.Order) *Order

func (*Order) GetAddedAt

func (x *Order) GetAddedAt() *timestamp.Timestamp

func (*Order) GetPrice

func (x *Order) GetPrice() float64

func (*Order) GetProductID

func (x *Order) GetProductID() string

func (*Order) GetReferenceID

func (x *Order) GetReferenceID() string

func (*Order) GetSourceURL

func (x *Order) GetSourceURL() string

func (*Order) GetStatus

func (x *Order) GetStatus() string

func (*Order) GetUniqueID

func (x *Order) GetUniqueID() string

func (*Order) GetUserID

func (x *Order) GetUserID() string

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) ProtoReflect

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

func (*Order) Reset

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

func (*Order) ToNative

func (m *Order) ToNative() *model.Order

type OrderFilter

type OrderFilter struct {
	OrderID       []string              `protobuf:"bytes,1,rep,name=orderID,proto3" json:"orderID,omitempty"`
	RequestQuery  *_struct.Struct       `protobuf:"bytes,2,opt,name=requestQuery,proto3" json:"requestQuery,omitempty"`
	RequestParams *proto1.RequestParams `protobuf:"bytes,3,opt,name=requestParams,proto3" json:"requestParams,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderFilter) Descriptor deprecated

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

Deprecated: Use OrderFilter.ProtoReflect.Descriptor instead.

func (*OrderFilter) GetOrderID

func (x *OrderFilter) GetOrderID() []string

func (*OrderFilter) GetRequestParams

func (x *OrderFilter) GetRequestParams() *proto1.RequestParams

func (*OrderFilter) GetRequestQuery

func (x *OrderFilter) GetRequestQuery() *_struct.Struct

func (*OrderFilter) ProtoMessage

func (*OrderFilter) ProtoMessage()

func (*OrderFilter) ProtoReflect

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

func (*OrderFilter) Reset

func (x *OrderFilter) Reset()

func (*OrderFilter) String

func (x *OrderFilter) String() string

type OrderInput

type OrderInput struct {
	UserID      string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
	ReferenceID string `protobuf:"bytes,3,opt,name=referenceID,proto3" json:"referenceID,omitempty"`
	ProductID   string `protobuf:"bytes,4,opt,name=productID,proto3" json:"productID,omitempty"`
	Order       *Order `protobuf:"bytes,5,opt,name=order,proto3" json:"order,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderInput) Descriptor deprecated

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

Deprecated: Use OrderInput.ProtoReflect.Descriptor instead.

func (*OrderInput) GetOrder

func (x *OrderInput) GetOrder() *Order

func (*OrderInput) GetProductID

func (x *OrderInput) GetProductID() string

func (*OrderInput) GetReferenceID

func (x *OrderInput) GetReferenceID() string

func (*OrderInput) GetUserID

func (x *OrderInput) GetUserID() string

func (*OrderInput) ProtoMessage

func (*OrderInput) ProtoMessage()

func (*OrderInput) ProtoReflect

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

func (*OrderInput) Reset

func (x *OrderInput) Reset()

func (*OrderInput) String

func (x *OrderInput) String() string

type OrderResponse

type OrderResponse struct {
	Orders []*Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"`
	Count  int64    `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderResponse) Descriptor deprecated

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

Deprecated: Use OrderResponse.ProtoReflect.Descriptor instead.

func (*OrderResponse) GetCount

func (x *OrderResponse) GetCount() int64

func (*OrderResponse) GetOrders

func (x *OrderResponse) GetOrders() []*Order

func (*OrderResponse) ProtoMessage

func (*OrderResponse) ProtoMessage()

func (*OrderResponse) ProtoReflect

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

func (*OrderResponse) Reset

func (x *OrderResponse) Reset()

func (*OrderResponse) String

func (x *OrderResponse) String() string

type OrderServiceClient

type OrderServiceClient interface {
	GetOrders(ctx context.Context, in *OrderFilter, opts ...grpc.CallOption) (*OrderResponse, error)
	CountOrders(ctx context.Context, in *OrderFilter, opts ...grpc.CallOption) (*OrderResponse, error)
	AddOrder(ctx context.Context, in *OrderInput, opts ...grpc.CallOption) (*OrderResponse, error)
	EditOrder(ctx context.Context, in *OrderInput, opts ...grpc.CallOption) (*OrderResponse, error)
	DeleteOrder(ctx context.Context, in *OrderFilter, opts ...grpc.CallOption) (*OrderResponse, error)
}

OrderServiceClient is the client API for OrderService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type OrderServiceServer

type OrderServiceServer interface {
	GetOrders(context.Context, *OrderFilter) (*OrderResponse, error)
	CountOrders(context.Context, *OrderFilter) (*OrderResponse, error)
	AddOrder(context.Context, *OrderInput) (*OrderResponse, error)
	EditOrder(context.Context, *OrderInput) (*OrderResponse, error)
	DeleteOrder(context.Context, *OrderFilter) (*OrderResponse, error)
}

OrderServiceServer is the server API for OrderService service.

type UnimplementedOrderServiceServer

type UnimplementedOrderServiceServer struct {
}

UnimplementedOrderServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedOrderServiceServer) AddOrder

func (*UnimplementedOrderServiceServer) CountOrders

func (*UnimplementedOrderServiceServer) DeleteOrder

func (*UnimplementedOrderServiceServer) EditOrder

func (*UnimplementedOrderServiceServer) GetOrders

Jump to

Keyboard shortcuts

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