From 6b44939faf178328034c6548174c5c8a5ef8a608 Mon Sep 17 00:00:00 2001 From: Yash Sharma Date: Fri, 28 Jun 2024 10:07:29 +0000 Subject: [PATCH 1/2] Return class description Signed-off-by: Yash Sharma --- models/catalog/v1alpha1/catalog.go | 35 +++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/models/catalog/v1alpha1/catalog.go b/models/catalog/v1alpha1/catalog.go index bf26c520..b0b4b6d0 100644 --- a/models/catalog/v1alpha1/catalog.go +++ b/models/catalog/v1alpha1/catalog.go @@ -69,6 +69,11 @@ func (cd *CatalogData) IsNil() bool { type ContentClass string +type ContentClassObj struct { + Class ContentClass `json:"class"` + Description string `json:"description"` +} + const ( Official ContentClass = "official" Verified ContentClass = "verified" @@ -82,8 +87,8 @@ func (c ContentClass) String() string { return "official" case Verified: return "verified" - case Project: - return "project" + // case Project: + // return "project" case Community: fallthrough default: @@ -91,11 +96,25 @@ func (c ContentClass) String() string { } } -func GetCatalogClasses() []ContentClass { - return []ContentClass{ - Official, - Verified, - Project, - Community, +// Ref to catalog schema - +func GetCatalogClasses() []ContentClassObj { + return []ContentClassObj{ + { + Class: Official, + Description: "Content produced and fully supported by Meshery maintainers. This represents the highest level of support and is considered the most reliable.", + }, + { + Class: Verified, + Description: "Content produced by partners and verified by Meshery maintainers. While not directly maintained by Meshery, it has undergone a verification process to ensure quality and compatibility.", + }, + // Uncomment if needed + // { + // Class: ProjectClass, + // Description: "Content produced and supported by the respective project or organization responsible for the specific technology. This class offers a level of support from the project maintainers themselves.", + // }, + { + Class: Community, + Description: "Content produced and shared by Meshery users. This includes a wide range of content, such as performance profiles, test results, filters, patterns, and applications. Community content may have varying levels of support and reliability.", + }, } } From 6f60666dbeeb7dd39186ce58db1f5bd9fd674e51 Mon Sep 17 00:00:00 2001 From: Yash Sharma Date: Fri, 28 Jun 2024 10:10:36 +0000 Subject: [PATCH 2/2] Add comment Signed-off-by: Yash Sharma --- models/catalog/v1alpha1/catalog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/catalog/v1alpha1/catalog.go b/models/catalog/v1alpha1/catalog.go index b0b4b6d0..97007aed 100644 --- a/models/catalog/v1alpha1/catalog.go +++ b/models/catalog/v1alpha1/catalog.go @@ -96,7 +96,7 @@ func (c ContentClass) String() string { } } -// Ref to catalog schema - +// Ref to catalog schema - https://github.com/meshery/schemas/blob/master/schemas/constructs/v1alpha1/catalog_data.json func GetCatalogClasses() []ContentClassObj { return []ContentClassObj{ {