[MM-21123] Add Labels to upstream Marketplace response (#13425)

* Add Labels to upstream Marketplace response

* Add LOCAL label to local plugins
Этот коммит содержится в:
Ben Schumacher
2020-01-14 07:16:36 +01:00
коммит произвёл GitHub
родитель 8e2c59ca00
Коммит 1f3f8fbf57
3 изменённых файлов: 43 добавлений и 12 удалений

Просмотреть файл

@@ -14,18 +14,26 @@ import (
"github.com/pkg/errors"
)
// BaseMarketplacePlugin is a Mattermost plugin received from the marketplace server.
// BaseMarketplacePlugin is a Mattermost plugin received from the Marketplace server.
type BaseMarketplacePlugin struct {
HomepageURL string `json:"homepage_url"`
IconData string `json:"icon_data"`
DownloadURL string `json:"download_url"`
ReleaseNotesURL string `json:"release_notes_url"`
// Signature represents a signature of a plugin saved in base64 encoding.
Signature string `json:"signature"`
Manifest *Manifest `json:"manifest"`
HomepageURL string `json:"homepage_url"`
IconData string `json:"icon_data"`
DownloadURL string `json:"download_url"`
ReleaseNotesURL string `json:"release_notes_url"`
Labels []MarketplaceLabel `json:"labels"`
Signature string `json:"signature"` // Signature represents a signature of a plugin saved in base64 encoding.
Manifest *Manifest `json:"manifest"`
}
// MarketplacePlugin is a state aware marketplace plugin.
// MarketplaceLabel represents a label shown in the Marketplace UI.
type MarketplaceLabel struct {
Name string `json:"name"`
Description string `json:"description"`
URL string `json:"url"`
Color string `json:"color"`
}
// MarketplacePlugin is a state aware Marketplace plugin.
type MarketplacePlugin struct {
*BaseMarketplacePlugin
InstalledVersion string `json:"installed_version"`