cmd

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LakectlInteractive        = "LAKECTL_INTERACTIVE"
	LakectlInteractiveDisable = "no"
	DeathMessage              = "Error executing command: {{.Error|red}}\n"
)
View Source
const (
	ConfigAccessKeyID        = "credentials.access_key_id"
	ConfigSecretAccessKey    = "credentials.secret_access_key"
	ConfigServerEndpointURL  = "server.endpoint_url"
	DefaultServerEndpointURL = "http://127.0.0.1:8000"
)
View Source
const (
	DefaultBranch = "master"
)

Variables

This section is empty.

Functions

func Die

func Die(err string, code int)

func DieErr

func DieErr(err error)

func DieFmt

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

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 *models.Diff, withDirection bool)

func ParseDocument

func ParseDocument(dest interface{}, filename string, fileTitle string)

ParseDocument parses the contents of filename into dest, which should be a JSON-deserializable struct. If filename is "-" it reads standard input. If any errors occur it dies with an error message containing fileTitle.

func PrintTable

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

func Write

func Write(tpl string, ctx interface{})

func WriteTo

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

Types

type APIError

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

type Pagination

type Pagination struct {
	Amount  int
	HasNext bool
	After   string
}

type StatementDoc

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

type Table

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

Jump to

Keyboard shortcuts

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