Documentation ¶
Index ¶
- Constants
- Variables
- func GetConfigDir() (string, error)
- func GetConfigPath() (string, error)
- func SaveConfig(config *Config) error
- type Config
- func (c *Config) ContextOption(option string) string
- func (c *Config) Current() *ContextConfig
- func (c *Config) DynamicProviderOptions(provider string) DynamicOptions
- func (c *Config) IDEOptions(ide string) map[string]OptionValue
- func (c *Config) ProviderOptions(provider string) map[string]OptionValue
- type ContextConfig
- type ContextOption
- type DynamicOptions
- type IDE
- type IDEConfig
- type OptionValue
- type ProviderConfig
Constants ¶
View Source
const ( ContextOptionSSHAgentForwarding = "SSH_AGENT_FORWARDING" ContextOptionSSHInjectDockerCredentials = "SSH_INJECT_DOCKER_CREDENTIALS" ContextOptionSSHInjectGitCredentials = "SSH_INJECT_GIT_CREDENTIALS" ContextOptionTelemetry = "TELEMETRY" ContextOptionAgentURL = "AGENT_URL" )
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: ContextOptionSSHAgentForwarding, Description: "Specifies if DevPod should do agent forwarding by default for ssh", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionSSHInjectDockerCredentials, Description: "Specifies if DevPod should inject docker credentials into the workspace", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionSSHInjectGitCredentials, Description: "Specifies if DevPod should inject git credentials into the workspace", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionTelemetry, Description: "Specifies if DevPod should send telemetry information", Default: "true", Enum: []string{"true", "false"}, }, { Name: ContextOptionAgentURL, Description: "Specifies the agent url to use for DevPod", }, }
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) DynamicProviderOptions ¶ added in v0.3.0
func (c *Config) DynamicProviderOptions(provider string) DynamicOptions
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) DynamicProviderOptions ¶ added in v0.3.0
func (c *ContextConfig) DynamicProviderOptions(provider string) DynamicOptions
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 DynamicOptions ¶ added in v0.3.0
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" IDEFleet IDE = "fleet" IDEJupyterNotebook IDE = "jupyternotebook" )
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"` // Children are the child options Children []string `json:"children,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"` // DynamicOptions are the unresolved dynamic provider options DynamicOptions DynamicOptions `json:"dynamicOptions,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.