app

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package app implements a common application struct with global configuration and a method per each CLI command.

Index

Constants

This section is empty.

Variables

View Source
var ConfigShowProfileTmpl string
View Source
var ConfigTmpl string

Functions

This section is empty.

Types

type App

type App struct {
	GlobalFlags
	// contains filtered or unexported fields
}

App describes the global application configuration.

func New

func New(globalFlags GlobalFlags) App

Instantiate a new instance of App with defaults.

func (*App) Assume

func (a *App) Assume(flags AssumeFlags) error

Implementation of "assume" CLI command without any knowledge of spf13/cobra internals.

func (*App) CacheClean

func (a *App) CacheClean(flags CacheFlags) error

Implementation of "cache clean" CLI command without any knowledge of spf13/cobra internals.

func (*App) ConfigList

func (a *App) ConfigList() error

Implementation of "config list" CLI command without any knowledge of spf13/cobra internals.

func (*App) ConfigShowProfile

func (a *App) ConfigShowProfile(flags AssumeFlags) error

Implementation of "config show-profile" CLI command without any knowledge of spf13/cobra internals.

func (*App) Version

func (a *App) Version(flags VersionFlags) error

Implementation of "version" CLI command without any knowledge of spf13/cobra internals.

type AssumeFlags

type AssumeFlags struct {
	Profile string `mapstructure:"profile"`
}

CLI flags for this command.

type CacheFlags

type CacheFlags struct {
	Password   bool `mapstructure:"password"`
	Credential bool `mapstructure:"credential"`
}

CLI flags for this command.

type GlobalFlags

type GlobalFlags struct {
	NoColor bool `mapstructure:"no-color"`
	NoEmoji bool `mapstructure:"no-emoji"`
	NoGui   bool `mapstructure:"no-gui"`
	Verbose bool `mapstructure:"verbose"`
}

GlobalFlags describes all the CLI flags applied to all commands.

type VersionFlags

type VersionFlags struct {
	Full bool `mapstructure:"full"`
}

CLI flags for this command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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