profile

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckKubectlVersion added in v0.1.0

func CheckKubectlVersion() error

func CompleteProfile

func CompleteProfile(profileName string) error

CompleteProfile completes a profile with default values

func CompleteStyle added in v0.3.0

func CompleteStyle()

CompleteStyle completes the style with default values

func GetProfileIdx added in v0.3.0

func GetProfileIdx(profileName string) int

func SortProfiles added in v0.1.1

func SortProfiles()

func ValidateAllProfiles

func ValidateAllProfiles() error

func ValidateDebugProfileFile

func ValidateDebugProfileFile() error

func ValidateKubectlPath

func ValidateKubectlPath() error

func ValidateProfile

func ValidateProfile(profileName string) error

ValidateProfile validates a single profile

Types

type CustomDebugProfile

type CustomDebugProfile struct {
	Profiles    []Profile `koanf:"profiles" yaml:"profiles"`
	KubectlPath string    `koanf:"kubectlPath" yaml:"kubectlPath"`
	Style       Style     `koanf:"style" yaml:"style"`
}
var Config CustomDebugProfile

global Profile configuration

type Profile

type Profile struct {
	ProfileName     string            `koanf:"name" yaml:"name" validate:"required"`
	Profile         string            `koanf:"profile" yaml:"profile" validate:"required"`
	Image           string            `koanf:"image" yaml:"image" validate:"required"`
	Namespace       string            `koanf:"namespace" yaml:"namespace" validate:"required"`
	ImagePullPolicy corev1.PullPolicy `koanf:"imagePullPolicy" yaml:"imagePullPolicy" validate:"required"`
	TargetContainer string            `koanf:"targetContainer" yaml:"targetContainer" validate:"required"`
	MatchLabels     map[string]string `koanf:"matchLabels" yaml:"matchLabels" validate:"required"`
	// contains filtered or unexported fields
}

func InteractiveProfiles added in v0.3.0

func InteractiveProfiles() []Profile

InteractiveProfiles returns all profiles that can be used from the interactive mode, dpm run (without args) these profiles do have all required fields set (namespace, labelSelector, image)

func (*Profile) IsBuiltInProfile added in v0.2.0

func (p *Profile) IsBuiltInProfile() bool

func (*Profile) SetBuiltInProfile added in v0.2.0

func (p *Profile) SetBuiltInProfile(b bool)

type Style added in v0.3.0

type Style struct {
	HeaderForegroundColor   string `koanf:"headerForegroundColor" yaml:"headerForegroundColor"`
	HeaderBackgroundColor   string `koanf:"headerBackgroundColor" yaml:"headerBackgroundColor"`
	SelectedForegroundColor string `koanf:"selectedForegroundColor" yaml:"selectedForegroundColor"`
	SelectedBackgroundColor string `koanf:"selectedBackgroundColor" yaml:"selectedBackgroundColor"`
}

Jump to

Keyboard shortcuts

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