client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllStates = []string{
		"pending",
		"running",
		"stopping",
		"stopped",
		"shutting-down",
		"terminated",
	}
)

Functions

This section is empty.

Types

type ByName

type ByName []Instance

func (ByName) Len

func (b ByName) Len() int

func (ByName) Less

func (b ByName) Less(i, j int) bool

func (ByName) Swap

func (b ByName) Swap(i, j int)

type CallerIdentity

type CallerIdentity struct {
	UserId  string
	Account string
	Arn     string
}

func GetMockedUser added in v0.1.0

func GetMockedUser() *CallerIdentity

type Ec2Client

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

func NewEc2Client

func NewEc2Client(cfg aws.Config) *Ec2Client

func (*Ec2Client) GetInstances

func (e *Ec2Client) GetInstances() ([]Instance, error)

func (*Ec2Client) GetInstancesByState

func (e *Ec2Client) GetInstancesByState(states []string) ([]Instance, error)

type Ec2ClientInterface

type Ec2ClientInterface interface {
	DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error)
}

type Instance

type Instance struct {
	Id           string
	Name         string
	State        string
	InstanceType string
	Keyname      string
	Ip           string
	LaunchTime   string
}

func GetMockedInstances added in v0.1.0

func GetMockedInstances(n int) []Instance

func (*Instance) String

func (i *Instance) String() string

type StsClient

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

func NewSts

func NewSts(cfg aws.Config) *StsClient

func (*StsClient) GetCallerIdentity

func (s *StsClient) GetCallerIdentity() (*CallerIdentity, error)

type StsClientInterface

type StsClientInterface interface {
	GetCallerIdentity(ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error)
}

Jump to

Keyboard shortcuts

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