Documentation ¶
Index ¶
- Constants
- func ConfigCluster(cluster string) (string, error)
- func ConfigSpace(space string) (string, error)
- func InitializeClient(client client.APIClient)
- func ParseImageNameTag(image string) (string, string, error)
- func ParseKeyValues(descs []string) (map[string]string, error)
- func ParseListener(desc string) (string, int, int, string, error)
- func Print(v interface{}) error
- func PrintTable(header []string, content [][]string)
- func SaveConfig() error
Constants ¶
const ( // DefaultAPIServer specifies the default Alauda API endpoint. DefaultAPIServer string = "https://api.alauda.cn/v1/" // ConfigFileName specifies the configuration filename with extension. ConfigFileName string = ".alauda.yml" // SettingServer is the setting for the API server. SettingServer string = "auth.server" // SettingToken is the setting for the authentication token. SettingToken string = "auth.token" // SettingNamespace is the setting for the namespace. SettingNamespace string = "auth.namespace" // SettingUsername is the setting for username. SettingUsername string = "auth.username" // SettingCluster is the setting for the current cluster. SettingCluster string = "context.cluster" // SettingSpace is the setting for the current space. SettingSpace string = "context.space" )
Variables ¶
This section is empty.
Functions ¶
func ConfigCluster ¶
ConfigCluster uses the cluster specified by the cmd, or the one in the config, as appropriate.
func ConfigSpace ¶ added in v1.3.0
ConfigSpace uses the space specified by the cmd, or the one in the config, as appropriate.
func InitializeClient ¶
InitializeClient initializes the Alauda client from configuration.
func ParseImageNameTag ¶
ParseImageNameTag extracts the image name and image tag.
func ParseKeyValues ¶ added in v1.1.0
ParseKeyValues parses KEY=VALUE into a map of key value pairs.
func ParseListener ¶
ParseListener parses the listener information specified in the form name:listenerPort:containerPort/protocol
func Print ¶
func Print(v interface{}) error
Print marshals the object into an indented JSON and prints it.
func PrintTable ¶
PrintTable prints a table with the provided header and content.
func SaveConfig ¶
func SaveConfig() error
SaveConfig writes all configuration back to the config file This is a temporary workaround until this PR gets merged. https://github.com/spf13/viper/pull/287
Types ¶
This section is empty.