Documentation ¶
Index ¶
- Variables
- func IsKeyEncrypted(keyPath string) bool
- type Cipher
- type Config
- func (c *Config) ClientConfig() (*ssh.ClientConfig, error)
- func (c *Config) Load(filename string) error
- func (c *Config) LoadFromReader(reader io.Reader, ext string) error
- func (c *Config) NewJWTConfig(scopes ...string) (*jwt.Config, error)
- func (c *Config) SSHClientConfig() (*ssh.ClientConfig, error)
- func (c *Config) Save(filename string) error
- func (c *Config) Write(writer io.Writer) error
- type Decryptor
- type Encryptor
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKey = []byte{0x24, 0x66, 0xDD, 0x87, 0x8B, 0x96, 0x3C, 0x9D}
View Source
var PasswordCipher = GetDefaultPasswordCipher()
Functions ¶
func IsKeyEncrypted ¶
IsKeyEncrypted checks if supplied key content is encrypyed by password
Types ¶
type Cipher ¶
func GetDefaultPasswordCipher ¶
func GetDefaultPasswordCipher() Cipher
GetDefaultPasswordCipher return a default password cipher
func NewBlowfishCipher ¶
type Config ¶
type Config struct { Username string `json:",omitempty"` Password string `json:",omitempty"` EncryptedPassword string `json:",omitempty"` PrivateKeyPath string `json:",omitempty"` //amazon cloud credential Key string `json:",omitempty"` Secret string `json:",omitempty"` Region string `json:",omitempty"` //google cloud credential ClientEmail string `json:"client_email,omitempty"` TokenURL string `json:"token_uri,omitempty"` PrivateKey string `json:"private_key,omitempty"` PrivateKeyID string `json:"private_key_id,omitempty"` ProjectID string `json:"project_id,omitempty"` //JSON string for this secret Data string `json:",omitempty"` // contains filtered or unexported fields }
func (*Config) ClientConfig ¶
func (c *Config) ClientConfig() (*ssh.ClientConfig, error)
ClientConfig returns a new instance of sshClientConfig
func (*Config) NewJWTConfig ¶
NewJWTConfig returns new JWT config for supplied scopes
func (*Config) SSHClientConfig ¶
func (c *Config) SSHClientConfig() (*ssh.ClientConfig, error)
SSHClientConfig returns a new instance of sshClientConfig
Click to show internal directories.
Click to hide internal directories.