Documentation ¶
Index ¶
- Constants
- Variables
- func AddKeyPair(vsapi VsApi) (err error)
- func Addkey(vsapi VsApi) (exitcode int)
- func GetKvVersion(vsapi VsApi) int
- func GetMode(vsapi VsApi) string
- func GetPasswd(vsapi VsApi) string
- func GetPrivateKey(vsapi VsApi) string
- func GetPrivateKeyPath(vsapi VsApi) string
- func GetPublicKey(vsapi VsApi) string
- func GetPublicKeyPath(vsapi VsApi) string
- func GetSigningRole(vsapi VsApi) string
- func GetSshServerHost(vsapi VsApi) string
- func GetSshServerPort(vsapi VsApi) int
- func GetSshUsername(vsapi VsApi) string
- func GetTermType(vsapi VsApi) string
- func GetUsername(vsapi VsApi) string
- func GetVaultAddress(vsapi VsApi) string
- func GetVaultClient(vsapi VsApi) *api.Client
- func GetVaultToken(vsapi VsApi) string
- func Scp(vsapi VsApi) (exitcode int)
- func ScpSession(vsapi VsApi) (err error)
- func SetKvVersion(vsapi VsApi, kvVersion int)
- func SetMode(vsapi VsApi, mode string)
- func SetPasswd(vsapi VsApi, pw string)
- func SetPrivateKey(vsapi VsApi, privKey string)
- func SetPrivateKeyPath(vsapi VsApi, keypath string)
- func SetPublicKey(vsapi VsApi, pubKey string)
- func SetPublicKeyPath(vsapi VsApi, keypath string)
- func SetSigningRole(vsapi VsApi, role string)
- func SetSshServerHost(vsapi VsApi, host string)
- func SetSshServerPort(vsapi VsApi, port int)
- func SetSshUsername(vsapi VsApi, username string)
- func SetTermType(vsapi VsApi, termtype string)
- func SetUsername(vsapi VsApi, username string)
- func SetVaultAddress(vsapi VsApi, addr string) error
- func SetVaultClient(vsapi VsApi, client *api.Client)
- func SetVaultToken(vsapi VsApi, token string)
- func SignPubKey(vsapi VsApi, pubKey string) (signedCrt string, err error)
- func Ssh(vsapi VsApi) (exitcode int)
- func StartSession(vsapi VsApi) (err error)
- func VaultLogin(vsapi VsApi) (err error)
- func VaultReadSSHKey(vsapi VsApi) (pubKey, privKey string, err error)
- func VaultWriteSSHKey(vsapi VsApi) (err error)
- type VSConfig
- func (vsConfig *VSConfig) AddKeyPair() (err error)
- func (vsConfig *VSConfig) AddKeyPairAux() (err error)
- func (vsConfig *VSConfig) GetKvVersion() int
- func (vsConfig *VSConfig) GetLocalPath() string
- func (vsConfig *VSConfig) GetMode() string
- func (vsConfig *VSConfig) GetPasswd() string
- func (vsConfig *VSConfig) GetPrivateKey() string
- func (vsConfig *VSConfig) GetPrivateKeyPath() string
- func (vsConfig *VSConfig) GetPublicKey() string
- func (vsConfig *VSConfig) GetPublicKeyPath() string
- func (vsConfig *VSConfig) GetRemoteCommand() string
- func (vsConfig *VSConfig) GetRemotePath() string
- func (vsConfig *VSConfig) GetSigningRole() string
- func (vsConfig *VSConfig) GetSshServerHost() string
- func (vsConfig *VSConfig) GetSshServerPort() int
- func (vsConfig *VSConfig) GetSshUsername() string
- func (vsConfig *VSConfig) GetTermType() string
- func (vsConfig *VSConfig) GetUsername() string
- func (vsConfig *VSConfig) GetVaultAddress() string
- func (vsConfig *VSConfig) GetVaultClient() *api.Client
- func (vsConfig *VSConfig) GetVaultToken() string
- func (vsConfig *VSConfig) ScpSession() (err error)
- func (vsConfig *VSConfig) ScpSessionAux() (err error)
- func (vsConfig *VSConfig) SetKvVersion(kvVersion int)
- func (vsConfig *VSConfig) SetLocalPath(localPath string)
- func (vsConfig *VSConfig) SetMode(mode string)
- func (vsConfig *VSConfig) SetPasswd(pw string)
- func (vsConfig *VSConfig) SetPrivateKey(privKey string)
- func (vsConfig *VSConfig) SetPrivateKeyPath(keypath string)
- func (vsConfig *VSConfig) SetPublicKey(pubKey string)
- func (vsConfig *VSConfig) SetPublicKeyPath(keypath string)
- func (vsConfig *VSConfig) SetRemoteCommand(remoteCommand string)
- func (vsConfig *VSConfig) SetRemotePath(remotepath string)
- func (vsConfig *VSConfig) SetSigningRole(role string)
- func (vsConfig *VSConfig) SetSshServerHost(host string)
- func (vsConfig *VSConfig) SetSshServerPort(port int)
- func (vsConfig *VSConfig) SetSshUsername(username string)
- func (vsConfig *VSConfig) SetTermType(termtype string)
- func (vsConfig *VSConfig) SetUsername(username string)
- func (vsConfig *VSConfig) SetVaultAddress(addr string) (err error)
- func (vsConfig *VSConfig) SetVaultClient(client *api.Client)
- func (vsConfig *VSConfig) SetVaultToken(token string)
- func (vsConfig *VSConfig) SignPubKey(pubKey string) (signedCrt string, err error)
- func (vsConfig *VSConfig) SignPubKeyAux(pubkey string) (signedCrt string, err error)
- func (vsConfig *VSConfig) StartSession() (err error)
- func (vsConfig *VSConfig) StartSessionAux() (err error)
- func (vsConfig *VSConfig) VaultLogin() (err error)
- func (vsConfig *VSConfig) VaultReadSSHKey() (pubkey, privkey string, err error)
- func (vsConfig *VSConfig) VaultWriteSSHKey() (err error)
- type VsApi
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 GetKvVersion ¶ added in v0.1.1
func GetPrivateKey ¶
func GetPrivateKeyPath ¶
func GetPublicKey ¶
func GetPublicKeyPath ¶
func GetSigningRole ¶
func GetSshServerHost ¶
func GetSshServerPort ¶
func GetSshUsername ¶
func GetTermType ¶
func GetUsername ¶
func GetVaultAddress ¶
func GetVaultClient ¶
func GetVaultToken ¶
func ScpSession ¶ added in v0.1.2
func SetKvVersion ¶ added in v0.1.1
func SetPrivateKey ¶
func SetPrivateKeyPath ¶
func SetPublicKey ¶
func SetPublicKeyPath ¶
func SetSigningRole ¶
func SetSshServerHost ¶
func SetSshServerPort ¶
func SetSshUsername ¶
func SetTermType ¶
func SetUsername ¶
func SetVaultAddress ¶
func SetVaultClient ¶
func SetVaultToken ¶
func StartSession ¶
func VaultLogin ¶
func VaultReadSSHKey ¶
func VaultWriteSSHKey ¶
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) AddKeyPairAux ¶
func (*VSConfig) GetKvVersion ¶ added in v0.1.1
func (*VSConfig) GetLocalPath ¶ added in v0.1.2
func (*VSConfig) GetPrivateKey ¶
func (*VSConfig) GetPrivateKeyPath ¶
func (*VSConfig) GetPublicKey ¶
func (*VSConfig) GetPublicKeyPath ¶
func (*VSConfig) GetRemoteCommand ¶ added in v0.1.3
func (*VSConfig) GetRemotePath ¶ added in v0.1.2
func (*VSConfig) GetSigningRole ¶
func (*VSConfig) GetSshServerHost ¶
func (*VSConfig) GetSshServerPort ¶
func (*VSConfig) GetSshUsername ¶
func (*VSConfig) GetTermType ¶
func (*VSConfig) GetUsername ¶
func (*VSConfig) GetVaultAddress ¶
func (*VSConfig) GetVaultClient ¶
func (*VSConfig) GetVaultToken ¶
func (*VSConfig) ScpSession ¶ added in v0.1.2
func (*VSConfig) ScpSessionAux ¶ added in v0.1.2
func (*VSConfig) SetKvVersion ¶ added in v0.1.1
func (*VSConfig) SetLocalPath ¶ added in v0.1.2
func (*VSConfig) SetPrivateKey ¶
func (*VSConfig) SetPrivateKeyPath ¶
func (*VSConfig) SetPublicKey ¶
func (*VSConfig) SetPublicKeyPath ¶
func (*VSConfig) SetRemoteCommand ¶ added in v0.1.3
func (*VSConfig) SetRemotePath ¶ added in v0.1.2
func (*VSConfig) SetSigningRole ¶
func (*VSConfig) SetSshServerHost ¶
func (*VSConfig) SetSshServerPort ¶
func (*VSConfig) SetSshUsername ¶
func (*VSConfig) SetTermType ¶
func (*VSConfig) SetUsername ¶
func (*VSConfig) SetVaultAddress ¶
func (*VSConfig) SetVaultClient ¶
func (*VSConfig) SetVaultToken ¶
func (*VSConfig) SignPubKey ¶
func (*VSConfig) SignPubKeyAux ¶
func (*VSConfig) StartSession ¶
func (*VSConfig) StartSessionAux ¶
func (*VSConfig) VaultLogin ¶
func (*VSConfig) VaultReadSSHKey ¶
func (*VSConfig) VaultWriteSSHKey ¶
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)
Click to show internal directories.
Click to hide internal directories.