vs

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADDKEY  = "addkey"
	SSH     = "ssh"
	SCPTO   = "scpto"
	SCPFROM = "scpfrom"
)
View Source
const (
	BUFSIZE = 1024
)

Variables

View Source
var (
	VersionString string
)

Functions

func AddKeyPair

func AddKeyPair(vsapi VsApi) (err error)

func Addkey

func Addkey(vsapi VsApi) (exitcode int)

func GetKvVersion added in v0.1.1

func GetKvVersion(vsapi VsApi) int

func GetMode

func GetMode(vsapi VsApi) string

func GetPasswd

func GetPasswd(vsapi VsApi) string

func GetPrivateKey

func GetPrivateKey(vsapi VsApi) string

func GetPrivateKeyPath

func GetPrivateKeyPath(vsapi VsApi) string

func GetPublicKey

func GetPublicKey(vsapi VsApi) string

func GetPublicKeyPath

func GetPublicKeyPath(vsapi VsApi) string

func GetSigningRole

func GetSigningRole(vsapi VsApi) string

func GetSshServerHost

func GetSshServerHost(vsapi VsApi) string

func GetSshServerPort

func GetSshServerPort(vsapi VsApi) int

func GetSshUsername

func GetSshUsername(vsapi VsApi) string

func GetTermType

func GetTermType(vsapi VsApi) string

func GetUsername

func GetUsername(vsapi VsApi) string

func GetVaultAddress

func GetVaultAddress(vsapi VsApi) string

func GetVaultClient

func GetVaultClient(vsapi VsApi) *api.Client

func GetVaultToken

func GetVaultToken(vsapi VsApi) string

func Scp added in v0.1.2

func Scp(vsapi VsApi) (exitcode int)

func ScpSession added in v0.1.2

func ScpSession(vsapi VsApi) (err error)

func SetKvVersion added in v0.1.1

func SetKvVersion(vsapi VsApi, kvVersion int)

func SetMode

func SetMode(vsapi VsApi, mode string)

func SetPasswd

func SetPasswd(vsapi VsApi, pw string)

func SetPrivateKey

func SetPrivateKey(vsapi VsApi, privKey string)

func SetPrivateKeyPath

func SetPrivateKeyPath(vsapi VsApi, keypath string)

func SetPublicKey

func SetPublicKey(vsapi VsApi, pubKey string)

func SetPublicKeyPath

func SetPublicKeyPath(vsapi VsApi, keypath string)

func SetSigningRole

func SetSigningRole(vsapi VsApi, role string)

func SetSshServerHost

func SetSshServerHost(vsapi VsApi, host string)

func SetSshServerPort

func SetSshServerPort(vsapi VsApi, port int)

func SetSshUsername

func SetSshUsername(vsapi VsApi, username string)

func SetTermType

func SetTermType(vsapi VsApi, termtype string)

func SetUsername

func SetUsername(vsapi VsApi, username string)

func SetVaultAddress

func SetVaultAddress(vsapi VsApi, addr string) error

func SetVaultClient

func SetVaultClient(vsapi VsApi, client *api.Client)

func SetVaultToken

func SetVaultToken(vsapi VsApi, token string)

func SignPubKey

func SignPubKey(vsapi VsApi, pubKey string) (signedCrt string, err error)

func Ssh

func Ssh(vsapi VsApi) (exitcode int)

func StartSession

func StartSession(vsapi VsApi) (err error)

func VaultLogin

func VaultLogin(vsapi VsApi) (err error)

func VaultReadSSHKey

func VaultReadSSHKey(vsapi VsApi) (pubKey, privKey string, err error)

func VaultWriteSSHKey

func VaultWriteSSHKey(vsapi VsApi) (err error)

Types

type VSConfig

type VSConfig struct {
	// contains filtered or unexported fields
}

func NewVSConfig

func NewVSConfig() *VSConfig

Really a singleton constructor as flags can't be parsed more than once

func (*VSConfig) AddKeyPair

func (vsConfig *VSConfig) AddKeyPair() (err error)

func (*VSConfig) AddKeyPairAux

func (vsConfig *VSConfig) AddKeyPairAux() (err error)

func (*VSConfig) GetKvVersion added in v0.1.1

func (vsConfig *VSConfig) GetKvVersion() int

func (*VSConfig) GetLocalPath added in v0.1.2

func (vsConfig *VSConfig) GetLocalPath() string

func (*VSConfig) GetMode

func (vsConfig *VSConfig) GetMode() string

func (*VSConfig) GetPasswd

func (vsConfig *VSConfig) GetPasswd() string

func (*VSConfig) GetPrivateKey

func (vsConfig *VSConfig) GetPrivateKey() string

func (*VSConfig) GetPrivateKeyPath

func (vsConfig *VSConfig) GetPrivateKeyPath() string

func (*VSConfig) GetPublicKey

func (vsConfig *VSConfig) GetPublicKey() string

func (*VSConfig) GetPublicKeyPath

func (vsConfig *VSConfig) GetPublicKeyPath() string

func (*VSConfig) GetRemoteCommand added in v0.1.3

func (vsConfig *VSConfig) GetRemoteCommand() string

func (*VSConfig) GetRemotePath added in v0.1.2

func (vsConfig *VSConfig) GetRemotePath() string

func (*VSConfig) GetSigningRole

func (vsConfig *VSConfig) GetSigningRole() string

func (*VSConfig) GetSshServerHost

func (vsConfig *VSConfig) GetSshServerHost() string

