cmd

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute executes the root command.

func WriteToConfig

func WriteToConfig(config KubeLockConfig) error

There might be a good way of doing this with viper, but this will do for now

Types

type KubeLockConfig

type KubeLockConfig struct {
	Contexts            []KubeLockContexts `yaml:"contexts"`
	Profiles            []KubeLockProfiles `yaml:"profiles"`
	DefaultProfile      string             `yaml:"defaultProfile"`
	UnlockTimeoutPeriod string             `yaml:"unlockTimeoutPeriod"`
}

type KubeLockContexts

type KubeLockContexts struct {
	Name            string `yaml:"name"`
	Status          string `yaml:"status"`
	UnlockTimestamp string `yaml:"unlockTimestamp"`
}

type KubeLockDeleteExceptions

type KubeLockDeleteExceptions struct {
	Group    string `yaml:"group"`
	Resource string `yaml:"resource"`
}

type KubeLockProfiles

type KubeLockProfiles struct {
	Name             string                     `yaml:"name"`
	BlockedVerbs     []string                   `yaml:"blockedVerbs"`
	DeleteExceptions []KubeLockDeleteExceptions `yaml:"deleteExceptions"`
}

type PlainFormatter

type PlainFormatter struct {
}

func (*PlainFormatter) Format

func (f *PlainFormatter) Format(entry *log.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL