shared

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All added in v0.0.13

func All(image *ec2.Image) bool

All --

func InstanceHeader added in v0.0.13

func InstanceHeader()

InstanceHeader --

func NoPassPhrase

func NoPassPhrase() string

NoPassPhrase -- return empty == no passphrase

func PStr

func PStr(pstr *string, replacement ...string) string

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

func Sort added in v0.0.13

func Sort(n int, swap func(i, j int), less func(i, j int) bool)

Sort --

func TagFilter

func TagFilter(tags []*ec2.Tag, key string) string

TagFilter -

func Windows added in v0.0.13

func Windows(image *ec2.Image) bool

Windows --

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) Close

func (c *EC2Client) Close()

Close --

func (*EC2Client) GetImageByID added in v0.0.13

func (c *EC2Client) GetImageByID(imageID *string) (*ec2.Image, error)

GetImageByID --

func (*EC2Client) GetInstances

func (c *EC2Client) GetInstances(filters []*ec2.Filter) *Instances

GetInstances --

func (*EC2Client) GetKeyPairInfoByName added in v0.0.13

func (c *EC2Client) GetKeyPairInfoByName(keyName *string) (*ec2.KeyPairInfo, error)

GetKeyPairInfoByName --

func (*EC2Client) GetPasswordData

func (c *EC2Client) GetPasswordData(instanceID string) string

GetPasswordData --

func (*EC2Client) SetRegion added in v0.0.13

func (c *EC2Client) SetRegion(region string)

SetRegion --

func (*EC2Client) StartInstance

func (c *EC2Client) StartInstance(filters []*ec2.Filter)

StartInstance --

func (*EC2Client) StopInstance

func (c *EC2Client) StopInstance(filters []*ec2.Filter)

StopInstance --

type InstanceFilter

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

InstanceFilter --

func NewInstanceFilter

func NewInstanceFilter() *InstanceFilter

NewInstanceFilter --

func (*InstanceFilter) Add

func (i *InstanceFilter) Add(name, value string)

Add --

func (*InstanceFilter) Get

func (i *InstanceFilter) Get() []*ec2.Filter

Get --

type Instances

type Instances []*ec2.Instance

Instances --

func (*Instances) PlatformFilter added in v0.0.13

func (in *Instances) PlatformFilter(c *EC2Client, f PlaformFilterFunc) *Instances

PlatformFilter --

func (*Instances) Print

func (in *Instances) Print()

Print --

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) Decrypt

func (k *KeyFile) Decrypt(chipherText []byte) string

Decrypt -- decrypt key using key of keyfile

func (*KeyFile) FingerPrintMD5

func (k *KeyFile) FingerPrintMD5() string

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

func (k *KeyFile) FingerPrintSHA1() string

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

type PlaformFilterFunc func(image *ec2.Image) bool

PlaformFilterFunc --

Jump to

Keyboard shortcuts

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