api

package
v0.0.2-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ec2Collection

type Ec2Collection struct {
	Instances []Ec2Instance
	EIPs      []Eip
}

Ec2Collection holds structs of Ec2Instance's and Eip's queried from AWS API

func GetServers

func GetServers(conf *config.AwsshConf) *Ec2Collection

GetServers is a constructor for Ec2Collection and loads instances and EIPs slice

func (*Ec2Collection) Filtered

func (ec *Ec2Collection) Filtered(args []string) []Ec2Instance

func (*Ec2Collection) HasEip

func (col *Ec2Collection) HasEip(e *Ec2Instance) bool

HasEip will check if the Ec2Instance public ip is a ElasticIp

func (*Ec2Collection) ListServers

func (col *Ec2Collection) ListServers()

ListServers prints our a formatted list of the instances slice

func (*Ec2Collection) LoadEips

func (col *Ec2Collection) LoadEips(conf *config.AwsshConf)

type Ec2Instance

type Ec2Instance struct {
	Name      string
	Ip        string
	PrivateIp string
	HasEip    bool
}

func (*Ec2Instance) GetLine

func (e *Ec2Instance) GetLine() string

func (*Ec2Instance) GetLinePrivate

func (e *Ec2Instance) GetLinePrivate() string

func (*Ec2Instance) GetTplMap

func (e *Ec2Instance) GetTplMap() map[string]string

func (*Ec2Instance) Match

func (e *Ec2Instance) Match(args []string) bool

type Eip

type Eip struct {
	Ip string
}

Eip is an elastic ip from the AWS API

Jump to

Keyboard shortcuts

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