config

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureSshConfigEntryAdded

func EnsureSshConfigEntryAdded(profileId, workspaceName, projectName string) error

func GetBinaryUrls

func GetBinaryUrls() map[os.OperatingSystem]string

func GetConfigDir

func GetConfigDir() (string, error)

func GetDocsLinkFromGitProvider

func GetDocsLinkFromGitProvider(providerId string) string

func GetProjectHostname

func GetProjectHostname(profileId, workspaceId, projectName string) string

func RemoveWorkspaceSshEntries

func RemoveWorkspaceSshEntries(profileId, workspaceId string) error

Types

type Config

type Config struct {
	ActiveProfileId string    `json:"activeProfile"`
	DefaultIdeId    string    `json:"defaultIde"`
	Profiles        []Profile `json:"profiles"`
}

func GetConfig

func GetConfig() (*Config, error)

func (*Config) AddProfile

func (c *Config) AddProfile(profile Profile) error

func (*Config) EditProfile

func (c *Config) EditProfile(profile Profile) error

func (*Config) GetActiveProfile

func (c *Config) GetActiveProfile() (Profile, error)

func (*Config) GetProfile

func (c *Config) GetProfile(profileId string) (Profile, error)

func (*Config) RemoveProfile

func (c *Config) RemoveProfile(profileId string) error

func (*Config) Save

func (c *Config) Save() error

type DefaultProvider

type DefaultProvider struct {
	Provider string `json:"provider"`
	Target   string `json:"target"`
}

type GitProvider

type GitProvider struct {
	Id       string
	Name     string
	Username string
}

func GetGitProviderList

func GetGitProviderList() []GitProvider

type Ide

type Ide struct {
	Id   string
	Name string
}

func GetIdeList

func GetIdeList() []Ide

type Profile

type Profile struct {
	Id   string    `json:"id"`
	Name string    `json:"name"`
	Api  ServerApi `json:"api"`
}

type ServerApi

type ServerApi struct {
	Url string `json:"url"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL