config

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MainManager = NewManager()

	ErrUnknownProfile = errors.New("profile not found")
	ErrConfigLoad     = errors.New("unable to load config")
	ErrInvalidValue   = errors.New("invalid value")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Profiles NamedProfiles `json:"profiles" yaml:"profiles"`
}

type Environ

type Environ map[string]string

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func (*Manager) GetProfile

func (manager *Manager) GetProfile() (*Profile, error)

func (*Manager) HasProfileName

func (manager *Manager) HasProfileName() bool

func (*Manager) Load

func (manager *Manager) Load() error

func (*Manager) MakeAbsolute

func (manager *Manager) MakeAbsolute(path *string) error

func (*Manager) SetProfileName

func (manager *Manager) SetProfileName(profileName string)

func (*Manager) UpdateFlagSet

func (manager *Manager) UpdateFlagSet(command *cobra.Command, flags *pflag.FlagSet)

func (*Manager) Validate

func (manager *Manager) Validate() error

type NamedProfiles

type NamedProfiles map[string]Profile

type PortForward

type PortForward string

type PortForwardList

type PortForwardList []PortForward

type Profile

type Profile struct {
	Name string `yaml:"-"`

	Command []string `yaml:"command,omitempty"`

	SyncPaths []SyncPath `yaml:"syncPaths,omitempty"`

	PortForwards PortForwardList `yaml:"portForwards,omitempty"`

	Environ Environ `yaml:"environment,omitempty"`

	Resources ResourceList `yaml:"resources,omitempty"`
}

type Resource

type Resource struct {
	CPU    string `yaml:"cpu,omitempty"`
	Memory string `yaml:"memory,omitempty"`
}

type ResourceList

type ResourceList struct {
	Limits   Resource `yaml:"limits,omitempty"`
	Requests Resource `yaml:"requests,omitempty"`
}

type ShellCompletion

type ShellCompletion func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

type SyncPath

type SyncPath struct {
	RemotePath string `yaml:"remotePath"`
	LocalPath  string `yaml:"localPath"`
}

Jump to

Keyboard shortcuts

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