cmd

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LakectlInteractive        = "LAKECTL_INTERACTIVE"
	LakectlInteractiveDisable = "no"
	DeathMessage              = "Error executing command: {{.Error|red}}\n"
)
View Source
const (
	AutoConfirmFlagName     = "yes"
	AutoConfigFlagShortName = "y"
	AutoConfirmFlagHelp     = "Automatically say yes to all confirmations"

	StdinFileName = "-"
)
View Source
const (
	DefaultBranch = "main"
)
View Source
const (
	DefaultMaxIdleConnsPerHost = 1000
)
View Source
const (
	ParentNumberFlagName = "parent-number"
)

Variables

This section is empty.

Functions

func AssignAutoConfirmFlag added in v0.31.0

func AssignAutoConfirmFlag(flags *pflag.FlagSet)

func Confirm added in v0.31.0

func Confirm(flags *pflag.FlagSet, question string) (bool, error)

func Die

func Die(err string, code int)

func DieErr

func DieErr(err error)

func DieFmt

func DieFmt(msg string, args ...interface{})

func DieOnResponseError added in v0.40.0

func DieOnResponseError(response interface{}, err error)

func DisableColors

func DisableColors()

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Fmt

func Fmt(msg string, args ...interface{})

func FmtDiff

func FmtDiff(diff api.Diff, withDirection bool)

func MustBool added in v0.33.0

func MustBool(v bool, err error) bool

func MustInt added in v0.33.0

func MustInt(v int, err error) int

func MustParsePathURI added in v0.40.0

func MustParsePathURI(name, s string) *uri.URI

func MustParseRefURI added in v0.40.0

func MustParseRefURI(name, s string) *uri.URI

func MustParseRepoURI added in v0.40.0

func MustParseRepoURI(name, s string) *uri.URI

func MustString added in v0.33.0

func MustString(v string, err error) string

func OpenByPath added in v0.33.0

func OpenByPath(path string) io.ReadSeekCloser

OpenByPath returns a reader from the given path. If path is "-", it consumes Stdin and opens a readable copy that is either deleted (POSIX) or will delete itself on close (non-POSIX, notably WINs).

func PrintTable

func PrintTable(rows [][]interface{}, headers []interface{}, paginator *api.Pagination, amount int)

func Write

func Write(tpl string, data interface{})

func WriteTo

func WriteTo(tpl string, data interface{}, w io.Writer)

Types

type APIError

type APIError interface {
	GetPayload() *api.Error
}

type FromTo added in v0.31.0

type FromTo struct {
	FromRef, ToRef string
}

type Pagination

type Pagination struct {
	Amount  int
	HasNext bool
	After   string
}

type StatementDoc

type StatementDoc struct {
	Statement []api.Statement `json:"statement"`
}

type StatusCoder added in v0.40.0

type StatusCoder interface {
	StatusCode() int
}

type Table

type Table struct {
	Headers []interface{}
	Rows    [][]interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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