awsclient

package
v0.0.0-...-435d8ae Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INSTANCE_PENDING_CODE       instanceStateCode = 0
	INSTANCE_RUNNING_CODE       instanceStateCode = 16
	INSTANCE_SHUTTING_DOWN_CODE instanceStateCode = 32
	INSTANCE_TERMINATED_CODE    instanceStateCode = 48
	INSTANCE_STOPPING_CODE      instanceStateCode = 64
	INSTANCE_STOPPED_CODE       instanceStateCode = 80
)

Variables

View Source
var (
	ErrInstanceIdNotFound = errors.New("instance id not found")

	ErrNoRunningInstances = errors.New("no running instances")
)

Functions

func NewSession

func NewSession() (*session.Session, error)

Types

type AWSClient

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

func New

func New() (*AWSClient, error)

func (*AWSClient) InstanceStatus

func (c *AWSClient) InstanceStatus() (*EC2StatusResp, error)

func (*AWSClient) StartInstance

func (c *AWSClient) StartInstance() error

func (*AWSClient) StopInstance

func (c *AWSClient) StopInstance() error

func (*AWSClient) StoreFile

func (c *AWSClient) StoreFile(zipPath string, filename string) (*S3StoreFileResp, error)

type EC2StatusResp

type EC2StatusResp struct {
	StateCode instanceStateCode
	State     string
}

type S3StoreFileResp

type S3StoreFileResp struct {
	Name  string
	Size  int64
	S3URL string
}

Jump to

Keyboard shortcuts

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