cli

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearTerminal

func ClearTerminal()

func DeleteEnv

func DeleteEnv(argDeleteEnv *string, envReader *env.Reader) (bool, error)

func EnterEnvironment

func EnterEnvironment(envi any) error

func NewCompletion

func NewCompletion() *domainOrHandleCompletion

NewCompletion returns a new domainOrHandleCompletion instance.

func PrintEnv

func PrintEnv(argListEnv *bool, envReader *env.Reader) (bool, error)

func PrintVersion

func PrintVersion(argVersion *bool, buildTime, gitCommit, version string) bool

func RetrieveEnvironment

func RetrieveEnvironment(envReader *env.Reader, host, environment, user, password *string, cmd *[]string) (env.Environment, error)

Types

type PresetCompletion

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

PresetCompletion implements the Completion interface for preset names.

func NewPresetCompletion

func NewPresetCompletion(presets preset.Data) *PresetCompletion

NewPresetCompletion returns a new PresetCompletion instance.

func (*PresetCompletion) GetCompletionOptions

func (p *PresetCompletion) GetCompletionOptions(currentCommand []string, entryIndex int) []commandline.CompletionOption

GetCompletionOptions returns the completion options for the given command.

type Service

type Service struct {
	ReturnErrorOnFail bool
	// contains filtered or unexported fields
}

func New

func New(client *rri.Client, presets preset.Data, presetCompletion *PresetCompletion, embedFS embed.FS) *Service

New returns a new Service instance.

func (*Service) ErrorPrinter

func (s *Service) ErrorPrinter(err error)

func (*Service) HandleFile

func (s *Service) HandleFile(args []string) error

func (*Service) HandlePreset

func (s *Service) HandlePreset(args []string) error

func (*Service) PrintColorsAndSigns

func (s *Service) PrintColorsAndSigns()

func (*Service) RawQueryPrinter

func (s *Service) RawQueryPrinter(msg string, isOutgoing bool)

func (*Service) Run

func (s *Service) Run(confDir string, cmd []string) error

Jump to

Keyboard shortcuts

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