[Update] Define method #5

Merged
trunglt251292 merged 10 commits from v1 into master 2022-03-24 09:49:54 +00:00
2 changed files with 0 additions and 18 deletions
Showing only changes of commit a6e7982be6 - Show all commits

View File

@ -2,17 +2,14 @@ package elasticsearch
const (
SubjectRequestProductUpsert = "elasticsearch/selly.request.product.upsert"
SubjectQueueProductUpsert = "elasticsearch/selly.queue.product.upsert"
SubjectPullProductUpsert = "elasticsearch/selly.pull.product.upsert"
SubjectRequestProductSearch = "elasticsearch/selly.request.product.search"
SubjectRequestOrderUpsert = "elasticsearch/selly.request.order.upsert"
SubjectQueueOrderUpsert = "elasticsearch/selly.queue.order.upsert"
SubjectPullOrderUpsert = "elasticsearch/selly.pull.order.upsert"
SubjectRequestOrderSearch = "elasticsearch/selly.request.order.search"
SubjectRequestUserUpsert = "elasticsearch/selly.request.order.upsert"
SubjectQueueUserUpsert = "elasticsearch/selly.queue.order.upsert"
SubjectPullUserUpsert = "elasticsearch/selly.pull.order.upsert"
SubjectRequestUserSearch = "elasticsearch/selly.request.user.search"
)

View File

@ -3,18 +3,3 @@ package elasticsearch
// Queue ...
type Queue struct {
}
// ProductUpsert ...
func (r Queue) ProductUpsert(query UpdateDataPayload) (bool, error) {
return GetClient().PublishWithJetStream(JetStreamSearchService, SubjectQueueProductUpsert, toBytes(query))
}
// UserUpsert ...
func (r Queue) UserUpsert(query UpdateDataPayload) (bool, error) {
return GetClient().PublishWithJetStream(JetStreamSearchService, SubjectQueueUserUpsert, toBytes(query))
}
// OrderUpsert ...
func (r Queue) OrderUpsert(query UpdateDataPayload) (bool, error) {
return GetClient().PublishWithJetStream(JetStreamSearchService, SubjectQueueOrderUpsert, toBytes(query))
}