[Updaate] Method
This commit is contained in:
parent
37c217be50
commit
5e7a5ee2c7
6
pull.go
6
pull.go
|
@ -5,16 +5,16 @@ type Pull struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProductUpsert ...
|
// ProductUpsert ...
|
||||||
func (r Pull) ProductUpsert(query UpdateDataPayload) (bool, error) {
|
func (Pull) ProductUpsert(query UpdateDataPayload) (bool, error) {
|
||||||
return publishWithJetStream(JetStreamSearchService, SubjectPullProductUpsert, toBytes(query))
|
return publishWithJetStream(JetStreamSearchService, SubjectPullProductUpsert, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserUpsert ...
|
// UserUpsert ...
|
||||||
func (r Pull) UserUpsert(query UpdateDataPayload) (bool, error) {
|
func (Pull) UserUpsert(query UpdateDataPayload) (bool, error) {
|
||||||
return publishWithJetStream(JetStreamSearchService, SubjectPullUserUpsert, toBytes(query))
|
return publishWithJetStream(JetStreamSearchService, SubjectPullUserUpsert, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
||||||
// OrderUpsert ...
|
// OrderUpsert ...
|
||||||
func (r Pull) OrderUpsert(query UpdateDataPayload) (bool, error) {
|
func (Pull) OrderUpsert(query UpdateDataPayload) (bool, error) {
|
||||||
return publishWithJetStream(JetStreamSearchService, SubjectPullOrderUpsert, toBytes(query))
|
return publishWithJetStream(JetStreamSearchService, SubjectPullOrderUpsert, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
12
request.go
12
request.go
|
@ -5,31 +5,31 @@ type Request struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProductSearch ...
|
// ProductSearch ...
|
||||||
func (r Request) ProductSearch(query ESQuery) (*Response, error) {
|
func (Request) ProductSearch(query ESQuery) (*Response, error) {
|
||||||
return requestNats(SubjectRequestProductSearch, toBytes(query))
|
return requestNats(SubjectRequestProductSearch, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProductUpsert ...
|
// ProductUpsert ...
|
||||||
func (r Request) ProductUpsert(query UpdateDataPayload) (*Response, error) {
|
func (Request) ProductUpsert(query UpdateDataPayload) (*Response, error) {
|
||||||
return requestNats(SubjectRequestProductUpsert, toBytes(query))
|
return requestNats(SubjectRequestProductUpsert, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserSearch ...
|
// UserSearch ...
|
||||||
func (r Request) UserSearch(query ESQuery) (*Response, error) {
|
func (Request) UserSearch(query ESQuery) (*Response, error) {
|
||||||
return requestNats(SubjectRequestUserSearch, toBytes(query))
|
return requestNats(SubjectRequestUserSearch, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserUpsert ...
|
// UserUpsert ...
|
||||||
func (r Request) UserUpsert(query UpdateDataPayload) (*Response, error) {
|
func (Request) UserUpsert(query UpdateDataPayload) (*Response, error) {
|
||||||
return requestNats(SubjectRequestUserUpsert, toBytes(query))
|
return requestNats(SubjectRequestUserUpsert, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
||||||
// OrderSearch ...
|
// OrderSearch ...
|
||||||
func (r Request) OrderSearch(query ESQuery) (*Response, error) {
|
func (Request) OrderSearch(query ESQuery) (*Response, error) {
|
||||||
return requestNats(SubjectRequestOrderSearch, toBytes(query))
|
return requestNats(SubjectRequestOrderSearch, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
||||||
// OrderUpsert ...
|
// OrderUpsert ...
|
||||||
func (r Request) OrderUpsert(query UpdateDataPayload) (*Response, error) {
|
func (Request) OrderUpsert(query UpdateDataPayload) (*Response, error) {
|
||||||
return requestNats(SubjectRequestOrderUpsert, toBytes(query))
|
return requestNats(SubjectRequestOrderUpsert, toBytes(query))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue