elasticsearch/pull.go

21 lines
605 B
Go
Raw Normal View History

2022-03-19 04:59:43 +00:00
package elasticsearch
// Pull ...
type Pull struct {
}
// ProductUpsert ...
func (r Pull) ProductUpsert(query UpdateDataPayload) (bool, error) {
2022-03-19 06:12:59 +00:00
return publishWithJetStream(JetStreamSearchService, SubjectPullProductUpsert, toBytes(query))
2022-03-19 04:59:43 +00:00
}
// UserUpsert ...
func (r Pull) UserUpsert(query UpdateDataPayload) (bool, error) {
2022-03-19 06:12:59 +00:00
return publishWithJetStream(JetStreamSearchService, SubjectPullUserUpsert, toBytes(query))
2022-03-19 04:59:43 +00:00
}
// OrderUpsert ...
func (r Pull) OrderUpsert(query UpdateDataPayload) (bool, error) {
2022-03-19 06:12:59 +00:00
return publishWithJetStream(JetStreamSearchService, SubjectPullOrderUpsert, toBytes(query))
2022-03-19 04:59:43 +00:00
}