internal

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SenderVendorSlack = "slack"

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSAccount

type AWSAccount struct {
	Name       string   `yaml:"name"`
	Exclusions []string `yaml:"exclusions"`
	Sender     string   `yaml:"sender"`
	Profile    string   `yaml:"profile"`
	Region     string   `yaml:"region"`
}

type AWSAccountSet

type AWSAccountSet map[string]AWSAccount

type Client

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

func NewClient

func NewClient(profile, region string) *Client

func (Client) FetchAllInstances

func (c Client) FetchAllInstances(ctx context.Context) (Instances, error)

func (Client) StopInstances added in v0.2.0

func (c Client) StopInstances(ctx context.Context, instanceIDs []*string) (StopInstances, error)

type ConfigTemplate

type ConfigTemplate struct {
	AWSAccountSet AWSAccountSet `yaml:"accounts"`
	SenderSet     SenderSet     `yaml:"senders"`
}

type CurrentState added in v0.2.0

type CurrentState struct {
	Code int64  `json:"code"`
	Name string `json:"name"`
}

type Instance

type Instance struct {
	ID    string
	Name  string
	State string
}

func (Instance) ConvertToMsgMaterial

func (i Instance) ConvertToMsgMaterial() (*sender.Material, error)

type Instances

type Instances []Instance

func (Instances) ConvertToMsgMaterials

func (is Instances) ConvertToMsgMaterials() (sender.Materials, error)

type Manager

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

func NewManger

func NewManger(configPath string) *Manager

func (Manager) PrintAllState added in v0.2.0

func (m Manager) PrintAllState(ctx context.Context) error

func (Manager) StopAllInstances added in v0.2.0

func (m Manager) StopAllInstances(ctx context.Context) error

type PreviousState added in v0.2.0

type PreviousState struct {
	Code int64  `json:"code"`
	Name string `json:"name"`
}

type SenderSet

type SenderSet map[string]map[string]interface{}

type StopInstance added in v0.2.0

type StopInstance struct {
	InstanceID    string        `json:"InstanceID"`
	CurrentState  CurrentState  `json:"CurrentState"`
	PreviousState PreviousState `json:"PreviousState"`
}

type StopInstances added in v0.2.0

type StopInstances []StopInstance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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