gokku

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFile = ".gokku.yml"

Variables

This section is empty.

Functions

func Cli

func Cli(args []string) int

Types

type AppEnv

type AppEnv struct {
	AppName string
	Args    []string

	DefaultCmd Command
	Cmds       map[string]Command

	ConfigFile string
	HasConfig  bool
	Config     *ClientConfig
}

func NewAppEnv

func NewAppEnv(args []string, defaultCmd Command, cmds ...Command) *AppEnv

func (*AppEnv) ParseConfig

func (app *AppEnv) ParseConfig() error

func (*AppEnv) Run

func (app *AppEnv) Run() int

type ClientConfig

type ClientConfig struct {
	Username string
	Hostname string
	Port     int `yaml:"port,omitempty"`

	KeyFile string `yaml:"keyfile,omitempty"`

	IgnoreAgent bool `yaml:"ignore-agent,omitempty"`
	// contains filtered or unexported fields
}

ClientConfig represents the configuration of the gokku CLI client.

The type gets marshalled as the "Gokku" key of an anonymous struct for the yaml .gokku.yml file.

func (*ClientConfig) Key

func (c *ClientConfig) Key() ssh.Signer

type Command

type Command interface {
	Name() string
	Execute(app *AppEnv, args []string) int
}

Command represents a CLI subcommand.

Jump to

Keyboard shortcuts

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