elasticsearch/pull.go

36 lines
1.1 KiB
Go

package elasticsearch
// Pull ...
type Pull struct {
}
// ProductUpsert ...
func (Pull) ProductUpsert(payload Payload) (bool, error) {
return publishWithJetStream(JetStreamSearchService, SubjectPullProductUpsert, toBytes(payload))
}
// UserUpsert ...
func (Pull) UserUpsert(payload Payload) (bool, error) {
return publishWithJetStream(JetStreamSearchService, SubjectPullUserUpsert, toBytes(payload))
}
// OrderUpsert ...
func (Pull) OrderUpsert(payload Payload) (bool, error) {
return publishWithJetStream(JetStreamSearchService, SubjectPullOrderUpsert, toBytes(payload))
}
// KeywordUpsert ...
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))
}
// ProductShopUpsert ...
func (Pull) ProductShopUpsert(payload Payload) (bool, error) {
return publishWithJetStream(JetStreamSearchService, SubjectPullShopProductUpsert, toBytes(payload))
}