checkout

package
v0.0.0-...-7a1ab64 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Topic     = "checkout"
	Partition = 0
)

Variables

This section is empty.

Functions

func NewContext

func NewContext(brokers *[]string, cfg *sarama.Config) context

Types

type Cart

type Cart struct {
	Id                   string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Positions            []*Position `protobuf:"bytes,2,rep,name=positions,proto3" json:"positions,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Cart) Descriptor

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

func (*Cart) GetId

func (m *Cart) GetId() string

func (*Cart) GetPositions

func (m *Cart) GetPositions() []*Position

func (*Cart) ProtoMessage

func (*Cart) ProtoMessage()

func (*Cart) Reset

func (m *Cart) Reset()

func (*Cart) String

func (m *Cart) String() string

func (*Cart) XXX_DiscardUnknown

func (m *Cart) XXX_DiscardUnknown()

func (*Cart) XXX_Marshal

func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Cart) XXX_Merge

func (dst *Cart) XXX_Merge(src proto.Message)

func (*Cart) XXX_Size

func (m *Cart) XXX_Size() int

func (*Cart) XXX_Unmarshal

func (m *Cart) XXX_Unmarshal(b []byte) error

type ChangeProductQuantity

type ChangeProductQuantity struct {
	CartID               string   `protobuf:"bytes,3,opt,name=cartID,proto3" json:"cartID,omitempty"`
	ProductID            string   `protobuf:"bytes,1,opt,name=productID,proto3" json:"productID,omitempty"`
	Quantity             int64    `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChangeProductQuantity) Descriptor

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

func (*ChangeProductQuantity) GetCartID

func (m *ChangeProductQuantity) GetCartID() string

func (*ChangeProductQuantity) GetProductID

func (m *ChangeProductQuantity) GetProductID() string

func (*ChangeProductQuantity) GetQuantity

func (m *ChangeProductQuantity) GetQuantity() int64

func (*ChangeProductQuantity) ProtoMessage

func (*ChangeProductQuantity) ProtoMessage()

func (*ChangeProductQuantity) Reset

func (m *ChangeProductQuantity) Reset()

func (*ChangeProductQuantity) String

func (m *ChangeProductQuantity) String() string

func (*ChangeProductQuantity) XXX_DiscardUnknown

func (m *ChangeProductQuantity) XXX_DiscardUnknown()

func (*ChangeProductQuantity) XXX_Marshal

func (m *ChangeProductQuantity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeProductQuantity) XXX_Merge

func (dst *ChangeProductQuantity) XXX_Merge(src proto.Message)

func (*ChangeProductQuantity) XXX_Size

func (m *ChangeProductQuantity) XXX_Size() int

func (*ChangeProductQuantity) XXX_Unmarshal

func (m *ChangeProductQuantity) XXX_Unmarshal(b []byte) error

type CheckoutMessages

type CheckoutMessages struct {
	// Types that are valid to be assigned to CheckoutMessage:
	//	*CheckoutMessages_ChangeProductQuantity
	//	*CheckoutMessages_Stock
	//	*CheckoutMessages_Product
	//	*CheckoutMessages_OrderCart
	CheckoutMessage      isCheckoutMessages_CheckoutMessage `protobuf_oneof:"checkoutMessage"`
	XXX_NoUnkeyedLiteral struct{}                           `json:"-"`
	XXX_unrecognized     []byte                             `json:"-"`
	XXX_sizecache        int32                              `json:"-"`
}

func (*CheckoutMessages) Descriptor

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

func (*CheckoutMessages) GetChangeProductQuantity

func (m *CheckoutMessages) GetChangeProductQuantity() *ChangeProductQuantity

func (*CheckoutMessages) GetCheckoutMessage

func (m *CheckoutMessages) GetCheckoutMessage() isCheckoutMessages_CheckoutMessage

func (*CheckoutMessages) GetOrderCart

func (m *CheckoutMessages) GetOrderCart() *OrderCart

