orderpb

package
v0.0.0-...-3e0f7d7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2017 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package orderpb is a generated protocol buffer package.

It is generated from these files:

order/orderpb/order.proto

It has these top-level messages:

Order
OrderItem
Shipping
OrderList
NewRequest
GetRequest
PayRequest
ReturnRequest
ListRequest

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthOrder = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOrder   = fmt.Errorf("proto: integer overflow")
)
View Source
var ListRequest_Sort_name = map[int32]string{
	0: "Natural",
	1: "CreatedDesc",
	2: "CreatedAsc",
	3: "UpdatedDesc",
	4: "UpdatedAsc",
}
View Source
var ListRequest_Sort_value = map[string]int32{
	"Natural":     0,
	"CreatedDesc": 1,
	"CreatedAsc":  2,
	"UpdatedDesc": 3,
	"UpdatedAsc":  4,
}
View Source
var OrderItem_Type_name = map[int32]string{
	0: "reserved",
	1: "sku",
	2: "discount",
	3: "tax",
	4: "shipping",
}
View Source
var OrderItem_Type_value = map[string]int32{
	"reserved": 0,
	"sku":      1,
	"discount": 2,
	"tax":      3,
	"shipping": 4,
}
View Source
var OrderStatus_name = map[int32]string{
	0: "Created",
	1: "Paid",
	2: "Canceled",
	3: "Fulfilled",
	4: "Returned",
}
View Source
var OrderStatus_value = map[string]int32{
	"Created":   0,
	"Paid":      1,
	"Canceled":  2,
	"Fulfilled": 3,
	"Returned":  4,
}

Functions

func RegisterOrderServiceServer

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

Types

type GetRequest

type GetRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" validate:"uuid4,required"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) GetId

func (m *GetRequest) GetId() string

func (*GetRequest) Marshal

func (m *GetRequest) Marshal() (dAtA []byte, err error)

func (*GetRequest) MarshalTo

func (m *GetRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) Size

func (m *GetRequest) Size() (n int)

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) Unmarshal

func (m *GetRequest) Unmarshal(dAtA []byte) error

type ListRequest

type ListRequest struct {
	Page  int64            `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty" validate:"omitempty,required,gte=0"`
	Limit int64            `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty" validate:"omitempty,required,gt=0"`
	Sort  ListRequest_Sort `` /* 134-byte string literal not displayed */
}

func (*ListRequest) Descriptor

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

func (*ListRequest) GetLimit

func (m *ListRequest) GetLimit() int64

func (*ListRequest) GetPage

func (m *ListRequest) GetPage() int64

func (*ListRequest) GetSort

func (m *ListRequest) GetSort() ListRequest_Sort

func (*ListRequest) Marshal

func (m *ListRequest) Marshal() (dAtA []byte, err error)

func (*ListRequest) MarshalTo

func (m *ListRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) Size

func (m *ListRequest) Size() (n int)

func (*ListRequest) String

func (m *ListRequest) String() string

func (*ListRequest) Unmarshal

func (m *ListRequest) Unmarshal(dAtA []byte) error

type ListRequest_Sort

type ListRequest_Sort int32
const (
	ListRequest_Natural     ListRequest_Sort = 0
	ListRequest_CreatedDesc ListRequest_Sort = 1
	ListRequest_CreatedAsc  ListRequest_Sort = 2
	ListRequest_UpdatedDesc ListRequest_Sort = 3
	ListRequest_UpdatedAsc  ListRequest_Sort = 4
)

func (ListRequest_Sort) EnumDescriptor

func (ListRequest_Sort) EnumDescriptor() ([]byte, []int)

func (ListRequest_Sort) String

func (x ListRequest_Sort) String() string

type NewRequest

type NewRequest struct {
	Currency paymentpb.Currency `` /* 128-byte string literal not displayed */
	Items    []*OrderItem       `protobuf:"bytes,2,rep,name=items" json:"items,omitempty" bson:"items" validate:"dive,required"`
	Metadata map[string]string  `` /* 150-byte string literal not displayed */
	Email    string             `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty" validate:"omitempty,email"`
	Shipping *Shipping          `protobuf:"bytes,5,opt,name=shipping" json:"shipping,omitempty" validate:"omitempty,dive"`
}

func (*NewRequest) Descriptor

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

func (*NewRequest) GetCurrency

func (m *NewRequest) GetCurrency() paymentpb.Currency

