[Update] product sku #11
|
@ -1,6 +1,11 @@
|
|||
package elasticsearch
|
||||
|
||||
const (
|
||||
SubjectRequestProductSkuUpsert = "selly.request.product_sku.upsert"
|
||||
SubjectPullProductSkuUpsert = "selly.pull.product_sku.upsert"
|
||||
SubjectRequestProductSkuSearch = "selly.request.product_sku.search"
|
||||
SubjectRequestProductSkuCreateIndex = "selly.request.product_sku.create_index"
|
||||
|
||||
SubjectRequestProductUpsert = "selly.request.product.upsert"
|
||||
SubjectPullProductUpsert = "selly.pull.product.upsert"
|
||||
SubjectRequestProductSearch = "selly.request.product.search"
|
||||
|
|
5
pull.go
5
pull.go
|
@ -23,3 +23,8 @@ func (Pull) OrderUpsert(payload Payload) (bool, error) {
|
|||
func (Pull) KeywordUpsert(payload Payload) (bool, error) {
|
||||
return publishWithJetStream(JetStreamSearchService, SubjectPullKeywordUpsert, toBytes(payload))
|
||||
}
|
||||
|
||||
// ProductSkuUpsert ...
|
||||
func (Pull) ProductSkuUpsert(payload Payload) (bool, error) {
|
||||
return publishWithJetStream(JetStreamSearchService, SubjectPullProductSkuUpsert, toBytes(payload))
|
||||
}
|
||||
|
|
15
request.go
15
request.go
|
@ -4,6 +4,21 @@ package elasticsearch
|
|||
type Request struct {
|
||||
}
|
||||
|
||||
// ProductSkuSearch ...
|
||||
func (Request) ProductSkuSearch(query ESQuery) (*Response, error) {
|
||||
return requestNats(SubjectRequestProductSkuSearch, toBytes(query))
|
||||
}
|
||||
|
||||
// ProductSkuUpsert ...
|
||||
func (Request) ProductSkuUpsert(payload Payload) (*Response, error) {
|
||||
return requestNats(SubjectRequestProductSkuUpsert, toBytes(payload))
|
||||
}
|
||||
|
||||
// ProductSkuCreateIndex ...
|
||||
func (Request) ProductSkuCreateIndex() (*Response, error) {
|
||||
return requestNats(SubjectRequestProductSkuCreateIndex, toBytes(Payload{}))
|
||||
}
|
||||
|
||||
// ProductSearch ...
|
||||
func (Request) ProductSearch(query ESQuery) (*Response, error) {
|
||||
return requestNats(SubjectRequestProductSearch, toBytes(query))
|
||||
|
|
Loading…
Reference in New Issue