func (*CheckoutMessages) GetProduct

func (m *CheckoutMessages) GetProduct() *Product

func (*CheckoutMessages) GetStock

func (m *CheckoutMessages) GetStock() *Stock

func (*CheckoutMessages) ProtoMessage

func (*CheckoutMessages) ProtoMessage()

func (*CheckoutMessages) Reset

func (m *CheckoutMessages) Reset()

func (*CheckoutMessages) String

func (m *CheckoutMessages) String() string

func (*CheckoutMessages) XXX_DiscardUnknown

func (m *CheckoutMessages) XXX_DiscardUnknown()

func (*CheckoutMessages) XXX_Marshal

func (m *CheckoutMessages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckoutMessages) XXX_Merge

func (dst *CheckoutMessages) XXX_Merge(src proto.Message)

func (*CheckoutMessages) XXX_OneofFuncs

func (*CheckoutMessages) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*CheckoutMessages) XXX_Size

func (m *CheckoutMessages) XXX_Size() int

func (*CheckoutMessages) XXX_Unmarshal

func (m *CheckoutMessages) XXX_Unmarshal(b []byte) error

type CheckoutMessages_ChangeProductQuantity

type CheckoutMessages_ChangeProductQuantity struct {
	ChangeProductQuantity *ChangeProductQuantity `protobuf:"bytes,1,opt,name=changeProductQuantity,proto3,oneof"`
}

type CheckoutMessages_OrderCart

type CheckoutMessages_OrderCart struct {
	OrderCart *OrderCart `protobuf:"bytes,4,opt,name=orderCart,proto3,oneof"`
}

type CheckoutMessages_Product

type CheckoutMessages_Product struct {
	Product *Product `protobuf:"bytes,3,opt,name=product,proto3,oneof"`
}

type CheckoutMessages_Stock

type CheckoutMessages_Stock struct {
	Stock *Stock `protobuf:"bytes,2,opt,name=stock,proto3,oneof"`
}

type OrderCart