func (*NewRequest) GetEmail

func (m *NewRequest) GetEmail() string

func (*NewRequest) GetItems

func (m *NewRequest) GetItems() []*OrderItem

func (*NewRequest) GetMetadata

func (m *NewRequest) GetMetadata() map[string]string

func (*NewRequest) GetShipping

func (m *NewRequest) GetShipping() *Shipping

func (*NewRequest) Marshal

func (m *NewRequest) Marshal() (dAtA []byte, err error)

func (*NewRequest) MarshalTo

func (m *NewRequest) MarshalTo(dAtA []byte) (int, error)

func (*NewRequest) ProtoMessage

func (*NewRequest) ProtoMessage()

func (*NewRequest) Reset

func (m *NewRequest) Reset()

func (*NewRequest) Size

func (m *NewRequest) Size() (n int)

func (*NewRequest) String

func (m *NewRequest) String() string

func (*NewRequest) Unmarshal

func (m *NewRequest) Unmarshal(dAtA []byte) error

type Order

type Order struct {
	Id       string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"`
	Amount   int64              `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	Currency paymentpb.Currency `protobuf:"varint,3,opt,name=currency,proto3,enum=paymentpb.Currency" json:"currency,omitempty"`
	Items    []*OrderItem       `protobuf:"bytes,4,rep,name=items" json:"items,omitempty"`
	Metadata map[string]string  `` /* 150-byte string literal not displayed */
	Email    string             `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
	ChargeId string             `protobuf:"bytes,7,opt,name=chargeId,proto3" json:"chargeId,omitempty"`
	Status   OrderStatus        `protobuf:"varint,8,opt,name=Status,proto3,enum=orderpb.OrderStatus" json:"Status,omitempty"`
	Shipping *Shipping          `protobuf:"bytes,9,opt,name=shipping" json:"shipping,omitempty"`
	Created  int64              `protobuf:"varint,998,opt,name=created,proto3" json:"created,omitempty"`
	Updated  int64              `protobuf:"varint,999,opt,name=updated,proto3" json:"updated,omitempty"`
}

func (*Order) Descriptor

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

func (*Order) GetAmount

func (m *Order) GetAmount() int64

func (*Order) GetChargeId

func (m *Order) GetChargeId() string

func (*Order) GetCreated

func (m *Order) GetCreated() int64

func (*Order) GetCurrency

func (m *Order) GetCurrency() paymentpb.Currency

func (*Order) GetEmail

func (m *Order) GetEmail() string

func (*Order) GetId

func (m *Order) GetId() string

func (*Order) GetItems

func (m *Order) GetItems() []*OrderItem

func (*Order) GetMetadata

func (m *Order) GetMetadata() map[string]string

func (*Order) GetShipping

func (m *Order) GetShipping() *Shipping

func (*Order) GetStatus

func (m *Order) GetStatus() OrderStatus

func (*Order) GetUpdated

func (m *Order) GetUpdated() int64

func (*Order) Marshal

func (m *Order) Marshal() (dAtA []byte, err error)

func (*Order) MarshalTo

func (m *Order) MarshalTo(dAtA []byte) (int, error)

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) Reset

func (m *Order) Reset()

func (*Order) Size

func (m *Order) Size() (n int)

func (*Order) String

func (m *Order) String() string

func (*Order) Unmarshal

func (m *Order) Unmarshal(dAtA []byte) error

type OrderItem

