cmd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const ClearPreviousLine = "\033[1A\033[K"
View Source
const ResetLine = "\r\033[K"

Variables

View Source
var HelpTopics = map[string]map[string]string{
	"environment": {
		"short": "Environment variables that can be used with gh",

		"long": heredoc.Doc(`
			{{bold "RELIABLY_HOST:"}} specify the Reliably hostname for commands making API requests
			that would otherwise assume the "reliably.com" host.

			{{bold "RELIABLY_TOKEN:"}} an authentication token for reliably.com API requests. Setting
			this avoids to login and takes precedence over previously stored credentials.

			{{bold "RELIABLY_NO_UPDATE_NOTIFIER:"}} set to any value to disable update notifications.
			By default, reliably checks for new releases once every 24 hours and displays
			an upgrade notice on standard error if a newer version was found.
		`),
	},
}

Functions

func Execute

func Execute()

Execute the root command and exit with nonzero code in case of errors

func FormatVersion

func FormatVersion(version string, buildDate string) string

FormatVersion returns a formatted string with Reliably CLI's version

func NewCmdAuth

func NewCmdAuth() *cobra.Command

func NewCmdCompletion

func NewCmdCompletion() *cobra.Command

func NewCmdDiscover

func NewCmdDiscover() *cobra.Command

func NewCmdHistory

func NewCmdHistory() *cobra.Command

func NewCmdRoot

func NewCmdRoot() *cobra.Command

func NewCmdScan added in v0.5.0

func NewCmdScan() *cobra.Command

func NewCmdVersion

func NewCmdVersion() *cobra.Command

func NewCmdWorkflow

func NewCmdWorkflow() *cobra.Command

func NewHelpTopic

func NewHelpTopic(topic string) *cobra.Command

Types

type Choice

type Choice []string

Choice is a list of string

func (Choice) Has

func (list Choice) Has(a string) bool

Has indicates whether the string slice contains the value

type HistoryOptions

type HistoryOptions struct {
	IO         *iostreams.IOStreams
	Hostname   string
	HttpClient func() *http.Client

	History  *interface{}
	OrgID    string
	SourceID string
}

type ScanOptions added in v0.5.0

type ScanOptions struct {
	IO *iostreams.IOStreams

	Files []string
	Exec  *api.NewExecution

	BaseDirectory       string
	OutputFormat        string
	OutputFile          string
	LevelFilter         string
	EnableLiveScan      bool
	KubernetesNamespace string
	KubernetesContext   string
	KubeConfigPath      string
}

type WorkflowOptions

type WorkflowOptions struct {
	IO *iostreams.IOStreams

	Interactive bool
	Stdout      bool

	Platform string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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