Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContextOptionInjectDockerCredentials = "INJECT_DOCKER_CREDENTIALS" ContextOptionInjectGitCredentials = "INJECT_GIT_CREDENTIALS" ContextOptionAutoPortForwarding = "AUTO_PORT_FORWARDING" ContextOptionTelemetry = "TELEMETRY" )
View Source
const DEVPOD_CONFIG = "DEVPOD_CONFIG"
Override config path
View Source
const DEVPOD_HOME = "DEVPOD_HOME"
Override devpod home
View Source
const DefaultContext = "default"
Variables ¶
View Source
var ConfigFile = "config.yaml"
View Source
var ContextOptions = []ContextOption{ { Name: ContextOptionInjectDockerCredentials, Description: "Specifies if DevPod should inject docker credentials into the workspace", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionInjectGitCredentials, Description: "Specifies if DevPod should inject git credentials into the workspace", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionAutoPortForwarding, Description: "Specifies if DevPod should automatically try to port forward container ports", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionTelemetry, Description: "Specifies if DevPod should send telemetry information", Default: "true", Enum: []string{"true", "false"}, }, }
Functions ¶
func GetConfigDir ¶
func GetConfigPath ¶
func SaveConfig ¶
Types ¶
type Config ¶
type Config struct { // DefaultContext is the default context to use. Defaults to "default" DefaultContext string `json:"defaultContext,omitempty"` // Contexts holds the config contexts Contexts map[string]*ContextConfig `json:"contexts,omitempty"` // Origin holds the path where this config was loaded from Origin string `json:"-"` // OriginalContext is the original default context OriginalContext string `json:"-"` }
func CloneConfig ¶
func (*Config) ContextOption ¶
func (*Config) Current ¶
func (c *Config) Current() *ContextConfig
func (*Config) IDEOptions ¶
func (c *Config) IDEOptions(ide string) map[string]OptionValue
func (*Config) ProviderOptions ¶
func (c *Config) ProviderOptions(provider string) map[string]OptionValue
type ContextConfig ¶
type ContextConfig struct { // DefaultProvider is the default provider to use DefaultProvider string `json:"defaultProvider,omitempty"` // DefaultIDE holds default ide configuration DefaultIDE string `json:"defaultIde,omitempty"` // Options are additional context options Options map[string]OptionValue `json:"options,omitempty"` // IDEs holds the ide configuration IDEs map[string]*IDEConfig `json:"ides,omitempty"` // Providers holds the provider configuration Providers map[string]*ProviderConfig `json:"providers,omitempty"` // OriginalProvider is the original default provider OriginalProvider string `json:"-"` }
func (*ContextConfig) IDEOptions ¶
func (c *ContextConfig) IDEOptions(ide string) map[string]OptionValue
func (*ContextConfig) IsSingleMachine ¶
func (c *ContextConfig) IsSingleMachine(provider string) bool
func (*ContextConfig) ProviderOptions ¶
func (c *ContextConfig) ProviderOptions(provider string) map[string]OptionValue
type ContextOption ¶
type ContextOption struct { // Name of the context option Name string `json:"name,omitempty"` // Description is the description of the context option Description string `json:"description,omitempty"` // Default is the default value of the context option Default string `json:"default,omitempty"` // Enum of the allowed values Enum []string `json:"enum,omitempty"` }
type IDE ¶
type IDE string
const ( IDENone IDE = "none" IDEVSCode IDE = "vscode" IDEOpenVSCode IDE = "openvscode" IDEIntellij IDE = "intellij" IDEGoland IDE = "goland" IDEPyCharm IDE = "pycharm" IDEPhpStorm IDE = "phpstorm" IDECLion IDE = "clion" IDERubyMine IDE = "rubymine" IDERider IDE = "rider" IDEWebStorm IDE = "webstorm" )
type IDEConfig ¶
type IDEConfig struct { // Options are additional ide options Options map[string]OptionValue `json:"options,omitempty"` }
type OptionValue ¶
type OptionValue struct { // Value is the value of the option Value string `json:"value,omitempty"` // UserProvided signals that this value was user provided UserProvided bool `json:"userProvided,omitempty"` // Filled is the time when this value was filled Filled *types.Time `json:"filled,omitempty"` }
type ProviderConfig ¶
type ProviderConfig struct { // Initialized holds if the provider was initialized correctly. Initialized bool `json:"initialized,omitempty"` // SingleMachine signals DevPod if a single machine should be used for this provider. SingleMachine bool `json:"singleMachine,omitempty"` // Options are the configured provider options Options map[string]OptionValue `json:"options,omitempty"` // CreationTimestamp is the timestamp when this provider was added CreationTimestamp types.Time `json:"creationTimestamp,omitempty"` }
Click to show internal directories.
Click to hide internal directories.