Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthNone = "none" AuthCluster = "cluster" )
Variables ¶
View Source
var RootCmd = &cobra.Command{
Use: "kel",
Short: "Kel end-user command-line tool",
}
RootCmd is ...
Functions ¶
func LoadPlugins ¶
func LoadPlugins()
LoadPlugins will load configured plugins for the activated site.
func SyncSitePlugins ¶
func SyncSitePlugins(site *kel.Site)
SyncSitePlugins will sync the local state of plugins match what the site is providing.
Types ¶
type Config ¶
type Config struct { DefaultCluster *URI `json:"cluster,omitempty"` Auth string `json:"auth,omitempty"` Sites map[string]*SiteConfig `json:"sites"` Tokens map[string]*oauth2.Token `json:"tokens"` Plugins map[string]*Plugin `json:"plugins"` }
Config is the global configuration for the Kel command-line client.
type Plugin ¶
type Plugin struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Command PluginCommand `json:"command,omitempty"` }
Plugin represents a Kel client plugin.
func (*Plugin) BinaryPath ¶
BinaryPath will return the full filesystem path to the binary for this plugin.
type PluginCommand ¶
type PluginCommand struct { BinaryURL string `json:"binary_url,omitempty"` Use string `json:"use,omitempty"` Short string `json:"short,omitempty"` }
PluginCommand represents the client command plugin
type SiteConfig ¶
type SiteConfig struct { URI *URI `json:"uri,omitempty"` Plugins map[string]string `json:"plugins"` }
func GetActivatedSiteConfig ¶
func GetActivatedSiteConfig() *SiteConfig
GetActivatedSiteConfig will return the activated site config or nil
func (*SiteConfig) AddPlugin ¶
func (siteConfig *SiteConfig) AddPlugin(plugin *Plugin)
AddPlugin will add the given plugin to the site config.
type TokenSaver ¶
type URI ¶
type URI struct { Host string `json:"host"` ResourceGroup string `json:"resource-group,omitempty"` Site string `json:"site,omitempty"` Insecure bool `json:"insecure"` }
URI is the structured form of host/resource-group</site>?opts
Click to show internal directories.
Click to hide internal directories.