elasticsearch/pull.go

21 lines
599 B
Go
Raw Normal View History

2022-03-19 04:59:43 +00:00
package elasticsearch
// Pull ...
type Pull struct {
}
// ProductUpsert ...
2022-03-19 06:33:06 +00:00
func (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 ...
2022-03-19 06:33:06 +00:00
func (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 ...
2022-03-19 06:33:06 +00:00
func (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
}