Documentation
¶
Overview ¶
Package shop is an eCommerce API used for publishing, listing, filtering and checkout of articles. This API is accessible through the gRPC protocol. The documentation is based on protobuf generated code.
The protobuf file can be found at: https://github.com/moapis/shop/blob/master/shop.proto. More information on gRPC: https://grpc.io/docs/. Protocol buffers: https://developers.google.com/protocol-buffers/docs/overview.
Index ¶
- Variables
- func RegisterShopServer(s *grpc.Server, srv ShopServer)
- type Article
- func (*Article) Descriptor() ([]byte, []int)deprecated
- func (x *Article) GetBaseprices() []*BasePrice
- func (x *Article) GetCategories() []*Category
- func (x *Article) GetCreated() *timestamp.Timestamp
- func (x *Article) GetDescription() string
- func (x *Article) GetId() int32
- func (x *Article) GetImages() []*Media
- func (x *Article) GetPrice() string
- func (x *Article) GetPromoted() bool
- func (x *Article) GetPublished() bool
- func (x *Article) GetTitle() string
- func (x *Article) GetToken() string
- func (x *Article) GetUpdated() *timestamp.Timestamp
- func (x *Article) GetVariants() []*Variant
- func (x *Article) GetVideos() []*Media
- func (*Article) ProtoMessage()
- func (x *Article) ProtoReflect() protoreflect.Message
- func (x *Article) Reset()
- func (x *Article) String() string
- type ArticleFields
- func (ArticleFields) Descriptor() protoreflect.EnumDescriptor
- func (x ArticleFields) Enum() *ArticleFields
- func (ArticleFields) EnumDescriptor() ([]byte, []int)deprecated
- func (x ArticleFields) Number() protoreflect.EnumNumber
- func (x ArticleFields) String() string
- func (ArticleFields) Type() protoreflect.EnumType
- type ArticleID
- type ArticleList
- type ArticleRelations
- func (*ArticleRelations) Descriptor() ([]byte, []int)deprecated
- func (x *ArticleRelations) GetBaseprices() []BasePriceFields
- func (x *ArticleRelations) GetCategories() []CategoryFields
- func (x *ArticleRelations) GetImages() []MediaFields
- func (x *ArticleRelations) GetVariants() []VariantFields
- func (x *ArticleRelations) GetVideos() []MediaFields
- func (*ArticleRelations) ProtoMessage()
- func (x *ArticleRelations) ProtoReflect() protoreflect.Message
- func (x *ArticleRelations) Reset()
- func (x *ArticleRelations) String() string
- type BasePrice
- func (*BasePrice) Descriptor() ([]byte, []int)deprecated
- func (x *BasePrice) GetCreated() *timestamp.Timestamp
- func (x *BasePrice) GetId() int32
- func (x *BasePrice) GetLabel() string
- func (x *BasePrice) GetPrice() string
- func (x *BasePrice) GetToken() string
- func (x *BasePrice) GetUpdated() *timestamp.Timestamp
- func (*BasePrice) ProtoMessage()
- func (x *BasePrice) ProtoReflect() protoreflect.Message
- func (x *BasePrice) Reset()
- func (x *BasePrice) String() string
- type BasePriceFields
- func (BasePriceFields) Descriptor() protoreflect.EnumDescriptor
- func (x BasePriceFields) Enum() *BasePriceFields
- func (BasePriceFields) EnumDescriptor() ([]byte, []int)deprecated
- func (x BasePriceFields) Number() protoreflect.EnumNumber
- func (x BasePriceFields) String() string
- func (BasePriceFields) Type() protoreflect.EnumType
- type BasePriceList
- type BasePriceListCondtions
- type Category
- func (*Category) Descriptor() ([]byte, []int)deprecated
- func (x *Category) GetCreated() *timestamp.Timestamp
- func (x *Category) GetId() int32
- func (x *Category) GetLabel() string
- func (x *Category) GetUpdated() *timestamp.Timestamp
- func (*Category) ProtoMessage()
- func (x *Category) ProtoReflect() protoreflect.Message
- func (x *Category) Reset()
- func (x *Category) String() string
- type CategoryFields
- func (CategoryFields) Descriptor() protoreflect.EnumDescriptor
- func (x CategoryFields) Enum() *CategoryFields
- func (CategoryFields) EnumDescriptor() ([]byte, []int)deprecated
- func (x CategoryFields) Number() protoreflect.EnumNumber
- func (x CategoryFields) String() string
- func (CategoryFields) Type() protoreflect.EnumType
- type CategoryList
- func (*CategoryList) Descriptor() ([]byte, []int)deprecated
- func (x *CategoryList) GetList() []*Category
- func (x *CategoryList) GetToken() string
- func (*CategoryList) ProtoMessage()
- func (x *CategoryList) ProtoReflect() protoreflect.Message
- func (x *CategoryList) Reset()
- func (x *CategoryList) String() string
- type CategoryListConditions
- func (*CategoryListConditions) Descriptor() ([]byte, []int)deprecated
- func (x *CategoryListConditions) GetOnlyPublishedArticles() bool
- func (*CategoryListConditions) ProtoMessage()
- func (x *CategoryListConditions) ProtoReflect() protoreflect.Message
- func (x *CategoryListConditions) Reset()
- func (x *CategoryListConditions) String() string
- type Deleted
- type Details
- type Limits
- type ListConditions
- func (*ListConditions) Descriptor() ([]byte, []int)deprecated
- func (x *ListConditions) GetFields() []ArticleFields
- func (x *ListConditions) GetLimits() *Limits
- func (x *ListConditions) GetOnlyCategoryId() int32
- func (x *ListConditions) GetOnlyCategoryLabel() string
- func (x *ListConditions) GetOnlyPromoted() bool
- func (x *ListConditions) GetOnlyPublished() bool
- func (x *ListConditions) GetRelations() *ArticleRelations
- func (*ListConditions) ProtoMessage()
- func (x *ListConditions) ProtoReflect() protoreflect.Message
- func (x *ListConditions) Reset()
- func (x *ListConditions) String() string
- type ListOrderConditions
- func (*ListOrderConditions) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrderConditions) GetStatus() ListOrderConditions_Status
- func (x *ListOrderConditions) GetToken() string
- func (*ListOrderConditions) ProtoMessage()
- func (x *ListOrderConditions) ProtoReflect() protoreflect.Message
- func (x *ListOrderConditions) Reset()
- func (x *ListOrderConditions) String() string
- type ListOrderConditions_Status
- func (ListOrderConditions_Status) Descriptor() protoreflect.EnumDescriptor
- func (x ListOrderConditions_Status) Enum() *ListOrderConditions_Status
- func (ListOrderConditions_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x ListOrderConditions_Status) Number() protoreflect.EnumNumber
- func (x ListOrderConditions_Status) String() string
- func (ListOrderConditions_Status) Type() protoreflect.EnumType
- type Media
- type MediaFields
- func (MediaFields) Descriptor() protoreflect.EnumDescriptor
- func (x MediaFields) Enum() *MediaFields
- func (MediaFields) EnumDescriptor() ([]byte, []int)deprecated
- func (x MediaFields) Number() protoreflect.EnumNumber
- func (x MediaFields) String() string
- func (MediaFields) Type() protoreflect.EnumType
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetEmail() string
- func (x *Message) GetId() int32
- func (x *Message) GetMessage() string
- func (x *Message) GetName() string
- func (x *Message) GetPhone() string
- func (x *Message) GetSubject() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageID
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetArticles() []*Order_ArticleAmount
- func (x *Order) GetCreated() *timestamp.Timestamp
- func (x *Order) GetEmail() string
- func (x *Order) GetFullAddress() string
- func (x *Order) GetFullName() string
- func (x *Order) GetId() int32
- func (x *Order) GetMessage() string
- func (x *Order) GetPaymentMethod() Order_PaymentMethod
- func (x *Order) GetPhone() string
- func (x *Order) GetStatus() Order_Status
- func (x *Order) GetSum() string
- func (x *Order) GetToken() string
- func (x *Order) GetUpdated() *timestamp.Timestamp
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderID
- func (*OrderID) Descriptor() ([]byte, []int)deprecated
- func (x *OrderID) GetData() string
- func (x *OrderID) GetEnvKey() string
- func (x *OrderID) GetId() int32
- func (*OrderID) ProtoMessage()
- func (x *OrderID) ProtoReflect() protoreflect.Message
- func (x *OrderID) Reset()
- func (x *OrderID) String() string
- type OrderList
- type Order_ArticleAmount
- func (*Order_ArticleAmount) Descriptor() ([]byte, []int)deprecated
- func (x *Order_ArticleAmount) GetAmount() int32
- func (x *Order_ArticleAmount) GetArticleId() int32
- func (x *Order_ArticleAmount) GetBasePriceId() int32
- func (x *Order_ArticleAmount) GetDetails() *Details
- func (x *Order_ArticleAmount) GetPrice() string
- func (x *Order_ArticleAmount) GetTitle() string
- func (x *Order_ArticleAmount) GetTotal() string
- func (x *Order_ArticleAmount) GetVariantId() int64
- func (*Order_ArticleAmount) ProtoMessage()
- func (x *Order_ArticleAmount) ProtoReflect() protoreflect.Message
- func (x *Order_ArticleAmount) Reset()
- func (x *Order_ArticleAmount) String() string
- type Order_PaymentMethod
- func (Order_PaymentMethod) Descriptor() protoreflect.EnumDescriptor
- func (x Order_PaymentMethod) Enum() *Order_PaymentMethod
- func (Order_PaymentMethod) EnumDescriptor() ([]byte, []int)deprecated
- func (x Order_PaymentMethod) Number() protoreflect.EnumNumber
- func (x Order_PaymentMethod) String() string
- func (Order_PaymentMethod) Type() protoreflect.EnumType
- type Order_Status
- func (Order_Status) Descriptor() protoreflect.EnumDescriptor
- func (x Order_Status) Enum() *Order_Status
- func (Order_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Order_Status) Number() protoreflect.EnumNumber
- func (x Order_Status) String() string
- func (Order_Status) Type() protoreflect.EnumType
- type ShopClient
- type ShopServer
- type SuggestionList
- func (*SuggestionList) Descriptor() ([]byte, []int)deprecated
- func (x *SuggestionList) GetArticle() []*Article
- func (x *SuggestionList) GetCategory() []*Category
- func (*SuggestionList) ProtoMessage()
- func (x *SuggestionList) ProtoReflect() protoreflect.Message
- func (x *SuggestionList) Reset()
- func (x *SuggestionList) String() string
- type TextSearch
- type UnimplementedShopServer
- func (*UnimplementedShopServer) Checkout(context.Context, *Order) (*OrderID, error)
- func (*UnimplementedShopServer) DeleteArticle(context.Context, *ArticleID) (*Deleted, error)
- func (*UnimplementedShopServer) DeleteBasePrice(context.Context, *BasePrice) (*Deleted, error)
- func (*UnimplementedShopServer) ListArticles(context.Context, *ListConditions) (*ArticleList, error)
- func (*UnimplementedShopServer) ListBasesPrices(context.Context, *BasePriceListCondtions) (*BasePriceList, error)
- func (*UnimplementedShopServer) ListCategories(context.Context, *CategoryListConditions) (*CategoryList, error)
- func (*UnimplementedShopServer) ListOrders(context.Context, *ListOrderConditions) (*OrderList, error)
- func (*UnimplementedShopServer) SaveArticle(context.Context, *Article) (*ArticleID, error)
- func (*UnimplementedShopServer) SaveBasePrice(context.Context, *BasePrice) (*BasePrice, error)
- func (*UnimplementedShopServer) SaveCategories(context.Context, *CategoryList) (*CategoryList, error)
- func (*UnimplementedShopServer) SaveOrder(context.Context, *Order) (*OrderID, error)
- func (*UnimplementedShopServer) SearchArticles(context.Context, *TextSearch) (*ArticleList, error)
- func (*UnimplementedShopServer) SendMessage(context.Context, *Message) (*MessageID, error)
- func (*UnimplementedShopServer) Suggest(context.Context, *TextSearch) (*SuggestionList, error)
- func (*UnimplementedShopServer) ViewArticle(context.Context, *ArticleID) (*Article, error)
- type Variant
- func (*Variant) Descriptor() ([]byte, []int)deprecated
- func (x *Variant) GetCreated() *timestamp.Timestamp
- func (x *Variant) GetId() int64
- func (x *Variant) GetLabels() []string
- func (x *Variant) GetMultiplier() string
- func (x *Variant) GetUpdated() *timestamp.Timestamp
- func (*Variant) ProtoMessage()
- func (x *Variant) ProtoReflect() protoreflect.Message
- func (x *Variant) Reset()
- func (x *Variant) String() string
- type VariantFields
- func (VariantFields) Descriptor() protoreflect.EnumDescriptor
- func (x VariantFields) Enum() *VariantFields
- func (VariantFields) EnumDescriptor() ([]byte, []int)deprecated
- func (x VariantFields) Number() protoreflect.EnumNumber
- func (x VariantFields) String() string
- func (VariantFields) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( MediaFields_name = map[int32]string{ 0: "MD_ALL", 1: "MD_ID", 2: "MD_LABEL", 3: "MD_URL", } MediaFields_value = map[string]int32{ "MD_ALL": 0, "MD_ID": 1, "MD_LABEL": 2, "MD_URL": 3, } )
Enum value maps for MediaFields.
var ( BasePriceFields_name = map[int32]string{ 0: "BP_ALL", 1: "BP_ID", 2: "BP_CREATED", 3: "BP_UPDATED", 4: "BP_LABEL", 5: "BP_PRICE", } BasePriceFields_value = map[string]int32{ "BP_ALL": 0, "BP_ID": 1, "BP_CREATED": 2, "BP_UPDATED": 3, "BP_LABEL": 4, "BP_PRICE": 5, } )
Enum value maps for BasePriceFields.
var ( VariantFields_name = map[int32]string{ 0: "VRT_ALL", 1: "VRT_ID", 2: "VRT_CREATED", 3: "VRT_UPDATED", 4: "VRT_LABELS", 5: "VRT_MULTIPLIER", } VariantFields_value = map[string]int32{ "VRT_ALL": 0, "VRT_ID": 1, "VRT_CREATED": 2, "VRT_UPDATED": 3, "VRT_LABELS": 4, "VRT_MULTIPLIER": 5, } )
Enum value maps for VariantFields.
var ( ArticleFields_name = map[int32]string{ 0: "ALL", 1: "ID", 2: "CREATED", 3: "UPDATED", 4: "PUBLISHED", 5: "TITLE", 6: "DESCRIPTION", 7: "PRICE", 11: "PROMOTED", } ArticleFields_value = map[string]int32{ "ALL": 0, "ID": 1, "CREATED": 2, "UPDATED": 3, "PUBLISHED": 4, "TITLE": 5, "DESCRIPTION": 6, "PRICE": 7, "PROMOTED": 11, } )
Enum value maps for ArticleFields.
var ( CategoryFields_name = map[int32]string{ 0: "CAT_ALL", 1: "CAT_ID", 2: "CAT_CREATED", 3: "CAT_UPDATED", 4: "CAT_LABEL", } CategoryFields_value = map[string]int32{ "CAT_ALL": 0, "CAT_ID": 1, "CAT_CREATED": 2, "CAT_UPDATED": 3, "CAT_LABEL": 4, } )
Enum value maps for CategoryFields.
var ( Order_PaymentMethod_name = map[int32]string{ 0: "CASH_ON_DELIVERY", 1: "BANK_TRANSFER", 2: "ONLINE", } Order_PaymentMethod_value = map[string]int32{ "CASH_ON_DELIVERY": 0, "BANK_TRANSFER": 1, "ONLINE": 2, } )
Enum value maps for Order_PaymentMethod.
var ( Order_Status_name = map[int32]string{ 0: "OPEN", 1: "SENT", 2: "COMPLETED", } Order_Status_value = map[string]int32{ "OPEN": 0, "SENT": 1, "COMPLETED": 2, } )
Enum value maps for Order_Status.
var ( ListOrderConditions_Status_name = map[int32]string{ 0: "ANY", 1: "OPEN", 2: "SENT", 3: "COMPLETED", } ListOrderConditions_Status_value = map[string]int32{ "ANY": 0, "OPEN": 1, "SENT": 2, "COMPLETED": 3, } )
Enum value maps for ListOrderConditions_Status.
var File_shop_proto protoreflect.FileDescriptor
Functions ¶
func RegisterShopServer ¶
func RegisterShopServer(s *grpc.Server, srv ShopServer)
Types ¶
type Article ¶
type Article struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Created *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` // Read only
Updated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"` // Read only
Published bool `protobuf:"varint,4,opt,name=published,proto3" json:"published,omitempty"`
Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
Price string `protobuf:"bytes,7,opt,name=price,proto3" json:"price,omitempty"`
Images []*Media `protobuf:"bytes,8,rep,name=images,proto3" json:"images,omitempty"`
Videos []*Media `protobuf:"bytes,9,rep,name=videos,proto3" json:"videos,omitempty"`
Token string `protobuf:"bytes,10,opt,name=token,proto3" json:"token,omitempty"` // Write only
Promoted bool `protobuf:"varint,11,opt,name=promoted,proto3" json:"promoted,omitempty"`
Categories []*Category `protobuf:"bytes,12,rep,name=categories,proto3" json:"categories,omitempty"`
Baseprices []*BasePrice `protobuf:"bytes,13,rep,name=baseprices,proto3" json:"baseprices,omitempty"`
Variants []*Variant `protobuf:"bytes,14,rep,name=variants,proto3" json:"variants,omitempty"`
// contains filtered or unexported fields
}
func (*Article) Descriptor
deprecated
func (*Article) GetBaseprices ¶ added in v0.2.0
func (*Article) GetCategories ¶ added in v0.1.1
func (*Article) GetCreated ¶
func (*Article) GetDescription ¶
func (*Article) GetPromoted ¶
func (*Article) GetPublished ¶
func (*Article) GetUpdated ¶
func (*Article) GetVariants ¶ added in v0.2.0
func (*Article) ProtoMessage ¶
func (*Article) ProtoMessage()
func (*Article) ProtoReflect ¶ added in v0.4.1
func (x *Article) ProtoReflect() protoreflect.Message
type ArticleFields ¶ added in v0.2.0
type ArticleFields int32
ArticleFields maps fields to database columns for requests.
const ( ArticleFields_ALL ArticleFields = 0 ArticleFields_ID ArticleFields = 1 ArticleFields_CREATED ArticleFields = 2 ArticleFields_UPDATED ArticleFields = 3 ArticleFields_PUBLISHED ArticleFields = 4 ArticleFields_TITLE ArticleFields = 5 ArticleFields_DESCRIPTION ArticleFields = 6 ArticleFields_PRICE ArticleFields = 7 ArticleFields_PROMOTED ArticleFields = 11 )
func (ArticleFields) Descriptor ¶ added in v0.4.1
func (ArticleFields) Descriptor() protoreflect.EnumDescriptor
func (ArticleFields) Enum ¶ added in v0.4.1
func (x ArticleFields) Enum() *ArticleFields
func (ArticleFields) EnumDescriptor
deprecated
added in
v0.2.0
func (ArticleFields) EnumDescriptor() ([]byte, []int)
Deprecated: Use ArticleFields.Descriptor instead.
func (ArticleFields) Number ¶ added in v0.4.1
func (x ArticleFields) Number() protoreflect.EnumNumber
func (ArticleFields) String ¶ added in v0.2.0
func (x ArticleFields) String() string
func (ArticleFields) Type ¶ added in v0.4.1
func (ArticleFields) Type() protoreflect.EnumType
type ArticleID ¶
type ArticleID struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // Delete article requirement
// contains filtered or unexported fields
}
func (*ArticleID) Descriptor
deprecated
func (*ArticleID) ProtoMessage ¶
func (*ArticleID) ProtoMessage()
func (*ArticleID) ProtoReflect ¶ added in v0.4.1
func (x *ArticleID) ProtoReflect() protoreflect.Message
type ArticleList ¶
type ArticleList struct {
List []*Article `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
func (*ArticleList) Descriptor
deprecated
func (*ArticleList) Descriptor() ([]byte, []int)
Deprecated: Use ArticleList.ProtoReflect.Descriptor instead.
func (*ArticleList) GetList ¶
func (x *ArticleList) GetList() []*Article
func (*ArticleList) ProtoMessage ¶
func (*ArticleList) ProtoMessage()
func (*ArticleList) ProtoReflect ¶ added in v0.4.1
func (x *ArticleList) ProtoReflect() protoreflect.Message
func (*ArticleList) Reset ¶
func (x *ArticleList) Reset()
func (*ArticleList) String ¶
func (x *ArticleList) String() string
type ArticleRelations ¶ added in v0.2.0
type ArticleRelations struct {
Images []MediaFields `protobuf:"varint,1,rep,packed,name=images,proto3,enum=shop.MediaFields" json:"images,omitempty"`
Videos []MediaFields `protobuf:"varint,2,rep,packed,name=videos,proto3,enum=shop.MediaFields" json:"videos,omitempty"`
Categories []CategoryFields `protobuf:"varint,3,rep,packed,name=categories,proto3,enum=shop.CategoryFields" json:"categories,omitempty"`
Baseprices []BasePriceFields `protobuf:"varint,4,rep,packed,name=baseprices,proto3,enum=shop.BasePriceFields" json:"baseprices,omitempty"`
Variants []VariantFields `protobuf:"varint,5,rep,packed,name=variants,proto3,enum=shop.VariantFields" json:"variants,omitempty"`
// contains filtered or unexported fields
}
ArticleRelations specify which relations should be loaded. Each relation in this message is an array of fields. So for each specified relation, the requested fields will be selected. Empty relations are not loaded. Use the *_ALL constant for a relation to return all available fields.
func (*ArticleRelations) Descriptor
deprecated
added in
v0.2.0
func (*ArticleRelations) Descriptor() ([]byte, []int)
Deprecated: Use ArticleRelations.ProtoReflect.Descriptor instead.
func (*ArticleRelations) GetBaseprices ¶ added in v0.2.0
func (x *ArticleRelations) GetBaseprices() []BasePriceFields
func (*ArticleRelations) GetCategories ¶ added in v0.2.0
func (x *ArticleRelations) GetCategories() []CategoryFields
func (*ArticleRelations) GetImages ¶ added in v0.2.0
func (x *ArticleRelations) GetImages() []MediaFields
func (*ArticleRelations) GetVariants ¶ added in v0.2.0
func (x *ArticleRelations) GetVariants() []VariantFields
func (*ArticleRelations) GetVideos ¶ added in v0.2.0
func (x *ArticleRelations) GetVideos() []MediaFields
func (*ArticleRelations) ProtoMessage ¶ added in v0.2.0
func (*ArticleRelations) ProtoMessage()
func (*ArticleRelations) ProtoReflect ¶ added in v0.4.1
func (x *ArticleRelations) ProtoReflect() protoreflect.Message
func (*ArticleRelations) Reset ¶ added in v0.2.0
func (x *ArticleRelations) Reset()
func (*ArticleRelations) String ¶ added in v0.2.0
func (x *ArticleRelations) String() string
type BasePrice ¶ added in v0.2.0
type BasePrice struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Created *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` // Read only
Updated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"` // Read only
Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
Price string `protobuf:"bytes,5,opt,name=price,proto3" json:"price,omitempty"` // numeric
Token string `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"` // Admin write access requirement
// contains filtered or unexported fields
}
BasePrice is an article's base price for dynamic calculation
func (*BasePrice) Descriptor
deprecated
added in
v0.2.0
func (*BasePrice) GetCreated ¶ added in v0.2.0
func (*BasePrice) GetUpdated ¶ added in v0.2.0
func (*BasePrice) ProtoMessage ¶ added in v0.2.0
func (*BasePrice) ProtoMessage()
func (*BasePrice) ProtoReflect ¶ added in v0.4.1
func (x *BasePrice) ProtoReflect() protoreflect.Message
type BasePriceFields ¶ added in v0.2.0
type BasePriceFields int32
BasePriceFields maps fields to database columns for requests.
const ( BasePriceFields_BP_ALL BasePriceFields = 0 BasePriceFields_BP_ID BasePriceFields = 1 BasePriceFields_BP_CREATED BasePriceFields = 2 BasePriceFields_BP_UPDATED BasePriceFields = 3 BasePriceFields_BP_LABEL BasePriceFields = 4 BasePriceFields_BP_PRICE BasePriceFields = 5 )
func (BasePriceFields) Descriptor ¶ added in v0.4.1
func (BasePriceFields) Descriptor() protoreflect.EnumDescriptor
func (BasePriceFields) Enum ¶ added in v0.4.1
func (x BasePriceFields) Enum() *BasePriceFields
func (BasePriceFields) EnumDescriptor
deprecated
added in
v0.2.0
func (BasePriceFields) EnumDescriptor() ([]byte, []int)
Deprecated: Use BasePriceFields.Descriptor instead.
func (BasePriceFields) Number ¶ added in v0.4.1
func (x BasePriceFields) Number() protoreflect.EnumNumber
func (BasePriceFields) String ¶ added in v0.2.0
func (x BasePriceFields) String() string
func (BasePriceFields) Type ¶ added in v0.4.1
func (BasePriceFields) Type() protoreflect.EnumType
type BasePriceList ¶ added in v0.2.0
type BasePriceList struct {
List []*BasePrice `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
func (*BasePriceList) Descriptor
deprecated
added in
v0.2.0
func (*BasePriceList) Descriptor() ([]byte, []int)
Deprecated: Use BasePriceList.ProtoReflect.Descriptor instead.
func (*BasePriceList) GetList ¶ added in v0.2.0
func (x *BasePriceList) GetList() []*BasePrice
func (*BasePriceList) ProtoMessage ¶ added in v0.2.0
func (*BasePriceList) ProtoMessage()
func (*BasePriceList) ProtoReflect ¶ added in v0.4.1
func (x *BasePriceList) ProtoReflect() protoreflect.Message
func (*BasePriceList) Reset ¶ added in v0.2.0
func (x *BasePriceList) Reset()
func (*BasePriceList) String ¶ added in v0.2.0
func (x *BasePriceList) String() string
type BasePriceListCondtions ¶ added in v0.2.0
type BasePriceListCondtions struct {
// contains filtered or unexported fields
}
func (*BasePriceListCondtions) Descriptor
deprecated
added in
v0.2.0
func (*BasePriceListCondtions) Descriptor() ([]byte, []int)
Deprecated: Use BasePriceListCondtions.ProtoReflect.Descriptor instead.
func (*BasePriceListCondtions) ProtoMessage ¶ added in v0.2.0
func (*BasePriceListCondtions) ProtoMessage()
func (*BasePriceListCondtions) ProtoReflect ¶ added in v0.4.1
func (x *BasePriceListCondtions) ProtoReflect() protoreflect.Message
func (*BasePriceListCondtions) Reset ¶ added in v0.2.0
func (x *BasePriceListCondtions) Reset()
func (*BasePriceListCondtions) String ¶ added in v0.2.0
func (x *BasePriceListCondtions) String() string
type Category ¶ added in v0.1.1
type Category struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Upsert identification, do not modify. Leave 0 for new categories.
Created *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` // Read only
Updated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"` // Read only
Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
// contains filtered or unexported fields
}
func (*Category) Descriptor
deprecated
added in
v0.1.1
func (*Category) GetCreated ¶ added in v0.1.1
func (*Category) GetUpdated ¶ added in v0.1.1
func (*Category) ProtoMessage ¶ added in v0.1.1
func (*Category) ProtoMessage()
func (*Category) ProtoReflect ¶ added in v0.4.1
func (x *Category) ProtoReflect() protoreflect.Message
type CategoryFields ¶ added in v0.2.0
type CategoryFields int32
const ( CategoryFields_CAT_ALL CategoryFields = 0 CategoryFields_CAT_ID CategoryFields = 1 CategoryFields_CAT_CREATED CategoryFields = 2 CategoryFields_CAT_UPDATED CategoryFields = 3 CategoryFields_CAT_LABEL CategoryFields = 4 )
func (CategoryFields) Descriptor ¶ added in v0.4.1
func (CategoryFields) Descriptor() protoreflect.EnumDescriptor
func (CategoryFields) Enum ¶ added in v0.4.1
func (x CategoryFields) Enum() *CategoryFields
func (CategoryFields) EnumDescriptor
deprecated
added in
v0.2.0
func (CategoryFields) EnumDescriptor() ([]byte, []int)
Deprecated: Use CategoryFields.Descriptor instead.
func (CategoryFields) Number ¶ added in v0.4.1
func (x CategoryFields) Number() protoreflect.EnumNumber
func (CategoryFields) String ¶ added in v0.2.0
func (x CategoryFields) String() string
func (CategoryFields) Type ¶ added in v0.4.1
func (CategoryFields) Type() protoreflect.EnumType
type CategoryList ¶ added in v0.1.1
type CategoryList struct {
List []*Category `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // Admin write access requirement
// contains filtered or unexported fields
}
CategoryList holds an ordered list of Categories.
func (*CategoryList) Descriptor
deprecated
added in
v0.1.1
func (*CategoryList) Descriptor() ([]byte, []int)
Deprecated: Use CategoryList.ProtoReflect.Descriptor instead.
func (*CategoryList) GetList ¶ added in v0.1.1
func (x *CategoryList) GetList() []*Category
func (*CategoryList) GetToken ¶ added in v0.1.1
func (x *CategoryList) GetToken() string
func (*CategoryList) ProtoMessage ¶ added in v0.1.1
func (*CategoryList) ProtoMessage()
func (*CategoryList) ProtoReflect ¶ added in v0.4.1
func (x *CategoryList) ProtoReflect() protoreflect.Message
func (*CategoryList) Reset ¶ added in v0.1.1
func (x *CategoryList) Reset()
func (*CategoryList) String ¶ added in v0.1.1
func (x *CategoryList) String() string
type CategoryListConditions ¶ added in v0.1.1
type CategoryListConditions struct {
OnlyPublishedArticles bool `` // Only return categories that have published articles.
/* 127-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*CategoryListConditions) Descriptor
deprecated
added in
v0.1.1
func (*CategoryListConditions) Descriptor() ([]byte, []int)
Deprecated: Use CategoryListConditions.ProtoReflect.Descriptor instead.
func (*CategoryListConditions) GetOnlyPublishedArticles ¶ added in v0.1.1
func (x *CategoryListConditions) GetOnlyPublishedArticles() bool
func (*CategoryListConditions) ProtoMessage ¶ added in v0.1.1
func (*CategoryListConditions) ProtoMessage()
func (*CategoryListConditions) ProtoReflect ¶ added in v0.4.1
func (x *CategoryListConditions) ProtoReflect() protoreflect.Message
func (*CategoryListConditions) Reset ¶ added in v0.1.1
func (x *CategoryListConditions) Reset()
func (*CategoryListConditions) String ¶ added in v0.1.1
func (x *CategoryListConditions) String() string
type Deleted ¶
type Deleted struct {
Rows int64 `protobuf:"varint,1,opt,name=rows,proto3" json:"rows,omitempty"`
// contains filtered or unexported fields
}
func (*Deleted) Descriptor
deprecated
func (*Deleted) ProtoMessage ¶
func (*Deleted) ProtoMessage()
func (*Deleted) ProtoReflect ¶ added in v0.4.1
func (x *Deleted) ProtoReflect() protoreflect.Message
type Details ¶ added in v0.2.0
type Details struct {
BasePrice *BasePrice `protobuf:"bytes,1,opt,name=base_price,json=basePrice,proto3" json:"base_price,omitempty"`
Variant *Variant `protobuf:"bytes,2,opt,name=variant,proto3" json:"variant,omitempty"`
// contains filtered or unexported fields
}
func (*Details) Descriptor
deprecated
added in
v0.2.0
func (*Details) GetBasePrice ¶ added in v0.2.0
func (*Details) GetVariant ¶ added in v0.2.0
func (*Details) ProtoMessage ¶ added in v0.2.0
func (*Details) ProtoMessage()
func (*Details) ProtoReflect ¶ added in v0.4.1
func (x *Details) ProtoReflect() protoreflect.Message
type Limits ¶ added in v0.4.1
type Limits struct {
Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
// contains filtered or unexported fields
}
Limits sets limit and offset to any list query If the limit field is set to zero, the server can apply a default limit.
func (*Limits) Descriptor
deprecated
added in
v0.4.1
func (*Limits) ProtoMessage ¶ added in v0.4.1
func (*Limits) ProtoMessage()
func (*Limits) ProtoReflect ¶ added in v0.4.1
func (x *Limits) ProtoReflect() protoreflect.Message
type ListConditions ¶
type ListConditions struct {
OnlyPublished bool `protobuf:"varint,1,opt,name=only_published,json=onlyPublished,proto3" json:"only_published,omitempty"`
OnlyPromoted bool `protobuf:"varint,2,opt,name=only_promoted,json=onlyPromoted,proto3" json:"only_promoted,omitempty"`
OnlyCategoryId int32 `protobuf:"varint,4,opt,name=only_category_id,json=onlyCategoryId,proto3" json:"only_category_id,omitempty"`
OnlyCategoryLabel string `protobuf:"bytes,5,opt,name=only_category_label,json=onlyCategoryLabel,proto3" json:"only_category_label,omitempty"`
Fields []ArticleFields `protobuf:"varint,6,rep,packed,name=fields,proto3,enum=shop.ArticleFields" json:"fields,omitempty"` // Which columns to select. Empty selects all columns.
Relations *ArticleRelations `protobuf:"bytes,7,opt,name=relations,proto3" json:"relations,omitempty"` // Which relations to load. Empty will load only images.
Limits *Limits `protobuf:"bytes,8,opt,name=limits,proto3" json:"limits,omitempty"`
// contains filtered or unexported fields
}
ListConditions are the conditions against which the article list is filtered. The conitions are aplied as AND. For example:
&ListCondions{
OnlyPublished: true,
OnlyCategoryLabel: "foo",
}
Will result in articles that are published and have a category label of "foo".
Conditions are ignored when in their default value. Meaning articles with any state for that field is returned.
func (*ListConditions) Descriptor
deprecated
func (*ListConditions) Descriptor() ([]byte, []int)
Deprecated: Use ListConditions.ProtoReflect.Descriptor instead.
func (*ListConditions) GetFields ¶ added in v0.2.0
func (x *ListConditions) GetFields() []ArticleFields
func (*ListConditions) GetLimits ¶ added in v0.4.1
func (x *ListConditions) GetLimits() *Limits
func (*ListConditions) GetOnlyCategoryId ¶ added in v0.1.1
func (x *ListConditions) GetOnlyCategoryId() int32
func (*ListConditions) GetOnlyCategoryLabel ¶ added in v0.1.1
func (x *ListConditions) GetOnlyCategoryLabel() string
func (*ListConditions) GetOnlyPromoted ¶
func (x *ListConditions) GetOnlyPromoted() bool
func (*ListConditions) GetOnlyPublished ¶
func (x *ListConditions) GetOnlyPublished() bool
func (*ListConditions) GetRelations ¶ added in v0.2.0
func (x *ListConditions) GetRelations() *ArticleRelations
func (*ListConditions) ProtoMessage ¶
func (*ListConditions) ProtoMessage()
func (*ListConditions) ProtoReflect ¶ added in v0.4.1
func (x *ListConditions) ProtoReflect() protoreflect.Message
func (*ListConditions) Reset ¶
func (x *ListConditions) Reset()
func (*ListConditions) String ¶
func (x *ListConditions) String() string
type ListOrderConditions ¶
type ListOrderConditions struct {
Status ListOrderConditions_Status `protobuf:"varint,1,opt,name=status,proto3,enum=shop.ListOrderConditions_Status" json:"status,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
// contains filtered or unexported fields
}
func (*ListOrderConditions) Descriptor
deprecated
func (*ListOrderConditions) Descriptor() ([]byte, []int)
Deprecated: Use ListOrderConditions.ProtoReflect.Descriptor instead.
func (*ListOrderConditions) GetStatus ¶
func (x *ListOrderConditions) GetStatus() ListOrderConditions_Status
func (*ListOrderConditions) GetToken ¶ added in v0.2.0
func (x *ListOrderConditions) GetToken() string
func (*ListOrderConditions) ProtoMessage ¶
func (*ListOrderConditions) ProtoMessage()
func (*ListOrderConditions) ProtoReflect ¶ added in v0.4.1
func (x *ListOrderConditions) ProtoReflect() protoreflect.Message
func (*ListOrderConditions) Reset ¶
func (x *ListOrderConditions) Reset()
func (*ListOrderConditions) String ¶
func (x *ListOrderConditions) String() string
type ListOrderConditions_Status ¶
type ListOrderConditions_Status int32
const ( ListOrderConditions_ANY ListOrderConditions_Status = 0 ListOrderConditions_OPEN ListOrderConditions_Status = 1 ListOrderConditions_SENT ListOrderConditions_Status = 2 ListOrderConditions_COMPLETED ListOrderConditions_Status = 3 )
func (ListOrderConditions_Status) Descriptor ¶ added in v0.4.1
func (ListOrderConditions_Status) Descriptor() protoreflect.EnumDescriptor
func (ListOrderConditions_Status) Enum ¶ added in v0.4.1
func (x ListOrderConditions_Status) Enum() *ListOrderConditions_Status
func (ListOrderConditions_Status) EnumDescriptor
deprecated
func (ListOrderConditions_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use ListOrderConditions_Status.Descriptor instead.
func (ListOrderConditions_Status) Number ¶ added in v0.4.1
func (x ListOrderConditions_Status) Number() protoreflect.EnumNumber
func (ListOrderConditions_Status) String ¶
func (x ListOrderConditions_Status) String() string
func (ListOrderConditions_Status) Type ¶ added in v0.4.1
func (ListOrderConditions_Status) Type() protoreflect.EnumType
type Media ¶
type Media struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
// contains filtered or unexported fields
}
func (*Media) Descriptor
deprecated
func (*Media) ProtoMessage ¶
func (*Media) ProtoMessage()
func (*Media) ProtoReflect ¶ added in v0.4.1
func (x *Media) ProtoReflect() protoreflect.Message
type MediaFields ¶ added in v0.2.0
type MediaFields int32
MediaFields maps fields to database columns for requests.
const ( MediaFields_MD_ALL MediaFields = 0 MediaFields_MD_ID MediaFields = 1 MediaFields_MD_LABEL MediaFields = 2 MediaFields_MD_URL MediaFields = 3 )
func (MediaFields) Descriptor ¶ added in v0.4.1
func (MediaFields) Descriptor() protoreflect.EnumDescriptor
func (MediaFields) Enum ¶ added in v0.4.1
func (x MediaFields) Enum() *MediaFields
func (MediaFields) EnumDescriptor
deprecated
added in
v0.2.0
func (MediaFields) EnumDescriptor() ([]byte, []int)
Deprecated: Use MediaFields.Descriptor instead.
func (MediaFields) Number ¶ added in v0.4.1
func (x MediaFields) Number() protoreflect.EnumNumber
func (MediaFields) String ¶ added in v0.2.0
func (x MediaFields) String() string
func (MediaFields) Type ¶ added in v0.4.1
func (MediaFields) Type() protoreflect.EnumType
type Message ¶ added in v0.4.1
type Message struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Read-only
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Required
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // Required
Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` // Optional
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // Optional
Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` // Required
// contains filtered or unexported fields
}
func (*Message) Descriptor
deprecated
added in
v0.4.1
func (*Message) GetMessage ¶ added in v0.4.1
func (*Message) GetSubject ¶ added in v0.4.1
func (*Message) ProtoMessage ¶ added in v0.4.1
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶ added in v0.4.1
func (x *Message) ProtoReflect() protoreflect.Message
type MessageID ¶ added in v0.4.1
type MessageID struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*MessageID) Descriptor
deprecated
added in
v0.4.1
func (*MessageID) ProtoMessage ¶ added in v0.4.1
func (*MessageID) ProtoMessage()
func (*MessageID) ProtoReflect ¶ added in v0.4.1
func (x *MessageID) ProtoReflect() protoreflect.Message
type Order ¶
type Order struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Created *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` // Read only
Updated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"` // Read only
FullName string `protobuf:"bytes,4,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
Phone string `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"`
FullAddress string `protobuf:"bytes,7,opt,name=full_address,json=fullAddress,proto3" json:"full_address,omitempty"`
Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"`
PaymentMethod Order_PaymentMethod `` /* 131-byte string literal not displayed */
Status Order_Status `protobuf:"varint,10,opt,name=status,proto3,enum=shop.Order_Status" json:"status,omitempty"` // Admin write access only
Articles []*Order_ArticleAmount `protobuf:"bytes,11,rep,name=articles,proto3" json:"articles,omitempty"`
Sum string `protobuf:"bytes,12,opt,name=sum,proto3" json:"sum,omitempty"` // Read Only; sum of all line totals
Token string `protobuf:"bytes,13,opt,name=token,proto3" json:"token,omitempty"` // Admin write access requirement
// contains filtered or unexported fields
}
func (*Order) Descriptor
deprecated
func (*Order) GetArticles ¶
func (x *Order) GetArticles() []*Order_ArticleAmount
func (*Order) GetCreated ¶
func (*Order) GetFullAddress ¶
func (*Order) GetFullName ¶
func (*Order) GetMessage ¶
func (*Order) GetPaymentMethod ¶
func (x *Order) GetPaymentMethod() Order_PaymentMethod
func (*Order) GetStatus ¶
func (x *Order) GetStatus() Order_Status
func (*Order) GetUpdated ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶ added in v0.4.1
func (x *Order) ProtoReflect() protoreflect.Message
type OrderID ¶
type OrderID struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
EnvKey string `protobuf:"bytes,2,opt,name=env_key,json=envKey,proto3" json:"env_key,omitempty"`
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*OrderID) Descriptor
deprecated
func (*OrderID) ProtoMessage ¶
func (*OrderID) ProtoMessage()
func (*OrderID) ProtoReflect ¶ added in v0.4.1
func (x *OrderID) ProtoReflect() protoreflect.Message
type OrderList ¶
type OrderList struct {
List []*Order `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
func (*OrderList) Descriptor
deprecated
func (*OrderList) ProtoMessage ¶
func (*OrderList) ProtoMessage()
func (*OrderList) ProtoReflect ¶ added in v0.4.1
func (x *OrderList) ProtoReflect() protoreflect.Message
type Order_ArticleAmount ¶
type Order_ArticleAmount struct {
ArticleId int32 `protobuf:"varint,1,opt,name=article_id,json=articleId,proto3" json:"article_id,omitempty"`
Amount int32 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // Read only
Price string `protobuf:"bytes,4,opt,name=price,proto3" json:"price,omitempty"` // Read only
Total string `protobuf:"bytes,5,opt,name=total,proto3" json:"total,omitempty"` // Read only; line total of Price*Amount
Details *Details `protobuf:"bytes,6,opt,name=details,proto3" json:"details,omitempty"` // Read only
BasePriceId int32 `protobuf:"varint,7,opt,name=base_price_id,json=basePriceId,proto3" json:"base_price_id,omitempty"` // Checkout write only
VariantId int64 `protobuf:"varint,8,opt,name=variant_id,json=variantId,proto3" json:"variant_id,omitempty"` // Checkout write only
// contains filtered or unexported fields
}
func (*Order_ArticleAmount) Descriptor
deprecated
func (*Order_ArticleAmount) Descriptor() ([]byte, []int)
Deprecated: Use Order_ArticleAmount.ProtoReflect.Descriptor instead.
func (*Order_ArticleAmount) GetAmount ¶
func (x *Order_ArticleAmount) GetAmount() int32
func (*Order_ArticleAmount) GetArticleId ¶
func (x *Order_ArticleAmount) GetArticleId() int32
func (*Order_ArticleAmount) GetBasePriceId ¶ added in v0.2.0
func (x *Order_ArticleAmount) GetBasePriceId() int32
func (*Order_ArticleAmount) GetDetails ¶ added in v0.1.1
func (x *Order_ArticleAmount) GetDetails() *Details
func (*Order_ArticleAmount) GetPrice ¶
func (x *Order_ArticleAmount) GetPrice() string
func (*Order_ArticleAmount) GetTitle ¶
func (x *Order_ArticleAmount) GetTitle() string
func (*Order_ArticleAmount) GetTotal ¶
func (x *Order_ArticleAmount) GetTotal() string
func (*Order_ArticleAmount) GetVariantId ¶ added in v0.2.0
func (x *Order_ArticleAmount) GetVariantId() int64
func (*Order_ArticleAmount) ProtoMessage ¶
func (*Order_ArticleAmount) ProtoMessage()
func (*Order_ArticleAmount) ProtoReflect ¶ added in v0.4.1
func (x *Order_ArticleAmount) ProtoReflect() protoreflect.Message
func (*Order_ArticleAmount) Reset ¶
func (x *Order_ArticleAmount) Reset()
func (*Order_ArticleAmount) String ¶
func (x *Order_ArticleAmount) String() string
type Order_PaymentMethod ¶
type Order_PaymentMethod int32
const ( Order_CASH_ON_DELIVERY Order_PaymentMethod = 0 Order_BANK_TRANSFER Order_PaymentMethod = 1 Order_ONLINE Order_PaymentMethod = 2 // Not yet implemented )
func (Order_PaymentMethod) Descriptor ¶ added in v0.4.1
func (Order_PaymentMethod) Descriptor() protoreflect.EnumDescriptor
func (Order_PaymentMethod) Enum ¶ added in v0.4.1
func (x Order_PaymentMethod) Enum() *Order_PaymentMethod
func (Order_PaymentMethod) EnumDescriptor
deprecated
func (Order_PaymentMethod) EnumDescriptor() ([]byte, []int)
Deprecated: Use Order_PaymentMethod.Descriptor instead.
func (Order_PaymentMethod) Number ¶ added in v0.4.1
func (x Order_PaymentMethod) Number() protoreflect.EnumNumber
func (Order_PaymentMethod) String ¶
func (x Order_PaymentMethod) String() string
func (Order_PaymentMethod) Type ¶ added in v0.4.1
func (Order_PaymentMethod) Type() protoreflect.EnumType
type Order_Status ¶
type Order_Status int32
const ( Order_OPEN Order_Status = 0 Order_SENT Order_Status = 1 Order_COMPLETED Order_Status = 2 )
func (Order_Status) Descriptor ¶ added in v0.4.1
func (Order_Status) Descriptor() protoreflect.EnumDescriptor
func (Order_Status) Enum ¶ added in v0.4.1
func (x Order_Status) Enum() *Order_Status
func (Order_Status) EnumDescriptor
deprecated
func (Order_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use Order_Status.Descriptor instead.
func (Order_Status) Number ¶ added in v0.4.1
func (x Order_Status) Number() protoreflect.EnumNumber
func (Order_Status) String ¶
func (x Order_Status) String() string
func (Order_Status) Type ¶ added in v0.4.1
func (Order_Status) Type() protoreflect.EnumType
type ShopClient ¶
type ShopClient interface {
// SaveArticle updates an article identified by ID.
// If ID is unset (0) a new article is insered.
// On success the affected article ID is returned.
SaveArticle(ctx context.Context, in *Article, opts ...grpc.CallOption) (*ArticleID, error)
// ViewArticle identied by ID.
ViewArticle(ctx context.Context, in *ArticleID, opts ...grpc.CallOption) (*Article, error)
// ListArticles filtered by ListCondtions.
ListArticles(ctx context.Context, in *ListConditions, opts ...grpc.CallOption) (*ArticleList, error)
// DeleteArticle and all associated images and videos
DeleteArticle(ctx context.Context, in *ArticleID, opts ...grpc.CallOption) (*Deleted, error)
// Checkout an order of articles
Checkout(ctx context.Context, in *Order, opts ...grpc.CallOption) (*OrderID, error)
// ListOrders returns all orders
ListOrders(ctx context.Context, in *ListOrderConditions, opts ...grpc.CallOption) (*OrderList, error)
// SaveOrder updates the order identified by ID.
// It is not (yet) possibile to change the articles on an order.
SaveOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*OrderID, error)
// SaveCategories upserts the categories in the provided CategoryList.
// Returned CategoryList is always in the same order as the provided one.
//
// New articles should have their ID field set to 0.
// Those IDs will be populated in the reponse.
// Existing categories should always keep the same ID
// and is used for updates and re-sorting.
SaveCategories(ctx context.Context, in *CategoryList, opts ...grpc.CallOption) (*CategoryList, error)
// ListCategories returns all categories, filtered by CategoryListConditions.
// Returned CategoryList is always in the same order as passed to SaveCategories.
ListCategories(ctx context.Context, in *CategoryListConditions, opts ...grpc.CallOption) (*CategoryList, error)
// SearchArticles returns ArticleList that matches TextSearch.value.
SearchArticles(ctx context.Context, in *TextSearch, opts ...grpc.CallOption) (*ArticleList, error)
// Suggest returns a list of matching articles and categories
Suggest(ctx context.Context, in *TextSearch, opts ...grpc.CallOption) (*SuggestionList, error)
// SaveBasePrice updates a base price identified by ID.
// If ID is unset (0) a new base price is insered.
// On success the affected base price is returned with its ID populated.
SaveBasePrice(ctx context.Context, in *BasePrice, opts ...grpc.CallOption) (*BasePrice, error)
// DeleteBasePrice dis-assosiates all articles and deleted the given BasePrice
DeleteBasePrice(ctx context.Context, in *BasePrice, opts ...grpc.CallOption) (*Deleted, error)
// ListBasePrices returns all base prices.
ListBasesPrices(ctx context.Context, in *BasePriceListCondtions, opts ...grpc.CallOption) (*BasePriceList, error)
// SendMessage sends an email message to the site admin
SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*MessageID, error)
}
ShopClient is the client API for Shop service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewShopClient ¶
func NewShopClient(cc grpc.ClientConnInterface) ShopClient
type ShopServer ¶
type ShopServer interface {
// SaveArticle updates an article identified by ID.
// If ID is unset (0) a new article is insered.
// On success the affected article ID is returned.
SaveArticle(context.Context, *Article) (*ArticleID, error)
// ViewArticle identied by ID.
ViewArticle(context.Context, *ArticleID) (*Article, error)
// ListArticles filtered by ListCondtions.
ListArticles(context.Context, *ListConditions) (*ArticleList, error)
// DeleteArticle and all associated images and videos
DeleteArticle(context.Context, *ArticleID) (*Deleted, error)
// Checkout an order of articles
Checkout(context.Context, *Order) (*OrderID, error)
// ListOrders returns all orders
ListOrders(context.Context, *ListOrderConditions) (*OrderList, error)
// SaveOrder updates the order identified by ID.
// It is not (yet) possibile to change the articles on an order.
SaveOrder(context.Context, *Order) (*OrderID, error)
// SaveCategories upserts the categories in the provided CategoryList.
// Returned CategoryList is always in the same order as the provided one.
//
// New articles should have their ID field set to 0.
// Those IDs will be populated in the reponse.
// Existing categories should always keep the same ID
// and is used for updates and re-sorting.
SaveCategories(context.Context, *CategoryList) (*CategoryList, error)
// ListCategories returns all categories, filtered by CategoryListConditions.
// Returned CategoryList is always in the same order as passed to SaveCategories.
ListCategories(context.Context, *CategoryListConditions) (*CategoryList, error)
// SearchArticles returns ArticleList that matches TextSearch.value.
SearchArticles(context.Context, *TextSearch) (*ArticleList, error)
// Suggest returns a list of matching articles and categories
Suggest(context.Context, *TextSearch) (*SuggestionList, error)
// SaveBasePrice updates a base price identified by ID.
// If ID is unset (0) a new base price is insered.
// On success the affected base price is returned with its ID populated.
SaveBasePrice(context.Context, *BasePrice) (*BasePrice, error)
// DeleteBasePrice dis-assosiates all articles and deleted the given BasePrice
DeleteBasePrice(context.Context, *BasePrice) (*Deleted, error)
// ListBasePrices returns all base prices.
ListBasesPrices(context.Context, *BasePriceListCondtions) (*BasePriceList, error)
// SendMessage sends an email message to the site admin
SendMessage(context.Context, *Message) (*MessageID, error)
}
ShopServer is the server API for Shop service.
type SuggestionList ¶ added in v0.2.0
type SuggestionList struct {
Category []*Category `protobuf:"bytes,1,rep,name=Category,proto3" json:"Category,omitempty"`
Article []*Article `protobuf:"bytes,2,rep,name=Article,proto3" json:"Article,omitempty"`
// contains filtered or unexported fields
}
func (*SuggestionList) Descriptor
deprecated
added in
v0.2.0
func (*SuggestionList) Descriptor() ([]byte, []int)
Deprecated: Use SuggestionList.ProtoReflect.Descriptor instead.
func (*SuggestionList) GetArticle ¶ added in v0.2.0
func (x *SuggestionList) GetArticle() []*Article
func (*SuggestionList) GetCategory ¶ added in v0.2.0
func (x *SuggestionList) GetCategory() []*Category
func (*SuggestionList) ProtoMessage ¶ added in v0.2.0
func (*SuggestionList) ProtoMessage()
func (*SuggestionList) ProtoReflect ¶ added in v0.4.1
func (x *SuggestionList) ProtoReflect() protoreflect.Message
func (*SuggestionList) Reset ¶ added in v0.2.0
func (x *SuggestionList) Reset()
func (*SuggestionList) String ¶ added in v0.2.0
func (x *SuggestionList) String() string
type TextSearch ¶ added in v0.2.0
type TextSearch struct {
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // Search keyword
// contains filtered or unexported fields
}
func (*TextSearch) Descriptor
deprecated
added in
v0.2.0
func (*TextSearch) Descriptor() ([]byte, []int)
Deprecated: Use TextSearch.ProtoReflect.Descriptor instead.
func (*TextSearch) GetText ¶ added in v0.2.0
func (x *TextSearch) GetText() string
func (*TextSearch) ProtoMessage ¶ added in v0.2.0
func (*TextSearch) ProtoMessage()
func (*TextSearch) ProtoReflect ¶ added in v0.4.1
func (x *TextSearch) ProtoReflect() protoreflect.Message
func (*TextSearch) Reset ¶ added in v0.2.0
func (x *TextSearch) Reset()
func (*TextSearch) String ¶ added in v0.2.0
func (x *TextSearch) String() string
type UnimplementedShopServer ¶
type UnimplementedShopServer struct {
}
UnimplementedShopServer can be embedded to have forward compatible implementations.
func (*UnimplementedShopServer) DeleteArticle ¶
func (*UnimplementedShopServer) DeleteBasePrice ¶ added in v0.2.0
func (*UnimplementedShopServer) ListArticles ¶
func (*UnimplementedShopServer) ListArticles(context.Context, *ListConditions) (*ArticleList, error)
func (*UnimplementedShopServer) ListBasesPrices ¶ added in v0.2.0
func (*UnimplementedShopServer) ListBasesPrices(context.Context, *BasePriceListCondtions) (*BasePriceList, error)
func (*UnimplementedShopServer) ListCategories ¶ added in v0.1.1
func (*UnimplementedShopServer) ListCategories(context.Context, *CategoryListConditions) (*CategoryList, error)
func (*UnimplementedShopServer) ListOrders ¶
func (*UnimplementedShopServer) ListOrders(context.Context, *ListOrderConditions) (*OrderList, error)
func (*UnimplementedShopServer) SaveArticle ¶
func (*UnimplementedShopServer) SaveBasePrice ¶ added in v0.2.0
func (*UnimplementedShopServer) SaveCategories ¶ added in v0.1.1
func (*UnimplementedShopServer) SaveCategories(context.Context, *CategoryList) (*CategoryList, error)
func (*UnimplementedShopServer) SearchArticles ¶ added in v0.2.0
func (*UnimplementedShopServer) SearchArticles(context.Context, *TextSearch) (*ArticleList, error)
func (*UnimplementedShopServer) SendMessage ¶ added in v0.4.1
func (*UnimplementedShopServer) Suggest ¶ added in v0.2.0
func (*UnimplementedShopServer) Suggest(context.Context, *TextSearch) (*SuggestionList, error)
func (*UnimplementedShopServer) ViewArticle ¶
type Variant ¶ added in v0.2.0
type Variant struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Created *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"` // Read only
Updated *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated,proto3" json:"updated,omitempty"` // Read only
// Labels allow for multi-dimensional price variations.
Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"`
Multiplier string `protobuf:"bytes,5,opt,name=multiplier,proto3" json:"multiplier,omitempty"` // numeric
// contains filtered or unexported fields
}
Variant is a price variation to an article.
func (*Variant) Descriptor
deprecated
added in
v0.2.0
func (*Variant) GetCreated ¶ added in v0.2.0
func (*Variant) GetMultiplier ¶ added in v0.2.0
func (*Variant) GetUpdated ¶ added in v0.2.0
func (*Variant) ProtoMessage ¶ added in v0.2.0
func (*Variant) ProtoMessage()
func (*Variant) ProtoReflect ¶ added in v0.4.1
func (x *Variant) ProtoReflect() protoreflect.Message
type VariantFields ¶ added in v0.2.0
type VariantFields int32
VariantFields maps fields to database columns for requests.
const ( VariantFields_VRT_ALL VariantFields = 0 VariantFields_VRT_ID VariantFields = 1 VariantFields_VRT_CREATED VariantFields = 2 VariantFields_VRT_UPDATED VariantFields = 3 VariantFields_VRT_LABELS VariantFields = 4 VariantFields_VRT_MULTIPLIER VariantFields = 5 )
func (VariantFields) Descriptor ¶ added in v0.4.1
func (VariantFields) Descriptor() protoreflect.EnumDescriptor
func (VariantFields) Enum ¶ added in v0.4.1
func (x VariantFields) Enum() *VariantFields
func (VariantFields) EnumDescriptor
deprecated
added in
v0.2.0
func (VariantFields) EnumDescriptor() ([]byte, []int)
Deprecated: Use VariantFields.Descriptor instead.
func (VariantFields) Number ¶ added in v0.4.1
func (x VariantFields) Number() protoreflect.EnumNumber
func (VariantFields) String ¶ added in v0.2.0
func (x VariantFields) String() string
func (VariantFields) Type ¶ added in v0.4.1
func (VariantFields) Type() protoreflect.EnumType