util

package
v0.0.0-...-3e35b49 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeProjectId

func EncodeProjectId(name string) string

func ExitOnError

func ExitOnError(msg string, err error)

func FileExists

func FileExists(name string) bool

func IsWritable

func IsWritable(path string) bool

Types

type Agent

type Agent struct {
	Agent agent.Agent
}

func NewSshAgentClient

func NewSshAgentClient() Agent

func (Agent) AddKey

func (sshAgent Agent) AddKey(key KeyPair)

type Command

type Command interface {
	Run() error
	RunDir(string) error
	RunDirWithArgs(string, ...string) error
	RunWithArgs(...string) error
	SetArgs(...string)
	AppendArg(string)
}

func NewCommand

func NewCommand(command string, args ...string) Command

func NewCommandDir

func NewCommandDir(dir string, command string, args ...string) Command

type CommandImpl

type CommandImpl struct {
	Command
	// contains filtered or unexported fields
}

func (CommandImpl) Run

func (cmd CommandImpl) Run() error

func (CommandImpl) RunDir

func (cmd CommandImpl) RunDir(dir string) error

func (CommandImpl) RunDirWithArgs

func (cmd CommandImpl) RunDirWithArgs(dir string, args ...string) error

func (CommandImpl) RunWithArgs

func (cmd CommandImpl) RunWithArgs(args ...string) error

type KeyPair

type KeyPair struct {
	RsaKey    *rsa.PrivateKey
	PublicKey ssh.PublicKey
}

func NewKeyPair

func NewKeyPair() KeyPair

func (KeyPair) GetPrivateKey

func (key KeyPair) GetPrivateKey() string

func (KeyPair) GetPublicKey

func (key KeyPair) GetPublicKey() string

func (KeyPair) WritePrivateKey

func (key KeyPair) WritePrivateKey(filename string)

func (KeyPair) WritePublicKey

func (key KeyPair) WritePublicKey(filename string)

func (KeyPair) WritePublicPem

func (key KeyPair) WritePublicPem(filename string)

Jump to

Keyboard shortcuts

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