Documentation
¶
Index ¶
- Constants
- Variables
- func CloudlensHome() string
- func EnsureFullPath(path string, mod os.FileMode)
- func EnsurePath(path string, mod os.FileMode)
- func GetProfiles() (profiles []string, err error)
- func GetSession(profile, region string) (*session.Session, error)
- func LookupForValue(profiles []string, value string) bool
- type Active
- type Alias
- type Aliases
- func (a *Aliases) Clear()
- func (a *Aliases) Define(resource string, aliases ...string)
- func (a *Aliases) Get(k string) (string, bool)
- func (a *Aliases) Keys() []string
- func (a *Aliases) Load() error
- func (a *Aliases) LoadFileAliases(path string) error
- func (a *Aliases) Save() error
- func (a *Aliases) SaveAliases(path string) error
- func (a *Aliases) ShortNames() ShortNames
- type Border
- type Cloudlens
- type Color
- type Config
- type Crumb
- type Frame
- type IsSwapHappen
- type Menu
- type ShortNames
- type Status
- type Title
Constants ¶
const ( // DefaultDirMod default unix perms for k9s directory. DefaultDirMod os.FileMode = 0755 // DefaultFileMod default unix perms for k9s files. DefaultFileMod os.FileMode = 0600 )
const CloudlensConfig = "CLOUDLENSCONFIG"
CloudlensConfig represents Cloudlens configuration dir env var.
Variables ¶
var CloudlensAlias = filepath.Join(CloudlensHome(), "alias.yml")
CloudlensAlias manages Cloudlens aliases.
var ( //CloudlensConfigFile represents config file location. CloudlensConfigFile = filepath.Join(CloudlensHome(), "config.yml") )
Functions ¶
func CloudlensHome ¶
func CloudlensHome() string
CloudlensHome returns Cloudlens configs home directory.
func EnsureFullPath ¶
EnsureFullPath ensures a directory exist from the given path.
func EnsurePath ¶
EnsurePath ensures a directory exist from the given path.
func GetProfiles ¶
func LookupForValue ¶
Types ¶
type Aliases ¶
type Aliases struct { Alias Alias `yaml:"alias"` // contains filtered or unexported fields }
Aliases represents a collection of aliases.
func (*Aliases) LoadFileAliases ¶
LoadFileAliases loads alias from a given file.
func (*Aliases) SaveAliases ¶
SaveAliases saves aliases to a given file.
func (*Aliases) ShortNames ¶
func (a *Aliases) ShortNames() ShortNames
ShortNames return all shortnames.
type Cloudlens ¶
type Cloudlens struct { EnableMouse bool `yaml:"enableMouse"` Headless bool `yaml:"headless"` Logoless bool `yaml:"logoless"` Crumbsless bool `yaml:"crumbsless"` Active *Active `yaml:"active"` }
func NewCloudlens ¶
func NewCloudlens() *Cloudlens
NewCloudlens create a new Cloudlens configuration.
type Config ¶
type Config struct { Cloudlens *Cloudlens `yaml:"cloudlens"` // List of profiles in (~/.aws/credentials) Profiles []string AwsConfig awsV2.Config }
type Crumb ¶
type Crumb struct { FgColor Color `yaml:"fgColor"` BgColor Color `yaml:"bgColor"` ActiveColor Color `yaml:"activeColor"` }
Crumb tracks crumbs styles.
type IsSwapHappen ¶
type IsSwapHappen bool
func SwapFirstIndexWithValue ¶
func SwapFirstIndexWithValue(array []string, value string) ([]string, IsSwapHappen)
SwapFirstIndexWithValue return swapped array if match found. If match not found returns same array and says match not found.
type ShortNames ¶
ShortNames represents a collection of shortnames for aliases.
type Status ¶
type Status struct { NewColor Color `yaml:"newColor"` ModifyColor Color `yaml:"modifyColor"` AddColor Color `yaml:"addColor"` PendingColor Color `yaml:"pendingColor"` ErrorColor Color `yaml:"errorColor"` HighlightColor Color `yaml:"highlightColor"` KillColor Color `yaml:"killColor"` CompletedColor Color `yaml:"completedColor"` }