goemon

package
v0.0.0-...-409865a Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssumeRoleWithSession

func AssumeRoleWithSession(session *session.Session, rolearn string) *credentials.Credentials

AssumeRoleWithSession gets temporary credentials needed to access other accounts

func Check

func Check(flag *CheckFlag)

Check AWS infomation

func ConnectEC2

func ConnectEC2(session *session.Session, credential *credentials.Credentials, region string, profile string) (result *ec2.EC2)

ConnectEC2 is Connect EC2 Service

func ConnectRDS

func ConnectRDS(session *session.Session, credential *credentials.Credentials, region string, profile string) (result *rds.RDS)

ConnectRDS is Connect RDS Service

func GetEC2InstanceEvents

func GetEC2InstanceEvents(notifier Notifier, ec2service *ec2.EC2) (results [][]string)

GetEC2InstanceEvents is get event information from EC2 instance status

func GetEC2InstanceStatus

func GetEC2InstanceStatus(service *ec2.EC2, instance string) (result *ec2.DescribeInstanceStatusOutput, err error)

GetEC2InstanceStatus is get list of instance status

func GetEC2Instances

func GetEC2Instances(service *ec2.EC2, instance string) (result *ec2.DescribeInstancesOutput, err error)

GetEC2Instances is get list of instance infomation

func GetRDSPendingMaintenanceActionDetails

func GetRDSPendingMaintenanceActionDetails(notifier Notifier, rdsservice *rds.RDS) (results [][]string)

GetRDSPendingMaintenanceActionDetails is get maintenance action infomation from RDS pending maintenance actions

func GetRDSPendingMaintenanceActions

func GetRDSPendingMaintenanceActions(service *rds.RDS, instance string) (result *rds.DescribePendingMaintenanceActionsOutput, err error)

GetRDSPendingMaintenanceActions is get list of instance pending maintenance actions

func NotifyEC2Chatwork

func NotifyEC2Chatwork(chatwork []ChatworkNotifer, ec2events [][]string)

NotifyEC2Chatwork is notify EC2 schedule events to chatwork

func NotifyRDSChatwork

func NotifyRDSChatwork(chatwork []ChatworkNotifer, rdsactions [][]string)

NotifyRDSChatwork is notify RDS maintenance actions to chatwork

func PostChatwork

func PostChatwork(roomid string, apikey string, body string)

PostChatwork is post chatwork api

func Unmarshal

func Unmarshal(file string) (err error)

Unmarshal is store yaml in a structure

Types

type ChatworkNotifer

type ChatworkNotifer struct {
	Roomid string   `mapstructure:"roomid"`
	Apikey string   `mapstructure:"apikey"`
	To     []string `mapstructure:"to"`
}

ChatworkNotifer is Notify to Chatwork

type CheckFlag

type CheckFlag struct {
	Config string
}

CheckFlag Option parsed by cobra

type Config

type Config struct {
	Notifier []Notifier `mapstructure:"notifier"`
}

Config Unmarshal yaml file

type EC2Infomation

type EC2Infomation struct {
	Instances []string `mapstructure:"instances"`
}

EC2Infomation is EC2 instance infomation

type Notifier

type Notifier struct {
	Notification string            `mapstructure:"notification"`
	Region       string            `mapstructure:"region"`
	Profile      string            `mapstructure:"profile"`
	Assumerole   bool              `mapstructure:"assumerole"`
	Rolearn      string            `mapstructure:"rolearn"`
	Chatwork     []ChatworkNotifer `mapstructure:"chatwork"`
	EC2          []EC2Infomation   `mapstructure:"ec2"`
	RDS          []RDSInfomation   `mapstructure:"rds"`
}

Notifier is a notification notifier

type RDSInfomation

type RDSInfomation struct {
	Instances []string `mapstructure:"instances"`
}

RDSInfomation is RDS instance infomation

Jump to

Keyboard shortcuts

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