From 980e4395089fe5c29df71d2c207826d424621926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Wed, 13 Sep 2023 20:50:11 -0400 Subject: [PATCH] Support for marketplace icons --- router/services.go | 1 + types/service.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/router/services.go b/router/services.go index 72320ddb..65af8846 100644 --- a/router/services.go +++ b/router/services.go @@ -12,6 +12,7 @@ import ( func addServicesRoutes(r *gin.RouterGroup) { r.GET("/available", handleServicesAvailable) r.POST("/install", handleServiceInstall) + r.Static("/icons", "./live/services/icons") } // handleServicesAvailable handles the retrieval of all available services. diff --git a/types/service.go b/types/service.go index 7c64b18a..1dccf080 100644 --- a/types/service.go +++ b/types/service.go @@ -19,6 +19,12 @@ type Service struct { // Description describes the service in a few words. Description string `yaml:"description" json:"description"` + // Color is the main color of the service. + Color *string `yaml:"color,omitempty" json:"color,omitempty"` + + // Icon is the icon link of the service, located in ./live/services/icons/. + Icon *string `yaml:"icon,omitempty" json:"icon,omitempty"` + // Features describes some features of the service to help Vertex. Features *Features `yaml:"features,omitempty" json:"features,omitempty"`