apihandlers

package
v0.0.0-...-7ce20a8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstancesFormatted

func GetInstancesFormatted(envname, format string)

GetInstancesFormatted retrieve all instances in the subnet

func GetSubnetsFormatted

func GetSubnetsFormatted(format string)

GetSubnetsFormatted retrieve all subnet in a region and format it

func GetTrail

func GetTrail(key, value, format string)

GetTrail returns events captured in cloudtrail

func UpdateEnvTags

func UpdateEnvTags(tagname, tagvalue, envname string)

UpdateEnvTags updates tag with a value for all objects in subnet

Types

type EventData

type EventData struct {
	EventID            string `json:"event_id"`
	EventName          string `json:"event_name"`
	Username           string `json:"username"`
	ResourceID         string `json:"resource_id"`
	EventTime          string `json:"event_time"`
	UserIdentity       string `json:"user_identity"`
	EventSource        string `json:"event_source"`
	AwsRegion          string `json:"aws_region"`
	SourceIPAddress    string `json:"source_IPAddress"`
	UserAgent          string `json:"user_agent"`
	RequestID          string `json:"request_id"`
	EventType          string `json:"event_type"`
	RecipientAccountId string `json:"recipient_accountId"`
	AccountType        string `json:"account_type"`
	PrincipalId        string `json:"principal_id"`
	Arn                string `json:"arn"`
	AccountId          string `json:"account_id"`
	AccessKeyId        string `json:"access_key_Id"`
}

EventData type for handling cloudtrail events data

type EventResponse

type EventResponse struct {
	EventVersion    string `json:"eventVersion"`
	UserIdentity    `json:"userIdentity"`
	EventTime       string `json:"eventTime"`
	EventSource     string `json:"eventSource"`
	EventName       string `json:"eventName"`
	AwsRegion       string `json:"awsRegion"`
	SourceIPAddress string `json:"sourceIPAddress"`
	UserAgent       string `json:"userAgent"`
	//RequestParameters  `json:"requestParameters"`
	//ResponseElements   `json:"responseElements"`
	RequestID          string `json:"requestID"`
	EventID            string `json:"eventID"`
	EventType          string `json:"eventType"`
	RecipientAccountId string `json:"recipientAccountId"`
}

type InstanceData

type InstanceData struct {
	Name          string   `json:"name"`
	InstancesID   string   `json:"instance_id"`
	InstanceState string   `json:"state"`
	InstanceWrk   string   `json:"wrk"`
	InstanceType  string   `json:"type"`
	LaunchedBy    string   `json:"launched_by"`
	Volumes       []string `json:"volumes"`
}

type Item

type Item struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Items

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

type NameSorter

type NameSorter []InstanceData

NameSorter is an implementation of Sort

func (NameSorter) Len

func (a NameSorter) Len() int

func (NameSorter) Less

func (a NameSorter) Less(i, j int) bool

func (NameSorter) Swap

func (a NameSorter) Swap(i, j int)

type RequestParameters

type RequestParameters struct {
	ResourcesSet `json:"resourcesSet"`
	TagSet       `json:"tagSet"`
}

type ResourceItems

type ResourceItems struct {
	ResourceId string `json:"resourceId"`
}

type ResourcesSet

type ResourcesSet struct {
	ResourceItems `json:"items"`
}

type ResponseElements

type ResponseElements struct {
	Return string `json:"_return"`
}

type SubnetData

type SubnetData struct {
	SubnetID   string `json:"subnet_id"`
	CidrBlock  string `json:"cidr_block"`
	SubnetWrk  string `json:"wrk"`
	SubnetName string `json:"name"`
}

SubnetData struct type for handling subnets data

type TagSet

type TagSet struct {
	Items `json:"items"`
}

type UserIdentity

type UserIdentity struct {
	Type        string `json:"type"`
	PrincipalId string `json:"principalId"`
	Arn         string `json:"arn"`
	AccountId   string `json:"accountId"`
	AccessKeyId string `json:"accessKeyId"`
	UserName    string `json:"userName"`
}

Jump to

Keyboard shortcuts

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