Documentation ¶
Index ¶
- func All(image *ec2.Image) bool
- func InstanceHeader()
- func NoPassPhrase() string
- func PStr(pstr *string, replacement ...string) string
- func PassPhrasePrompt() string
- func Sort(n int, swap func(i, j int), less func(i, j int) bool)
- func TagFilter(tags []*ec2.Tag, key string) string
- func Windows(image *ec2.Image) bool
- type EC2Client
- func (c *EC2Client) Close()
- func (c *EC2Client) GetImageByID(imageID *string) (*ec2.Image, error)
- func (c *EC2Client) GetInstances(filters []*ec2.Filter) *Instances
- func (c *EC2Client) GetKeyPairInfoByName(keyName *string) (*ec2.KeyPairInfo, error)
- func (c *EC2Client) GetPasswordData(instanceID string) string
- func (c *EC2Client) SetRegion(region string)
- func (c *EC2Client) StartInstance(filters []*ec2.Filter)
- func (c *EC2Client) StopInstance(filters []*ec2.Filter)
- type InstanceFilter
- type Instances
- type KeyFile
- type PassPhraseFunc
- type PlaformFilterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PStr ¶
PStr -- convert string pointer to string, on nil pointer replacement value in first element or "" by default
func PassPhrasePrompt ¶
func PassPhrasePrompt() string
PassPhrasePrompt -- prompt for passphrase input
Types ¶
type EC2Client ¶
type EC2Client struct {
// contains filtered or unexported fields
}
EC2Client --
func NewEC2Client ¶
func NewEC2Client(region, profile string, cmdLineCreds func() credentials.Value) *EC2Client
NewEC2Client --
func (*EC2Client) GetImageByID ¶ added in v0.0.13
GetImageByID --
func (*EC2Client) GetInstances ¶
GetInstances --
func (*EC2Client) GetKeyPairInfoByName ¶ added in v0.0.13
func (c *EC2Client) GetKeyPairInfoByName(keyName *string) (*ec2.KeyPairInfo, error)
GetKeyPairInfoByName --
func (*EC2Client) GetPasswordData ¶
GetPasswordData --
func (*EC2Client) StartInstance ¶
StartInstance --
func (*EC2Client) StopInstance ¶
StopInstance --
type InstanceFilter ¶
type InstanceFilter struct {
// contains filtered or unexported fields
}
InstanceFilter --
type Instances ¶
Instances --
func (*Instances) PlatformFilter ¶ added in v0.0.13
func (in *Instances) PlatformFilter(c *EC2Client, f PlaformFilterFunc) *Instances
PlatformFilter --
type KeyFile ¶
type KeyFile struct { FileName string Key *rsa.PrivateKey }
KeyFile -- key file structure
func ParseKeyFile ¶
func ParseKeyFile(keyFile string, passPhraseFunc PassPhraseFunc) (*KeyFile, error)
ParseKeyFile -- return RSA key
func (*KeyFile) FingerPrintMD5 ¶
FingerPrintMD5 -- MD5 fingerprint of public key of keyfile AWS imported keys - generate MD5 hash of public key openssl rsa -in path_to_private_key -pubout -outform DER | openssl md5 -c
func (*KeyFile) FingerPrintSHA1 ¶
FingerPrintSHA1 -- SHA1 fingerprint private key of keyfile AWS generate - generate SHA1 has of PK8 key openssl pkcs8 -in path_to_private_key -inform PEM -outform DER -topk8 -nocrypt | openssl sha1 -c
type PassPhraseFunc ¶
type PassPhraseFunc func() string
PassPhraseFunc -- callback function to set the passphrase
func PassPhrase ¶
func PassPhrase(pp string) PassPhraseFunc
PassPhrase -- return argument as passphrase
type PlaformFilterFunc ¶ added in v0.0.13
PlaformFilterFunc --