Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_KUBECTL_PROTECTED_COMMANDS = []string{
"delete",
"patch",
"exec",
"apply",
"create",
"run",
"port-forward",
"edit",
"install",
"upgrade",
"rollback",
"uninstall",
}
Functions ¶
This section is empty.
Types ¶
type ContextConf ¶
type ContextConf struct { Name string `yaml:"name"` IsRegex bool `yaml:"isRegex"` ProtectedCommands []string `yaml:"commands"` }
func NewContextConf ¶
func NewContextConf( contextName string, safeActions []string, ) ContextConf
func (*ContextConf) IsProtected ¶
func (c *ContextConf) IsProtected(command string) bool
type Settings ¶
type Settings struct { Contexts []ContextConf `yaml:"contexts"` // contains filtered or unexported fields }
func NewSettings ¶
func NewSettings(contexts ...ContextConf) Settings
func (*Settings) AddContext ¶
func (s *Settings) AddContext(context ContextConf) error
func (*Settings) ContainsContext ¶
func (*Settings) GetContextConf ¶
func (s *Settings) GetContextConf(context string) (ContextConf, bool)
func (*Settings) RemoveContext ¶
Click to show internal directories.
Click to hide internal directories.