[Updaate] Method

This commit is contained in:
trunglt251292 2022-03-19 13:33:06 +07:00
parent 37c217be50
commit 5e7a5ee2c7
2 changed files with 9 additions and 9 deletions

View File

@ -5,16 +5,16 @@ type Pull struct {
}
// ProductUpsert ...
func (r Pull) ProductUpsert(query UpdateDataPayload) (bool, error) {
func (Pull) ProductUpsert(query UpdateDataPayload) (bool, error) {
return publishWithJetStream(JetStreamSearchService, SubjectPullProductUpsert, toBytes(query))
}
// UserUpsert ...
func (r Pull) UserUpsert(query UpdateDataPayload) (bool, error) {
func (Pull) UserUpsert(query UpdateDataPayload) (bool, error) {
return publishWithJetStream(JetStreamSearchService, SubjectPullUserUpsert, toBytes(query))
}
// OrderUpsert ...
func (r Pull) OrderUpsert(query UpdateDataPayload) (bool, error) {
func (Pull) OrderUpsert(query UpdateDataPayload) (bool, error) {
return publishWithJetStream(JetStreamSearchService, SubjectPullOrderUpsert, toBytes(query))
}

View File

@ -5,31 +5,31 @@ type Request struct {
}
// ProductSearch ...
func (r Request) ProductSearch(query ESQuery) (*Response, error) {
func (Request) ProductSearch(query ESQuery) (*Response, error) {
return requestNats(SubjectRequestProductSearch, toBytes(query))
}
// ProductUpsert ...
func (r Request) ProductUpsert(query UpdateDataPayload) (*Response, error) {
func (Request) ProductUpsert(query UpdateDataPayload) (*Response, error) {
return requestNats(SubjectRequestProductUpsert, toBytes(query))
}
// UserSearch ...
func (r Request) UserSearch(query ESQuery) (*Response, error) {
func (Request) UserSearch(query ESQuery) (*Response, error) {
return requestNats(SubjectRequestUserSearch, toBytes(query))
}
// UserUpsert ...
func (r Request) UserUpsert(query UpdateDataPayload) (*Response, error) {
func (Request) UserUpsert(query UpdateDataPayload) (*Response, error) {
return requestNats(SubjectRequestUserUpsert, toBytes(query))
}
// OrderSearch ...
func (r Request) OrderSearch(query ESQuery) (*Response, error) {
func (Request) OrderSearch(query ESQuery) (*Response, error) {
return requestNats(SubjectRequestOrderSearch, toBytes(query))
}
// OrderUpsert ...
func (r Request) OrderUpsert(query UpdateDataPayload) (*Response, error) {
func (Request) OrderUpsert(query UpdateDataPayload) (*Response, error) {
return requestNats(SubjectRequestOrderUpsert, toBytes(query))
}