config

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Interact

func Interact(filePath string, config interface{}) error

load the already existing config or enter interactive mode to generate one

Types

type AttachConfig

type AttachConfig struct {
	SourcePath string `yaml:"source_path"`
	Cluster    string `yaml:"cluster"`
	Namespace  string `yaml:"namespace" depends:"Cluster"`
	Deployment string `yaml:"deployment" depends:"Namespace"`
	Container  string `yaml:"container" depends:"Deployment"`
	ListenAddr string `yaml:"listen_addr,omitempty" default:"127.0.0.1:2345"`

	AttachTo string `yaml:"attach_to" depends:"Container"`
	Arch     string `yaml:"arch" default:"amd64"`
}

func (AttachConfig) Addr

func (c AttachConfig) Addr() (host string, port int, err error)

func (AttachConfig) ArchSuggest

func (c AttachConfig) ArchSuggest(d prompt.Document) []prompt.Suggest

func (AttachConfig) AttachToSuggest

func (c AttachConfig) AttachToSuggest(d prompt.Document) []prompt.Suggest

func (AttachConfig) ClusterSuggest

func (c AttachConfig) ClusterSuggest(d prompt.Document) []prompt.Suggest

func (AttachConfig) ContainerSuggest

func (c AttachConfig) ContainerSuggest(d prompt.Document) []prompt.Suggest

func (AttachConfig) DeploymentSuggest

func (c AttachConfig) DeploymentSuggest(d prompt.Document) []prompt.Suggest

func (AttachConfig) ListenAddrSuggest

func (c AttachConfig) ListenAddrSuggest(d prompt.Document) []prompt.Suggest

func (AttachConfig) MarshalYAML

func (c AttachConfig) MarshalYAML() (interface{}, error)

func (AttachConfig) NamespaceSuggest

func (c AttachConfig) NamespaceSuggest(d prompt.Document) []prompt.Suggest

func (AttachConfig) SourcePathSuggest

func (c AttachConfig) SourcePathSuggest(d prompt.Document) []prompt.Suggest

type PatchConfig

type PatchConfig struct {
	SourcePath string `yaml:"source_path"`
	Cluster    string `yaml:"cluster"`
	Namespace  string `yaml:"namespace" depends:"Cluster"`
	Deployment string `yaml:"deployment" depends:"Namespace"`
	Container  string `yaml:"container" depends:"Deployment"`
	ListenAddr string `yaml:"listen_addr,omitempty" default:"127.0.0.1:2345"`

	Image         string `yaml:"image,omitempty" default:"alpine:latest"`
	DelveContinue bool   `yaml:"delve_continue" default:"false"`
	LaunchVscode  bool   `yaml:"launch_vscode" default:"false"`
}

func (PatchConfig) Addr

func (c PatchConfig) Addr() (host string, port int, err error)

func (PatchConfig) ClusterSuggest

func (c PatchConfig) ClusterSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) ContainerSuggest

func (c PatchConfig) ContainerSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) DelveContinueSuggest

func (c PatchConfig) DelveContinueSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) DeploymentSuggest

func (c PatchConfig) DeploymentSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) ImageSuggest

func (c PatchConfig) ImageSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) LaunchVscodeSuggest

func (c PatchConfig) LaunchVscodeSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) ListenAddrSuggest

func (c PatchConfig) ListenAddrSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) MarshalYAML

func (c PatchConfig) MarshalYAML() (interface{}, error)

func (PatchConfig) NamespaceSuggest

func (c PatchConfig) NamespaceSuggest(d prompt.Document) []prompt.Suggest

func (PatchConfig) SourcePathSuggest

func (c PatchConfig) SourcePathSuggest(d prompt.Document) []prompt.Suggest

type PromptExit

type PromptExit int

Jump to

Keyboard shortcuts

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