Merge pull request #13 from Selly-Modules/update-struct-query
Update struct query
This commit is contained in:
		
						commit
						3c3d09940c
					
				|  | @ -6,6 +6,11 @@ const ( | |||
| 	SubjectRequestProductSkuSearch      = "selly.request.product_sku.search" | ||||
| 	SubjectRequestProductSkuCreateIndex = "selly.request.product_sku.create_index" | ||||
| 
 | ||||
| 	SubjectRequestShopProductUpsert      = "selly.request.shop_product.upsert" | ||||
| 	SubjectPullShopProductUpsert         = "selly.pull.shop_product.upsert" | ||||
| 	SubjectRequestShopProductSearch      = "selly.request.shop_product.search" | ||||
| 	SubjectRequestShopProductCreateIndex = "selly.request.shop_product.create_index" | ||||
| 
 | ||||
| 	SubjectRequestProductUpsert      = "selly.request.product.upsert" | ||||
| 	SubjectPullProductUpsert         = "selly.pull.product.upsert" | ||||
| 	SubjectRequestProductSearch      = "selly.request.product.search" | ||||
|  |  | |||
							
								
								
									
										5
									
								
								pull.go
								
								
								
								
							
							
						
						
									
										5
									
								
								pull.go
								
								
								
								
							|  | @ -28,3 +28,8 @@ func (Pull) KeywordUpsert(payload Payload) (bool, error) { | |||
| func (Pull) ProductSkuUpsert(payload Payload) (bool, error) { | ||||
| 	return publishWithJetStream(JetStreamSearchService, SubjectPullProductSkuUpsert, toBytes(payload)) | ||||
| } | ||||
| 
 | ||||
| // ProductShopUpsert ...
 | ||||
| func (Pull) ProductShopUpsert(payload Payload) (bool, error) { | ||||
| 	return publishWithJetStream(JetStreamSearchService, SubjectPullShopProductUpsert, toBytes(payload)) | ||||
| } | ||||
|  |  | |||
							
								
								
									
										15
									
								
								request.go
								
								
								
								
							
							
						
						
									
										15
									
								
								request.go
								
								
								
								
							|  | @ -4,6 +4,21 @@ package elasticsearch | |||
| type Request struct { | ||||
| } | ||||
| 
 | ||||
| // ProductShopSearch ...
 | ||||
| func (Request) ProductShopSearch(query ESQuery) (*Response, error) { | ||||
| 	return requestNats(SubjectRequestShopProductSearch, toBytes(query)) | ||||
| } | ||||
| 
 | ||||
| // ProductShopUpsert ...
 | ||||
| func (Request) ProductShopUpsert(payload Payload) (*Response, error) { | ||||
| 	return requestNats(SubjectRequestShopProductUpsert, toBytes(payload)) | ||||
| } | ||||
| 
 | ||||
| // ProductShopCreateIndex ...
 | ||||
| func (Request) ProductShopCreateIndex() (*Response, error) { | ||||
| 	return requestNats(SubjectRequestShopProductCreateIndex, toBytes(Payload{})) | ||||
| } | ||||
| 
 | ||||
| // ProductSkuSearch ...
 | ||||
| func (Request) ProductSkuSearch(query ESQuery) (*Response, error) { | ||||
| 	return requestNats(SubjectRequestProductSkuSearch, toBytes(query)) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue