Documentation ¶
Index ¶
- type CloudWatchEvent
- type NewServiceInput
- type Publisher
- type Service
- func (e *Service) AccountCreate(data *account.Account) error
- func (e *Service) AccountDelete(data *account.Account) error
- func (e *Service) AccountReset(data *account.Account) error
- func (e *Service) AccountUpdate(old *account.Account, new *account.Account) error
- func (e *Service) LeaseCreate(data *lease.Lease) error
- func (e *Service) LeaseEnd(data *lease.Lease) error
- func (e *Service) LeaseUpdate(old *lease.Lease, new *lease.Lease) error
- type SnsEvent
- type SqsEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudWatchEvent ¶
type CloudWatchEvent struct {
// contains filtered or unexported fields
}
CloudWatchEvent is for publishing events to Event Bus
func NewCloudWatchEvent ¶
func NewCloudWatchEvent(cw cloudwatcheventsiface.CloudWatchEventsAPI, detailType string) (*CloudWatchEvent, error)
NewCloudWatchEvent creates a new AWS Eventing Bus
func (*CloudWatchEvent) Publish ¶
func (c *CloudWatchEvent) Publish(i interface{}) error
Publish an event to the topic
type NewServiceInput ¶
type NewServiceInput struct { SnsClient snsiface.SNSAPI SqsClient sqsiface.SQSAPI CweClient cloudwatcheventsiface.CloudWatchEventsAPI AccountCreatedTopicArn string `env:"ACCOUNT_CREATED_TOPIC_ARN" envDefault:"arn:aws:sns:us-east-1:123456789012:account-create"` AccountDeletedTopicArn string `env:"ACCOUNT_DELETED_TOPIC_ARN" envDefault:"arn:aws:sns:us-east-1:123456789012:account-delete"` AccountResetQueueURL string `env:"RESET_SQS_URL" envDefault:"DefaultResetSQSUrl"` LeaseAddedTopicArn string `env:"LEASE_ADDED_TOPIC" envDefault:"arn:aws:sns:us-east-1:123456789012:lease-added"` }
NewServiceInput are the items required to create a new Eventer service
type Publisher ¶
type Publisher interface {
Publish(i interface{}) error
}
Publisher interface defines anything that can publish an event
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the public interface for publishing events
func NewService ¶
func NewService(input NewServiceInput) (*Service, error)
NewService creates a new instance of Eventer
func (*Service) AccountCreate ¶
AccountCreate publish events
func (*Service) AccountDelete ¶
AccountDelete publish events
func (*Service) AccountReset ¶
AccountReset publish events
func (*Service) AccountUpdate ¶
AccountUpdate publish events
func (*Service) LeaseCreate ¶
LeaseCreate publish events
type SnsEvent ¶
type SnsEvent struct {
// contains filtered or unexported fields
}
SnsEvent is for publishing events to SQS
func NewSnsEvent ¶
NewSnsEvent creates a new SNS eventing struct
type SqsEvent ¶
type SqsEvent struct {
// contains filtered or unexported fields
}
SqsEvent is for publishing events to SQS
func NewSqsEvent ¶
NewSqsEvent creates a new SQS eventing struct