Documentation ¶
Index ¶
- type S3Event
- type S3EventRecord
- type S3EventRecordData
- type S3EventRecordDataBucket
- type S3EventRecordDataObject
- type S3EventRecordIdentity
- type Service
- func (f *Service) ArtifactExists(ctx context.Context, service, artifactID string) (bool, error)
- func (f *Service) ArtifactPaths(ctx context.Context, service string, environment string, branch string, ...) (specPath string, resourcesPath string, close func(context.Context), err error)
- func (f *Service) ArtifactSpecification(ctx context.Context, service string, artifactID string) (artifact.Spec, error)
- func (f *Service) ArtifactSpecifications(ctx context.Context, service string, n int) ([]artifact.Spec, error)
- func (s *Service) Close() error
- func (s *Service) CreateArtifact(artifactSpec artifact.Spec, md5 string) (string, error)
- func (s *Service) InitializeBucket() error
- func (s *Service) InitializeSQS(handler func(msg string) error) error
- func (f *Service) LatestArtifactPaths(ctx context.Context, service string, environment string, branch string) (specPath string, resourcesPath string, close func(context.Context), err error)
- func (f *Service) LatestArtifactSpecification(ctx context.Context, service string, branch string) (artifact.Spec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Event ¶ added in v0.7.0
type S3Event struct {
Records []S3EventRecord `json:"Records,omitempty"`
}
S3Event describes events received from S3 notification service. They are, kind of, documented here: https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html
type S3EventRecord ¶ added in v0.7.0
type S3EventRecord struct { EventVersion string `json:"eventVersion,omitempty"` EventSource string `json:"eventSource,omitempty"` AwsRegion string `json:"awsRegion,omitempty"` EventTime string `json:"eventTime,omitempty"` EventName string `json:"eventName,omitempty"` UserIdentity S3EventRecordIdentity `json:"userIdentity,omitempty"` RequestParameters map[string]string `json:"requestParameters,omitempty"` ResponseElements map[string]string `json:"responseElements,omitempty"` S3 S3EventRecordData `json:"s3,omitempty"` }
type S3EventRecordData ¶ added in v0.7.0
type S3EventRecordData struct { S3SchemaVersion string `json:"s3SchemaVersion,omitempty"` ConfigurationId string `json:"configurationId,omitempty"` Bucket S3EventRecordDataBucket `json:"bucket,omitempty"` Object S3EventRecordDataObject `json:"object,omitempty"` }
type S3EventRecordDataBucket ¶ added in v0.7.0
type S3EventRecordDataBucket struct { Name string `json:"name,omitempty"` OwnerIdentity S3EventRecordIdentity `json:"ownerIdentity,omitempty"` Arn string `json:"arn,omitempty"` }
type S3EventRecordDataObject ¶ added in v0.7.0
type S3EventRecordIdentity ¶ added in v0.7.0
type S3EventRecordIdentity struct {
PrincipalId string `json:"principalId,omitempty"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ArtifactExists ¶
func (*Service) ArtifactPaths ¶
func (*Service) ArtifactSpecification ¶
func (*Service) ArtifactSpecifications ¶
func (*Service) Close ¶ added in v0.7.0
Close closes the S3 storage service. Multiple calls to this method will result in a panic.
func (*Service) CreateArtifact ¶
func (*Service) InitializeBucket ¶
func (*Service) InitializeSQS ¶ added in v0.7.0
InitializeSQS set up a subscription from S3 to a SQS queue. The SQS queue events triggers calls to handler.InitializeSQS
Note on S3 notifications: There are 2 ways to get S3 notifications into SQS:
- Directly from S3 Notification to SQS Queue
- From S3 Notification to SNS Topic to SQS Queue
Using a SNS Topic should be more powerful, since it fx can send to multiple SQS Queues, but it requires more configuration and moving parts. The simpler model should suffice, therefore we connect it directly.k