Merge pull request #8 from Selly-Modules/develop

update
This commit is contained in:
Minh Nguyen 2022-03-23 17:17:14 +07:00 committed by GitHub
commit a50cda071b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 2 deletions

View File

@ -3,6 +3,13 @@ package appier
const (
SubjectPullProductUpsert = "selly.pull.product.upsert"
SubjectPullBrandUpsert = "selly.pull.brand.upsert"
SubjectPullCategoryUpsert = "selly.pull.category.upsert"
SubjectPullSubCategoryUpsert = "selly.pull.subcategory.upsert"
SubjectPullInventoryUpsert = "selly.pull.inventory.upsert"
SubjectPullSupplierUpsert = "selly.pull.supplier.upsert"
SubjectPullPropertyUpsert = "selly.pull.property.upsert"
SubjectPullPropertyValueUpsert = "selly.pull.property_value.upsert"
SubjectPullSKUUpsert = "selly.pull.sku.upsert"
)
const (

35
pull.go
View File

@ -12,3 +12,38 @@ func (Pull) ProductUpsert(payload []byte) (bool, error) {
func (Pull) BrandUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullBrandUpsert, payload)
}
// CategoryUpsert ...
func (Pull) CategoryUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullCategoryUpsert, payload)
}
// SubCategoryUpsert ...
func (Pull) SubCategoryUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullSubCategoryUpsert, payload)
}
// SupplierUpsert ...
func (Pull) SupplierUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullSupplierUpsert, payload)
}
// InventoryUpsert ...
func (Pull) InventoryUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullInventoryUpsert, payload)
}
// SKUUpsert ...
func (Pull) SKUUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullSKUUpsert, payload)
}
// PropertyUpsert ...
func (Pull) PropertyUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullPropertyUpsert, payload)
}
// PropertyValueUpsert ...
func (Pull) PropertyValueUpsert(payload []byte) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPullPropertyValueUpsert, payload)
}