type OrderCart struct {
	CartID               string   `protobuf:"bytes,1,opt,name=cartID,proto3" json:"cartID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OrderCart) Descriptor

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

func (*OrderCart) GetCartID

func (m *OrderCart) GetCartID() string

func (*OrderCart) ProtoMessage

func (*OrderCart) ProtoMessage()

func (*OrderCart) Reset

func (m *OrderCart) Reset()

func (*OrderCart) String

func (m *OrderCart) String() string

func (*OrderCart) XXX_DiscardUnknown

func (m *OrderCart) XXX_DiscardUnknown()

func (*OrderCart) XXX_Marshal

func (m *OrderCart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OrderCart) XXX_Merge

func (dst *OrderCart) XXX_Merge(src proto.Message)

func (*OrderCart) XXX_Size

func (m *OrderCart) XXX_Size() int

func (*OrderCart) XXX_Unmarshal

func (m *OrderCart) XXX_Unmarshal(b []byte) error

type OrderCartResonse

type OrderCartResonse struct {
	Successful           bool     `protobuf:"varint,1,opt,name=successful,proto3" json:"successful,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OrderCartResonse) Descriptor

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

func (*OrderCartResonse) GetSuccessful

func (m *OrderCartResonse) GetSuccessful() bool

func (*OrderCartResonse) ProtoMessage

func (*OrderCartResonse) ProtoMessage()

func (*OrderCartResonse) Reset

func (m *OrderCartResonse) Reset()

func (*OrderCartResonse) String

func (m *OrderCartResonse) String() string

func (*OrderCartResonse) XXX_DiscardUnknown

func (m *OrderCartResonse) XXX_DiscardUnknown()

func (*OrderCartResonse) XXX_Marshal

func (m *OrderCartResonse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OrderCartResonse) XXX_Merge

func (dst *OrderCartResonse) XXX_Merge(src proto.Message)

func (*OrderCartResonse) XXX_Size

func (m *OrderCartResonse) XXX_Size() int

func (*OrderCartResonse) XXX_Unmarshal

func (m *OrderCartResonse) XXX_Unmarshal(b []byte) error

type Position

type Position struct {
	ProductID            string   `protobuf:"bytes,1,opt,name=productID,proto3" json:"productID,omitempty"`
	Price                int64    `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"`
	Title                string   `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	SmallImageURL        string   `protobuf:"bytes,4,opt,name=smallImageURL,proto3" json:"smallImageURL,omitempty"`
	Quantity             int64    `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"`
	InStock              bool     `protobuf:"varint,7,opt,name=inStock,proto3" json:"inStock,omitempty"`
	MoreInStock          bool     `protobuf:"varint,8,opt,name=moreInStock,proto3" json:"moreInStock,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Position) Descriptor

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

func (*Position) GetInStock

func (m *Position) GetInStock() bool

func (*Position) GetMoreInStock

func (m *Position) GetMoreInStock() bool

func (*Position) GetPrice

func (m *Position) GetPrice() int64

func (*Position) GetProductID

func (m *Position) GetProductID() string

func (*Position) GetQuantity

func (m *Position) GetQuantity() int64

func (*Position) GetSmallImageURL

func (m *Position) GetSmallImageURL() string

func (*Position) GetTitle

func (m *Position) GetTitle() string

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) Reset

func (m *Position) Reset()

func (*Position) String

func (m *Position) String() string

func (*Position) XXX_DiscardUnknown

func (m *Position) XXX_DiscardUnknown()

func (*Position) XXX_Marshal

func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Position) XXX_Merge

func (dst *Position) XXX_Merge(src proto.Message)

func (*Position) XXX_Size

func (m *Position) XXX_Size() int

func (*Position) XXX_Unmarshal

func (m *Position) XXX_Unmarshal(b []byte) error

type Product

type Product struct {
	ProductID            string   `protobuf:"bytes,1,opt,name=productID,proto3" json:"productID,omitempty"`
	Price                int64    `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"`
	Title                string   `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	SmallImageURL        string   `protobuf:"bytes,4,opt,name=smallImageURL,proto3" json:"smallImageURL,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Product) Descriptor

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

func (*Product) GetPrice

func (m *Product) GetPrice() int64

func (*Product) GetProductID

func (m *Product) GetProductID() string

func (*Product) GetSmallImageURL

func (m *Product) GetSmallImageURL() string

func (*Product) GetTitle

func (m *Product) GetTitle() string

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) Reset

func (m *Product) Reset()

func (*Product) String

func (m *Product) String() string

func (*Product) XXX_DiscardUnknown

func (m *Product) XXX_DiscardUnknown()

func (*Product) XXX_Marshal

func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Product) XXX_Merge

func (dst *Product) XXX_Merge(src proto.Message)

func (*Product) XXX_Size

func (m *Product) XXX_Size() int

func (*Product) XXX_Unmarshal

func (m *Product) XXX_Unmarshal(b []byte) error

type Stock

type Stock struct {
	ProductID            string   `protobuf:"bytes,1,opt,name=productID,proto3" json:"productID,omitempty"`
	Quantity             int64    `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Stock) Descriptor

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

func (*Stock) GetProductID

func (m *Stock) GetProductID() string

func (*Stock) GetQuantity

func (m *Stock) GetQuantity() int64

func (*Stock) ProtoMessage

func (*Stock) ProtoMessage()

func (*Stock) Reset

func (m *Stock) Reset()

func (*Stock) String

func (m *Stock) String() string

func (*Stock) XXX_DiscardUnknown

func (m *Stock) XXX_DiscardUnknown()

func (*Stock) XXX_Marshal

func (m *Stock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Stock) XXX_Merge

func (dst *Stock) XXX_Merge(src proto.Message)

func (*Stock) XXX_Size

func (m *Stock) XXX_Size() int

func (*Stock) XXX_Unmarshal

func (m *Stock) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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