Documentation ¶
Index ¶
- Variables
- func New(subject string, body []byte, cryptoKey string) ernestaws.Event
- type Collection
- func (col *Collection) Complete()
- func (col *Collection) Create() error
- func (col *Collection) Delete() error
- func (col *Collection) Error(err error)
- func (col *Collection) Find() error
- func (col *Collection) Get() error
- func (col *Collection) GetBody() []byte
- func (col *Collection) GetSubject() string
- func (col *Collection) Process() (err error)
- func (col *Collection) Update() error
- func (col *Collection) Validate() error
- type Event
- func (ev *Event) Complete()
- func (ev *Event) Create() error
- func (ev *Event) Delete() error
- func (ev *Event) Error(err error)
- func (ev *Event) Find() error
- func (ev *Event) Get() error
- func (ev *Event) GetBody() []byte
- func (ev *Event) GetSubject() string
- func (ev *Event) Process() (err error)
- func (ev *Event) Update() error
- func (ev *Event) Validate() error
- type Volume
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDatacenterIDInvalid ... ErrDatacenterIDInvalid = errors.New("Datacenter VPC ID invalid") // ErrDatacenterRegionInvalid ... ErrDatacenterRegionInvalid = errors.New("Datacenter Region invalid") // ErrDatacenterCredentialsInvalid ... ErrDatacenterCredentialsInvalid = errors.New("Datacenter credentials invalid") // ErrInstanceAWSIDInvalid ... ErrInstanceAWSIDInvalid = errors.New("Instance aws id invalid") // ErrNetworkInvalid ... ErrNetworkInvalid = errors.New("Network invalid") // ErrInstanceNameInvalid ... ErrInstanceNameInvalid = errors.New("Instance name invalid") // ErrInstanceImageInvalid ... ErrInstanceImageInvalid = errors.New("Instance image invalid") // ErrInstanceTypeInvalid ... ErrInstanceTypeInvalid = errors.New("Instance type invalid") )
Functions ¶
Types ¶
type Collection ¶
type Collection struct { ProviderType string `json:"_provider"` ComponentType string `json:"_component"` ComponentID string `json:"_component_id"` State string `json:"_state"` Action string `json:"_action"` Service string `json:"service"` AWSAccessKeyID string `json:"aws_access_key_id"` AWSSecretAccessKey string `json:"aws_secret_access_key"` DatacenterRegion string `json:"datacenter_region"` Tags map[string]string `json:"tags"` Results []interface{} `json:"components"` ErrorMessage string `json:"error,omitempty"` Subject string `json:"-"` Body []byte `json:"-"` CryptoKey string `json:"-"` }
Collection ....
func (*Collection) Complete ¶
func (col *Collection) Complete()
Complete : sets the state of the event to completed
func (*Collection) Error ¶
func (col *Collection) Error(err error)
Error : Will respond the current event with an error
func (*Collection) GetBody ¶
func (col *Collection) GetBody() []byte
GetBody : Gets the body for this event
func (*Collection) GetSubject ¶
func (col *Collection) GetSubject() string
GetSubject : Gets the subject for this event
func (*Collection) Process ¶
func (col *Collection) Process() (err error)
Process : starts processing the current message
func (*Collection) Validate ¶
func (col *Collection) Validate() error
Validate checks if all criteria are met
type Event ¶
type Event struct { ProviderType string `json:"_provider"` ComponentType string `json:"_component"` ComponentID string `json:"_component_id"` State string `json:"_state"` Action string `json:"_action"` InstanceAWSID *string `json:"instance_aws_id"` Name *string `json:"name"` Type *string `json:"instance_type"` Image *string `json:"image"` IP *string `json:"ip"` PublicIP *string `json:"public_ip"` ElasticIP *string `json:"elastic_ip"` ElasticIPAWSID *string `json:"elastic_ip_aws_id,omitempty"` AssignElasticIP *bool `json:"assign_elastic_ip"` KeyPair *string `json:"key_pair"` UserData *string `json:"user_data"` Network *string `json:"network_name"` NetworkAWSID *string `json:"network_aws_id"` NetworkIsPublic *bool `json:"network_is_public"` SecurityGroups []string `json:"security_groups"` SecurityGroupAWSIDs []*string `json:"security_group_aws_ids"` IAMInstanceProfile *string `json:"iam_instance_profile"` IAMInstanceProfileARN *string `json:"iam_instance_profile_arn"` Volumes []Volume `json:"volumes"` Tags map[string]string `json:"tags"` DatacenterType string `json:"datacenter_type,omitempty"` DatacenterName string `json:"datacenter_name,omitempty"` DatacenterRegion string `json:"datacenter_region"` AccessKeyID string `json:"aws_access_key_id"` SecretAccessKey string `json:"aws_secret_access_key"` Service string `json:"service"` Powered bool `json:"powered"` ErrorMessage string `json:"error,omitempty"` Subject string `json:"-"` Body []byte `json:"-"` CryptoKey string `json:"-"` }
Event stores the template data
func (*Event) Complete ¶
func (ev *Event) Complete()
Complete : sets the state of the event to completed
func (*Event) GetSubject ¶
GetSubject : Gets the subject for this event
Click to show internal directories.
Click to hide internal directories.