type OrderItem struct {
	Type        OrderItem_Type     `protobuf:"varint,1,opt,name=type,proto3,enum=orderpb.OrderItem_Type" json:"type,omitempty" validate:"required,gte=1,lte=4"`
	Quantity    int64              `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty" validate:"omitempty,gte=0"`
	Amount      int64              `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	Currency    paymentpb.Currency `` /* 129-byte string literal not displayed */
	Parent      string             `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty" validate:"omitempty,uuid4"`
	Description string             `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
}

func (*OrderItem) Descriptor

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

func (*OrderItem) GetAmount

func (m *OrderItem) GetAmount() int64

func (*OrderItem) GetCurrency

func (m *OrderItem) GetCurrency() paymentpb.Currency

func (*OrderItem) GetDescription

func (m *OrderItem) GetDescription() string

func (*OrderItem) GetParent

func (m *OrderItem) GetParent() string

func (*OrderItem) GetQuantity

func (m *OrderItem) GetQuantity() int64

func (*OrderItem) GetType

func (m *OrderItem) GetType() OrderItem_Type

func (*OrderItem) Marshal

func (m *OrderItem) Marshal() (dAtA []byte, err error)

func (*OrderItem) MarshalTo

func (m *OrderItem) MarshalTo(dAtA []byte) (int, error)

func (*OrderItem) ProtoMessage

func (*OrderItem) ProtoMessage()

func (*OrderItem) Reset

func (m *OrderItem) Reset()

func (*OrderItem) Size

func (m *OrderItem) Size() (n int)

func (*OrderItem) String

func (m *OrderItem) String() string

func (*OrderItem) Unmarshal

func (m *OrderItem) Unmarshal(dAtA []byte) error

type OrderItem_Type

type OrderItem_Type int32
const (
	OrderItem_reserved OrderItem_Type = 0
	OrderItem_sku      OrderItem_Type = 1
	OrderItem_discount OrderItem_Type = 2
	OrderItem_tax      OrderItem_Type = 3
	OrderItem_shipping OrderItem_Type = 4
)

func (OrderItem_Type) EnumDescriptor

func (OrderItem_Type) EnumDescriptor() ([]byte, []int)

func (OrderItem_Type) String

func (x OrderItem_Type) String() string

type OrderList

type OrderList struct {
	Orders []*Order `protobuf:"bytes,1,rep,name=orders" json:"orders,omitempty"`
	Total  int32    `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
}

func (*OrderList) Descriptor

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

func (*OrderList) GetOrders

func (m *OrderList) GetOrders() []*Order

func (*OrderList) GetTotal

func (m *OrderList) GetTotal() int32

func (*OrderList) Marshal

func (m *OrderList) Marshal() (dAtA []byte, err error)

func (*OrderList) MarshalTo

func (m *OrderList) MarshalTo(dAtA []byte) (int, error)

func (*OrderList) ProtoMessage

func (*OrderList) ProtoMessage()

func (*OrderList) Reset

func (m *OrderList) Reset()

func (*OrderList) Size

func (m *OrderList) Size() (n int)

func (*OrderList) String

func (m *OrderList) String() string

func (*OrderList) Unmarshal

func (m *OrderList) Unmarshal(dAtA []byte) error

type OrderServiceClient

type OrderServiceClient interface {
	New(ctx context.Context, in *NewRequest, opts ...grpc.CallOption) (*Order, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Order, error)
	Pay(ctx context.Context, in *PayRequest, opts ...grpc.CallOption) (*Order, error)
	Return(ctx context.Context, in *ReturnRequest, opts ...grpc.CallOption) (*Order, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*OrderList, error)
}

func NewOrderServiceClient

func NewOrderServiceClient(cc *grpc.ClientConn) OrderServiceClient

type OrderStatus

type OrderStatus int32
const (
	Order_Created   OrderStatus = 0
	Order_Paid      OrderStatus = 1
	Order_Canceled  OrderStatus = 2
	Order_Fulfilled OrderStatus = 3
	Order_Returned  OrderStatus = 4
)

func (OrderStatus) EnumDescriptor

func (OrderStatus) EnumDescriptor() ([]byte, []int)

func (OrderStatus) String

func (x OrderStatus) String() string

type PayRequest

type PayRequest struct {
	Id                string                      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" validate:"uuid4,required"`
	Card              *paymentpb.Card             `protobuf:"bytes,2,opt,name=card" json:"card,omitempty" validate:"dive,required"`
	PaymentProviderId paymentpb.PaymentProviderId `` /* 153-byte string literal not displayed */
}

func (*PayRequest) Descriptor

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

func (*PayRequest) GetCard

func (m *PayRequest) GetCard() *paymentpb.Card

func (*PayRequest) GetId

func (m *PayRequest) GetId() string

func (*PayRequest) GetPaymentProviderId

func (m *PayRequest) GetPaymentProviderId() paymentpb.PaymentProviderId

func (*PayRequest) Marshal

func (m *PayRequest) Marshal() (dAtA []byte, err error)

func (*PayRequest) MarshalTo

func (m *PayRequest) MarshalTo(dAtA []byte) (int, error)

func (*PayRequest) ProtoMessage

func (*PayRequest) ProtoMessage()

func (*PayRequest) Reset

func (m *PayRequest) Reset()

func (*PayRequest) Size

