| 8 | ) |
| 9 | |
| 10 | func (p *plugin) catalogueApi() []pm3.Api { |
| 11 | return []pm3.Api{ |
| 12 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/catalogues", []string{"context", "query:keyword"}, []string{"catalogues", "tags"}, p.catalogueController.Search, access.SystemSettingsGeneralView, access.SystemApiPortalApiPortalView), |
| 13 | pm3.CreateApiWidthDoc(http.MethodPost, "/api/v1/catalogue", []string{"context", "body"}, nil, p.catalogueController.Create, access.SystemSettingsGeneralManager), |
| 14 | pm3.CreateApiWidthDoc(http.MethodPut, "/api/v1/catalogue", []string{"context", "query:catalogue", "body"}, nil, p.catalogueController.Edit, access.SystemSettingsGeneralManager), |
| 15 | pm3.CreateApiWidthDoc(http.MethodDelete, "/api/v1/catalogue", []string{"context", "query:catalogue"}, nil, p.catalogueController.Delete, access.SystemSettingsGeneralManager), |
| 16 | pm3.CreateApiWidthDoc(http.MethodPut, "/api/v1/catalogue/sort", []string{"context", "body"}, nil, p.catalogueController.Sort, access.SystemSettingsGeneralManager), |
| 17 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/catalogue/services", []string{"context", "query:keyword"}, []string{"services"}, p.catalogueController.Services, access.SystemApiPortalApiPortalView), |
| 18 | pm3.CreateApiWidthDoc(http.MethodGet, "/api/v1/catalogue/service", []string{"context", "query:service"}, []string{"service"}, p.catalogueController.ServiceDetail, access.SystemApiPortalApiPortalView), |
| 19 | pm3.CreateApiWidthDoc(http.MethodPost, "/api/v1/catalogue/service/subscribe", []string{"context", "body"}, nil, p.catalogueController.Subscribe), |
| 20 | } |
| 21 | } |