Documentation ¶
Index ¶
- Constants
- Variables
- func CommandInvocation() string
- func CopyProfile(sourceName string) error
- func DeleteProfile(name string) bool
- func ExpandCommandInvocation(s string) string
- func GetModelLocations() []string
- func IsRunningAsComponent() bool
- func Load()
- func LoadLaceworkProfiles(configFile string)
- func Migrate() error
- func RenameProfile(name, rename string) error
- func Reset()
- func RootCommandName() string
- func Save() error
- func SelectProfile(name string) bool
- func Set(name, value string) error
- type LaceworkProfile
- type ProfileT
- func (c *ProfileT) AssertAPITokenFromConfig() error
- func (c *ProfileT) GetAPIServer() string
- func (c *ProfileT) GetAPIToken() string
- func (c *ProfileT) GetAppURL() string
- func (c *ProfileT) GetLaceworkAPIKey() string
- func (c *ProfileT) GetLaceworkAPISecret() string
- func (c *ProfileT) GetLaceworkAccount() string
- func (c *ProfileT) GetLaceworkProfile() *LaceworkProfile
- func (c *ProfileT) GetOrganization() string
- func (c *ProfileT) SetLaceworkProfile(name string)
- func (c *ProfileT) String() string
Constants ¶
View Source
const Redacted = "*** redacted ***"
Variables ¶
View Source
var ( Config = &ProfileT{} ConfigFile string ConfigDir string )
Config points to the current profile
View Source
var GlobalConfig = &struct { Profiles map[string]*ProfileT CurrentProfile string ModelLocations []string `json:",omitempty"` }{}
Functions ¶
func CommandInvocation ¶ added in v0.5.35
func CommandInvocation() string
func CopyProfile ¶ added in v0.4.12
func DeleteProfile ¶
func ExpandCommandInvocation ¶ added in v0.5.35
func GetModelLocations ¶
func GetModelLocations() []string
func IsRunningAsComponent ¶ added in v0.5.35
func IsRunningAsComponent() bool
func LoadLaceworkProfiles ¶ added in v0.5.36
func LoadLaceworkProfiles(configFile string)
func RenameProfile ¶
func RootCommandName ¶ added in v0.5.35
func RootCommandName() string
func SelectProfile ¶
Types ¶
type LaceworkProfile ¶ added in v0.5.35
type LaceworkProfile struct { Name string `toml:"-"` Account string `toml:"account"` APIKey string `toml:"api_key"` APISecret string `toml:"api_secret"` }
func GetDefaultLaceworkProfile ¶ added in v0.5.36
func GetDefaultLaceworkProfile() *LaceworkProfile
func GetLaceworkProfiles ¶ added in v0.5.36
func GetLaceworkProfiles() (result []*LaceworkProfile)
type ProfileT ¶
type ProfileT struct { ProfileName string `json:"-"` APIServer string APIToken string `json:",omitempty"` TLSNoVerify bool `json:",omitempty"` Organization string LaceworkProfileName string `json:",omitempty"` // contains filtered or unexported fields }
func (*ProfileT) AssertAPITokenFromConfig ¶ added in v0.4.33
func (*ProfileT) GetAPIServer ¶ added in v0.4.33
func (*ProfileT) GetAPIToken ¶ added in v0.4.33
func (*ProfileT) GetLaceworkAPIKey ¶ added in v0.5.36
func (*ProfileT) GetLaceworkAPISecret ¶ added in v0.5.36
func (*ProfileT) GetLaceworkAccount ¶ added in v0.5.36
func (*ProfileT) GetLaceworkProfile ¶ added in v0.5.36
func (c *ProfileT) GetLaceworkProfile() *LaceworkProfile
func (*ProfileT) GetOrganization ¶ added in v0.5.35
func (*ProfileT) SetLaceworkProfile ¶ added in v0.5.35
Click to show internal directories.
Click to hide internal directories.