Path: blob/main/components/ide-service-api/go/config/ideconfig.go
2500 views
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package config56type IDEType string78const (9IDETypeBrowser IDEType = "browser"10IDETypeDesktop IDEType = "desktop"11)1213type IDEConfig struct {14SupervisorImage string `json:"supervisorImage"`15IdeOptions IDEOptions `json:"ideOptions"`16}1718type IDEOptions struct {19// Options is a list of available IDEs.20Options map[string]IDEOption `json:"options"`21// DefaultIde when the user has not specified one.22DefaultIde string `json:"defaultIde"`23// DefaultDesktopIde when the user has not specified one.24DefaultDesktopIde string `json:"defaultDesktopIde"`25// Clients specific IDE options.26Clients map[string]IDEClient `json:"clients"`27}2829type IDEOption struct {30// OrderKey to ensure a stable order one can set an `orderKey`.31OrderKey string `json:"orderKey,omitempty"`32// Title with human readable text of the IDE (plain text only).33Title string `json:"title"`34// Type of the IDE, currently 'browser' or 'desktop'.35Type IDEType `json:"type"`36// Logo URL for the IDE. See also components/ide-proxy/static/image/ide-log/ folder37Logo string `json:"logo"`38// Tooltip plain text only39Tooltip string `json:"tooltip,omitempty"`40// Label is next to the IDE option like “Browser” (plain text only).41Label string `json:"label,omitempty"`42// Notes to the IDE option that are rendered in the preferences when a user chooses this IDE.43Notes []string `json:"notes,omitempty"`44// Hidden this IDE option is not visible in the IDE preferences.45Hidden bool `json:"hidden,omitempty"`46// Experimental this IDE option is to only be shown to some users47Experimental bool `json:"experimental,omitempty"`48// Image ref to the IDE image.49Image string `json:"image"`50// LatestImage ref to the IDE image, this image ref always resolve to digest.51LatestImage string `json:"latestImage,omitempty"`52// ResolveImageDigest when this is `true`, the tag of this image is resolved to the latest image digest regularly.53// This is useful if this image points to a tag like `nightly` that will be updated regularly. When `resolveImageDigest` is `true`, we make sure that we resolve the tag regularly to the most recent image version.54ResolveImageDigest bool `json:"resolveImageDigest,omitempty"`55// PluginImage ref for the IDE image, this image ref always resolve to digest.56// DEPRECATED use ImageLayers instead57PluginImage string `json:"pluginImage,omitempty"`58// PluginLatestImage ref for the latest IDE image, this image ref always resolve to digest.59// DEPRECATED use LatestImageLayers instead60PluginLatestImage string `json:"pluginLatestImage,omitempty"`61// ImageVersion the semantic version of the IDE image.62ImageVersion string `json:"imageVersion,omitempty"`63// LatestImageVersion the semantic version of the latest IDE image.64LatestImageVersion string `json:"latestImageVersion,omitempty"`65// ImageLayers for additional ide layers and dependencies66ImageLayers []string `json:"imageLayers,omitempty"`67// LatestImageLayers for latest additional ide layers and dependencies68LatestImageLayers []string `json:"latestImageLayers,omitempty"`69// AllowPin if the editor is allowed to pin versions, only used for `ide-service` internal computation.70AllowPin bool `json:"allowPin,omitempty"`71// Release Versions of the IDE72Versions []IDEVersion `json:"versions,omitempty"`73}7475type IDEVersion struct {76Version string `json:"version"`77// Image ref to the IDE image.78Image string `json:"image"`79// ImageLayers for additional ide layers and dependencies80ImageLayers []string `json:"imageLayers,omitempty"`81}8283type IDEClient struct {84// DefaultDesktopIDE when the user has not specified one.85DefaultDesktopIDE string `json:"defaultDesktopIDE,omitempty"`86// DesktopIDEs supported by the client.87DesktopIDEs []string `json:"desktopIDEs,omitempty"`88// InstallationSteps to install the client on user machine.89InstallationSteps []string `json:"installationSteps,omitempty"`90}919293