func (m *PayRequest) Size() (n int)

func (*PayRequest) String

func (m *PayRequest) String() string

func (*PayRequest) Unmarshal

func (m *PayRequest) Unmarshal(dAtA []byte) error

type ReturnRequest

type ReturnRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" validate:"uuid4,required"`
}

func (*ReturnRequest) Descriptor

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

func (*ReturnRequest) GetId

func (m *ReturnRequest) GetId() string

func (*ReturnRequest) Marshal

func (m *ReturnRequest) Marshal() (dAtA []byte, err error)

func (*ReturnRequest) MarshalTo

func (m *ReturnRequest) MarshalTo(dAtA []byte) (int, error)

func (*ReturnRequest) ProtoMessage

func (*ReturnRequest) ProtoMessage()

func (*ReturnRequest) Reset

func (m *ReturnRequest) Reset()

func (*ReturnRequest) Size

func (m *ReturnRequest) Size() (n int)

func (*ReturnRequest) String

func (m *ReturnRequest) String() string

func (*ReturnRequest) Unmarshal

func (m *ReturnRequest) Unmarshal(dAtA []byte) error

type Shipping

type Shipping struct {
	Name           string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Phone          string            `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
	Address        *Shipping_Address `protobuf:"bytes,3,opt,name=address" json:"address,omitempty"`
	Carrier        string            `protobuf:"bytes,4,opt,name=carrier,proto3" json:"carrier,omitempty"`
	TrackingNumber string            `protobuf:"bytes,5,opt,name=trackingNumber,proto3" json:"trackingNumber,omitempty"`
}

func (*Shipping) Descriptor

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

func (*Shipping) GetAddress

func (m *Shipping) GetAddress() *Shipping_Address

func (*Shipping) GetCarrier

func (m *Shipping) GetCarrier() string

func (*Shipping) GetName

func (m *Shipping) GetName() string

func (*Shipping) GetPhone

func (m *Shipping) GetPhone() string

func (*Shipping) GetTrackingNumber

func (m *Shipping) GetTrackingNumber() string

func (*Shipping) Marshal

func (m *Shipping) Marshal() (dAtA []byte, err error)

func (*Shipping) MarshalTo

func (m *Shipping) MarshalTo(dAtA []byte) (int, error)

func (*Shipping) ProtoMessage

func (*Shipping) ProtoMessage()

func (*Shipping) Reset

func (m *Shipping) Reset()

func (*Shipping) Size

func (m *Shipping) Size() (n int)

func (*Shipping) String

func (m *Shipping) String() string

func (*Shipping) Unmarshal

func (m *Shipping) Unmarshal(dAtA []byte) error

type Shipping_Address

type Shipping_Address struct {
	Line1      string `protobuf:"bytes,1,opt,name=line1,proto3" json:"line1,omitempty"`
	City       string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
	Country    string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"`
	Line2      string `protobuf:"bytes,4,opt,name=line2,proto3" json:"line2,omitempty"`
	PostalCode string `protobuf:"bytes,5,opt,name=postalCode,proto3" json:"postalCode,omitempty"`
	State      string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
}

func (*Shipping_Address) Descriptor

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

func (*Shipping_Address) GetCity

func (m *Shipping_Address) GetCity() string

func (*Shipping_Address) GetCountry

func (m *Shipping_Address) GetCountry() string

func (*Shipping_Address) GetLine1

func (m *Shipping_Address) GetLine1() string

func (*Shipping_Address) GetLine2

func (m *Shipping_Address) GetLine2() string

func (*Shipping_Address) GetPostalCode

func (m *Shipping_Address) GetPostalCode() string

func (*Shipping_Address) GetState

func (m *Shipping_Address) GetState() string

func (*Shipping_Address) Marshal

func (m *Shipping_Address) Marshal() (dAtA []byte, err error)

func (*Shipping_Address) MarshalTo

func (m *Shipping_Address) MarshalTo(dAtA []byte) (int, error)

func (*Shipping_Address) ProtoMessage

func (*Shipping_Address) ProtoMessage()

func (*Shipping_Address) Reset

func (m *Shipping_Address) Reset()

func (*Shipping_Address) Size

func (m *Shipping_Address) Size() (n int)

func (*Shipping_Address) String

func (m *Shipping_Address) String() string

func (*Shipping_Address) Unmarshal

func (m *Shipping_Address) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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