Documentation ¶
Index ¶
- Constants
- func ActiveDns() ([]string, error)
- func CurrentAccountName() (string, error)
- func CurrentClusterName() (string, error)
- func CurrentDeviceName() (string, error)
- func CurrentProjectName() (string, error)
- func DeleteDeviceContext(dName string) error
- func GetAuthSession() (string, error)
- func GetBaseURL() (string, error)
- func GetConfigFolder() (configFolder string, err error)
- func GetConfigPath() string
- func GetCookieString(options ...fn.Option) (string, error)
- func Logout() error
- func ReadFile(name string) ([]byte, error)
- func SaveAuthSession(session string) error
- func SaveBaseURL(url string) error
- func SaveExtraData(extraData *ExtraData) error
- func SelectAccount(accountName string) error
- func SelectEnv(envName Env) error
- func SetAccountToMainCtx(aName string) error
- func SetActiveDns(dns []string) error
- func SetClusterToMainCtx(cName string) error
- func WriteDeviceContext(dName string) error
- func WriteKLFile(fileObj KLFileType) error
- type CSType
- type DeviceContext
- type Env
- type EnvType
- type ExtraData
- type FileEntry
- type InfraContext
- type InfraContexts
- type KLFileType
- type MainContext
- type MountType
- type ResEnvType
- type ResType
- type Session
Constants ¶
View Source
const ( SessionFileName string = "kl-session.yaml" MainCtxFileName string = "kl-main-contexts.yaml" ExtraDataFileName string = "kl-extra-data.yaml" DeviceFileName string = "kl-device.yaml" )
Variables ¶
This section is empty.
Functions ¶
func CurrentAccountName ¶
func CurrentClusterName ¶
func CurrentDeviceName ¶
func CurrentProjectName ¶
func DeleteDeviceContext ¶
func GetAuthSession ¶
func GetBaseURL ¶
func GetConfigFolder ¶
func GetConfigPath ¶
func GetConfigPath() string
func SaveAuthSession ¶
func SaveBaseURL ¶
func SaveExtraData ¶
func SelectAccount ¶
func SetAccountToMainCtx ¶
func SetActiveDns ¶
func SetClusterToMainCtx ¶
func WriteDeviceContext ¶
func WriteKLFile ¶
func WriteKLFile(fileObj KLFileType) error
Types ¶
type DeviceContext ¶
type DeviceContext struct {
DeviceName string `json:"deviceName"`
}
func GetDeviceContext ¶
func GetDeviceContext() (*DeviceContext, error)
type Env ¶
func CurrentEnv ¶
type ExtraData ¶
type ExtraData struct { BaseUrl string `json:"baseUrl"` SelectedEnvs map[string]*Env `json:"selectedEnvs"` DNS []string `json:"dns"` Loading bool `json:"loading"` }
func GetExtraData ¶
type InfraContext ¶
type InfraContexts ¶
type InfraContexts struct { InfraContexts map[string]*InfraContext `json:"infraContexts"` ActiveContext string `json:"activeContext"` }
type KLFileType ¶
type KLFileType struct { Version string `json:"version"` DefaultEnv string `json:"defaultEnv"` Project string `json:"project"` Mres []ResType `json:"mres"` Configs []ResType `json:"configs"` Secrets []ResType `json:"secrets"` Env []EnvType `json:"env"` FileMount MountType `json:"fileMount"` }
func GetKlFile ¶
func GetKlFile(filePath string) (*KLFileType, error)
type MainContext ¶
type MainContext struct { AccountName string `json:"accountName"` ClusterName string `json:"clusterName"` }
func GetMainCtx ¶
func GetMainCtx() (*MainContext, error)
type ResEnvType ¶
type ResType ¶
type ResType struct { Name string `json:"name"` Env []ResEnvType `json:"env"` }
Click to show internal directories.
Click to hide internal directories.