Documentation ¶
Index ¶
- Constants
- func NewContext(brokers *[]string, cfg *sarama.Config) context
- type Cart
- func (*Cart) Descriptor() ([]byte, []int)
- func (m *Cart) GetId() string
- func (m *Cart) GetPositions() []*Position
- func (*Cart) ProtoMessage()
- func (m *Cart) Reset()
- func (m *Cart) String() string
- func (m *Cart) XXX_DiscardUnknown()
- func (m *Cart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Cart) XXX_Merge(src proto.Message)
- func (m *Cart) XXX_Size() int
- func (m *Cart) XXX_Unmarshal(b []byte) error
- type ChangeProductQuantity
- func (*ChangeProductQuantity) Descriptor() ([]byte, []int)
- func (m *ChangeProductQuantity) GetCartID() string
- func (m *ChangeProductQuantity) GetProductID() string
- func (m *ChangeProductQuantity) GetQuantity() int64
- func (*ChangeProductQuantity) ProtoMessage()
- func (m *ChangeProductQuantity) Reset()
- func (m *ChangeProductQuantity) String() string
- func (m *ChangeProductQuantity) XXX_DiscardUnknown()
- func (m *ChangeProductQuantity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ChangeProductQuantity) XXX_Merge(src proto.Message)
- func (m *ChangeProductQuantity) XXX_Size() int
- func (m *ChangeProductQuantity) XXX_Unmarshal(b []byte) error
- type CheckoutMessages
- func (*CheckoutMessages) Descriptor() ([]byte, []int)
- func (m *CheckoutMessages) GetChangeProductQuantity() *ChangeProductQuantity
- func (m *CheckoutMessages) GetCheckoutMessage() isCheckoutMessages_CheckoutMessage
- func (m *CheckoutMessages) GetOrderCart() *OrderCart
- func (m *CheckoutMessages) GetProduct() *Product
- func (m *CheckoutMessages) GetStock() *Stock
- func (*CheckoutMessages) ProtoMessage()
- func (m *CheckoutMessages) Reset()
- func (m *CheckoutMessages) String() string
- func (m *CheckoutMessages) XXX_DiscardUnknown()
- func (m *CheckoutMessages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CheckoutMessages) XXX_Merge(src proto.Message)
- func (*CheckoutMessages) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *CheckoutMessages) XXX_Size() int
- func (m *CheckoutMessages) XXX_Unmarshal(b []byte) error
- type CheckoutMessages_ChangeProductQuantity
- type CheckoutMessages_OrderCart
- type CheckoutMessages_Product
- type CheckoutMessages_Stock
- type OrderCart
- func (*OrderCart) Descriptor() ([]byte, []int)
- func (m *OrderCart) GetCartID() string
- func (*OrderCart) ProtoMessage()
- func (m *OrderCart) Reset()
- func (m *OrderCart) String() string
- func (m *OrderCart) XXX_DiscardUnknown()
- func (m *OrderCart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *OrderCart) XXX_Merge(src proto.Message)
- func (m *OrderCart) XXX_Size() int
- func (m *OrderCart) XXX_Unmarshal(b []byte) error
- type OrderCartResonse
- func (*OrderCartResonse) Descriptor() ([]byte, []int)
- func (m *OrderCartResonse) GetSuccessful() bool
- func (*OrderCartResonse) ProtoMessage()
- func (m *OrderCartResonse) Reset()
- func (m *OrderCartResonse) String() string
- func (m *OrderCartResonse) XXX_DiscardUnknown()
- func (m *OrderCartResonse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *OrderCartResonse) XXX_Merge(src proto.Message)
- func (m *OrderCartResonse) XXX_Size() int
- func (m *OrderCartResonse) XXX_Unmarshal(b []byte) error
- type Position
- func (*Position) Descriptor() ([]byte, []int)
- func (m *Position) GetInStock() bool
- func (m *Position) GetMoreInStock() bool
- func (m *Position) GetPrice() int64
- func (m *Position) GetProductID() string
- func (m *Position) GetQuantity() int64
- func (m *Position) GetSmallImageURL() string
- func (m *Position) GetTitle() string
- func (*Position) ProtoMessage()
- func (m *Position) Reset()
- func (m *Position) String() string
- func (m *Position) XXX_DiscardUnknown()
- func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Position) XXX_Merge(src proto.Message)
- func (m *Position) XXX_Size() int
- func (m *Position) XXX_Unmarshal(b []byte) error
- type Product
- func (*Product) Descriptor() ([]byte, []int)
- func (m *Product) GetPrice() int64
- func (m *Product) GetProductID() string
- func (m *Product) GetSmallImageURL() string
- func (m *Product) GetTitle() string
- func (*Product) ProtoMessage()
- func (m *Product) Reset()
- func (m *Product) String() string
- func (m *Product) XXX_DiscardUnknown()
- func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Product) XXX_Merge(src proto.Message)
- func (m *Product) XXX_Size() int
- func (m *Product) XXX_Unmarshal(b []byte) error
- type Stock
- func (*Stock) Descriptor() ([]byte, []int)
- func (m *Stock) GetProductID() string
- func (m *Stock) GetQuantity() int64
- func (*Stock) ProtoMessage()
- func (m *Stock) Reset()
- func (m *Stock) String() string
- func (m *Stock) XXX_DiscardUnknown()
- func (m *Stock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Stock) XXX_Merge(src proto.Message)
- func (m *Stock) XXX_Size() int
- func (m *Stock) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( Topic = "checkout" Partition = 0 )
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
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) GetPositions ¶
func (*Cart) ProtoMessage ¶
func (*Cart) ProtoMessage()
func (*Cart) XXX_DiscardUnknown ¶
func (m *Cart) XXX_DiscardUnknown()
func (*Cart) XXX_Unmarshal ¶
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) ProtoMessage ¶
func (*OrderCart) ProtoMessage()
func (*OrderCart) XXX_DiscardUnknown ¶
func (m *OrderCart) XXX_DiscardUnknown()
func (*OrderCart) XXX_Marshal ¶
func (*OrderCart) XXX_Unmarshal ¶
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) GetInStock ¶
func (*Position) GetMoreInStock ¶
func (*Position) GetProductID ¶
func (*Position) GetQuantity ¶
func (*Position) GetSmallImageURL ¶
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) XXX_DiscardUnknown ¶
func (m *Position) XXX_DiscardUnknown()
func (*Position) XXX_Marshal ¶
func (*Position) XXX_Unmarshal ¶
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) GetProductID ¶
func (*Product) GetSmallImageURL ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) XXX_DiscardUnknown ¶
func (m *Product) XXX_DiscardUnknown()
func (*Product) XXX_Marshal ¶
func (*Product) XXX_Unmarshal ¶
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) GetProductID ¶
func (*Stock) GetQuantity ¶
func (*Stock) ProtoMessage ¶
func (*Stock) ProtoMessage()
func (*Stock) XXX_DiscardUnknown ¶
func (m *Stock) XXX_DiscardUnknown()
func (*Stock) XXX_Marshal ¶
func (*Stock) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.