func (*VSConfig) GetSshServerPort

func (vsConfig *VSConfig) GetSshServerPort() int

func (*VSConfig) GetSshUsername

func (vsConfig *VSConfig) GetSshUsername() string

func (*VSConfig) GetTermType

func (vsConfig *VSConfig) GetTermType() string

func (*VSConfig) GetUsername

func (vsConfig *VSConfig) GetUsername() string

func (*VSConfig) GetVaultAddress

func (vsConfig *VSConfig) GetVaultAddress() string

func (*VSConfig) GetVaultClient

func (vsConfig *VSConfig) GetVaultClient() *api.Client

func (*VSConfig) GetVaultToken

func (vsConfig *VSConfig) GetVaultToken() string

func (*VSConfig) ScpSession added in v0.1.2

func (vsConfig *VSConfig) ScpSession() (err error)

func (*VSConfig) ScpSessionAux added in v0.1.2

func (vsConfig *VSConfig) ScpSessionAux() (err error)

func (*VSConfig) SetKvVersion added in v0.1.1

func (vsConfig *VSConfig) SetKvVersion(kvVersion int)

func (*VSConfig) SetLocalPath added in v0.1.2

func (vsConfig *VSConfig) SetLocalPath(localPath string)

func (*VSConfig) SetMode

func (vsConfig *VSConfig) SetMode(mode string)

func (*VSConfig) SetPasswd

func (vsConfig *VSConfig) SetPasswd(pw string)

func (*VSConfig) SetPrivateKey

func (vsConfig *VSConfig) SetPrivateKey(privKey string)

func (*VSConfig) SetPrivateKeyPath

func (vsConfig *VSConfig) SetPrivateKeyPath(keypath string)

func (*VSConfig) SetPublicKey

func (vsConfig *VSConfig) SetPublicKey(pubKey string)

func (*VSConfig) SetPublicKeyPath

func (vsConfig *VSConfig) SetPublicKeyPath(keypath string)

func (*VSConfig) SetRemoteCommand added in v0.1.3

func (vsConfig *VSConfig) SetRemoteCommand(remoteCommand string)

func (*VSConfig) SetRemotePath added in v0.1.2

func (vsConfig *VSConfig) SetRemotePath(remotepath string)

func (*VSConfig) SetSigningRole

func (vsConfig *VSConfig) SetSigningRole(role string)

func (*VSConfig) SetSshServerHost

func (vsConfig *VSConfig) SetSshServerHost(host string)

func (*VSConfig) SetSshServerPort

func (vsConfig *VSConfig) SetSshServerPort(port int)

func (*VSConfig) SetSshUsername

func (vsConfig *VSConfig) SetSshUsername(username string)

func (*VSConfig) SetTermType

func (vsConfig *VSConfig) SetTermType(termtype string)

func (*VSConfig) SetUsername

func (vsConfig *VSConfig) SetUsername(username string)

func (*VSConfig) SetVaultAddress

func (vsConfig *VSConfig) SetVaultAddress(addr string) (err error)

func (*VSConfig) SetVaultClient

func (vsConfig *VSConfig) SetVaultClient(client *api.Client)

func (*VSConfig) SetVaultToken

func (vsConfig *VSConfig) SetVaultToken(token string)

func (*VSConfig) SignPubKey

func (vsConfig *VSConfig) SignPubKey(pubKey string) (signedCrt string, err error)

func (*VSConfig) SignPubKeyAux

func (vsConfig *VSConfig) SignPubKeyAux(pubkey string) (signedCrt string, err error)

func (*VSConfig) StartSession

func (vsConfig *VSConfig) StartSession() (err error)

func (*VSConfig) StartSessionAux

func (vsConfig *VSConfig) StartSessionAux() (err error)

func (*VSConfig) VaultLogin

func (vsConfig *VSConfig) VaultLogin() (err error)

func (*VSConfig) VaultReadSSHKey

func (vsConfig *VSConfig) VaultReadSSHKey() (pubkey, privkey string, err error)

func (*VSConfig) VaultWriteSSHKey

func (vsConfig *VSConfig) VaultWriteSSHKey() (err error)

type VsApi

type VsApi interface {
	GetSigningRole() string
	SetSigningRole(string)

	GetMode() string
	SetMode(string)

	GetVaultAddress() string
	SetVaultAddress(string) error

	GetPublicKeyPath() string
	SetPublicKeyPath(string)

	GetPrivateKeyPath() string
	SetPrivateKeyPath(string)

	GetSshServerHost() string
	SetSshServerHost(string)

	GetSshServerPort() int
	SetSshServerPort(int)

	GetTermType() string
	SetTermType(string)

	GetUsername() string
	SetUsername(string)

	GetSshUsername() string
	SetSshUsername(string)

	GetVaultClient() *api.Client
	SetVaultClient(*api.Client)

	GetVaultToken() string
	SetVaultToken(string)

	GetPasswd() string
	SetPasswd(string)

	GetPrivateKey() string
	SetPrivateKey(string)

	GetPublicKey() string
	SetPublicKey(string)

	GetKvVersion() int
	SetKvVersion(int)

	AddKeyPair() (err error)
	StartSession() (err error)
	ScpSession() (err error)
	SignPubKey(pubKey string) (signedCrt string, err error)
	VaultReadSSHKey() (pubKey, privKey string, err error)
	VaultWriteSSHKey() (err error)
	VaultLogin() (err error)
}

func Initialize

func Initialize() (vsapi VsApi)

Jump to

Keyboard shortcuts

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