Documentation ¶
Index ¶
- Constants
- Variables
- func IsNotFoundError(err error) bool
- func QueueTemplate(params QueueParams) (*goformation.Template, error)
- func UserTemplate(params UserParams) (*goformation.Template, error)
- type AssumeRolePolicyDocument
- type AssumeRolePolicyStatement
- type Client
- type Config
- type Credentials
- type PolicyCondition
- type PolicyDocument
- type PolicyPrincipal
- type PolicyStatement
- type Provider
- func (s *Provider) Bind(ctx context.Context, bindData provideriface.BindData) (*domain.Binding, error)
- func (s *Provider) Deprovision(ctx context.Context, deprovisionData provideriface.DeprovisionData) (*domain.DeprovisionServiceSpec, error)
- func (s *Provider) GetBinding(ctx context.Context, getBindingData provideriface.GetBindData) (*domain.GetBindingSpec, error)
- func (s *Provider) LastBindingOperation(ctx context.Context, ...) (*domain.LastOperation, error)
- func (s *Provider) LastOperation(ctx context.Context, lastOperationData provideriface.LastOperationData) (*domain.LastOperation, error)
- func (s *Provider) Provision(ctx context.Context, provisionData provideriface.ProvisionData) (*domain.ProvisionedServiceSpec, error)
- func (s *Provider) Unbind(ctx context.Context, unbindData provideriface.UnbindData) (*domain.UnbindSpec, error)
- func (s *Provider) Update(ctx context.Context, updateData provideriface.UpdateData) (*domain.UpdateServiceSpec, error)
- type QueueParams
- type UserParams
Constants ¶
View Source
const ( ResourcePrimaryQueue = "PrimaryQueue" ResourceSecondaryQueue = "SecondaryQueue" )
View Source
const ( OutputPrimaryQueueURL = "PrimaryQueueURL" OutputPrimaryQueueARN = "PrimaryQueueARN" OutputSecondaryQueueURL = "SecondaryQueueURL" OutputSecondaryQueueARN = "SecondaryQueueARN" )
View Source
const ( ResourceUser = "IAMUser" ResourceAccessKey = "IAMAccessKey" ResourcePolicy = "IAMPolicy" ResourceCredentials = "BindingCredentials" )
View Source
const (
OutputCredentialsARN = "CredentialsARN"
)
Variables ¶
View Source
var ( // NoExistErrMatch is a string to match if stack does not exist NoExistErrMatch = "does not exist" // ErrStackNotFound returned when stack does not exist, or has been deleted ErrStackNotFound = fmt.Errorf("cloudformation stack does not exist") ErrUpdateNotSupported = errors.New("Updating the SQS queue is currently not supported") // PollingInterval is the duration between calls to check state when waiting for apply/destroy to complete PollingInterval = time.Second * 15 ProvisionOperation = "provision" DeprovisionOperation = "deprovision" UpdateOperation = "update" BindOperation = "bind" UnbindOperation = "unbind" )
Functions ¶
func IsNotFoundError ¶ added in v0.18.0
func QueueTemplate ¶ added in v0.18.0
func QueueTemplate(params QueueParams) (*goformation.Template, error)
GetStackTemplate returns a cloudformation Template for provisioning an SQS queue
func UserTemplate ¶ added in v0.18.0
func UserTemplate(params UserParams) (*goformation.Template, error)
Types ¶
type AssumeRolePolicyDocument ¶ added in v0.18.0
type AssumeRolePolicyDocument struct { Version string Statement []AssumeRolePolicyStatement }
type AssumeRolePolicyStatement ¶ added in v0.18.0
type AssumeRolePolicyStatement struct { Effect string Principal PolicyPrincipal Action []string Condition PolicyCondition `json:"Condition,omitempty"` }
type Client ¶
type Client interface { DescribeStacksWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.Option) (*cloudformation.DescribeStacksOutput, error) CreateStackWithContext(aws.Context, *cloudformation.CreateStackInput, ...request.Option) (*cloudformation.CreateStackOutput, error) UpdateStackWithContext(aws.Context, *cloudformation.UpdateStackInput, ...request.Option) (*cloudformation.UpdateStackOutput, error) DeleteStackWithContext(aws.Context, *cloudformation.DeleteStackInput, ...request.Option) (*cloudformation.DeleteStackOutput, error) GetSecretValueWithContext(aws.Context, *secretsmanager.GetSecretValueInput, ...request.Option) (*secretsmanager.GetSecretValueOutput, error) }
type Config ¶
type Credentials ¶ added in v0.19.0
type PolicyCondition ¶ added in v0.18.0
type PolicyDocument ¶ added in v0.18.0
type PolicyDocument struct { Version string Statement []PolicyStatement }
func NewRolePolicyDocument ¶ added in v0.18.0
func NewRolePolicyDocument(resources, actions []string) PolicyDocument
type PolicyPrincipal ¶ added in v0.18.0
type PolicyStatement ¶ added in v0.18.0
type Provider ¶ added in v0.18.0
type Provider struct { Environment string // Name of environment to tag resources with Client Client // AWS SDK compatible client ResourcePrefix string // AWS resources with be named with this prefix PermissionsBoundary string // IAM users created on bind will have this boundary Timeout time.Duration Logger lager.Logger }
func (*Provider) Deprovision ¶ added in v0.18.0
func (s *Provider) Deprovision(ctx context.Context, deprovisionData provideriface.DeprovisionData) (*domain.DeprovisionServiceSpec, error)
func (*Provider) GetBinding ¶ added in v0.18.0
func (s *Provider) GetBinding(ctx context.Context, getBindingData provideriface.GetBindData) (*domain.GetBindingSpec, error)
func (*Provider) LastBindingOperation ¶ added in v0.18.0
func (s *Provider) LastBindingOperation(ctx context.Context, lastBindingOperationData provideriface.LastBindingOperationData) (*domain.LastOperation, error)
func (*Provider) LastOperation ¶ added in v0.18.0
func (s *Provider) LastOperation(ctx context.Context, lastOperationData provideriface.LastOperationData) (*domain.LastOperation, error)
func (*Provider) Provision ¶ added in v0.18.0
func (s *Provider) Provision(ctx context.Context, provisionData provideriface.ProvisionData) (*domain.ProvisionedServiceSpec, error)
func (*Provider) Unbind ¶ added in v0.18.0
func (s *Provider) Unbind(ctx context.Context, unbindData provideriface.UnbindData) (*domain.UnbindSpec, error)
func (*Provider) Update ¶ added in v0.18.0
func (s *Provider) Update(ctx context.Context, updateData provideriface.UpdateData) (*domain.UpdateServiceSpec, error)
type QueueParams ¶ added in v0.18.0
type QueueParams struct { // QueueName is the name of the aws queue resource QueueName string `json:"-"` // ContentBasedDeduplication For first-in-first-out (FIFO) queues, // specifies whether to enable content-based deduplication. During the // deduplication interval, Amazon SQS treats messages that are sent with // identical content as duplicates and delivers only one copy of the // message. ContentBasedDeduplication bool `json:"content_based_deduplication,omitempty"` // DelaySeconds The time in seconds for which the delivery of all messages // in the queue is delayed. You can specify an integer value of 0 to 900 // (15 minutes). DelaySeconds int `json:"delay_seconds,omitempty"` // FifoQueue If set to true, creates a FIFO queue. If you don't specify // this property, Amazon SQS creates a standard queue. FifoQueue bool `json:"-"` // MaximumMessageSize is the limit of how many bytes that a message can // contain before Amazon SQS rejects it. You can specify an integer value // from 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). The default value // is 262,144 (256 KiB). MaximumMessageSize int `json:"maximum_message_size,omitempty"` // MessageRetentionPeriod The number of seconds // that Amazon SQS retains a message. You can // specify an integer value from 60 seconds (1 // minute) to 1,209,600 seconds (14 days). The // default value is 345,600 seconds (4 days). MessageRetentionPeriod int `json:"message_retention_period,omitempty"` // ReceiveMessageWaitTimeSeconds Specifies the // duration, in seconds, that the ReceiveMessage // action call waits until a message is in the // queue in order to include it in the response, // rather than returning an empty response if a // message isn't yet available. You can specify an // integer from 1 to 20. Short polling is used as // the default or when you specify 0 for this // property. ReceiveMessageWaitTimeSeconds int `json:"receive_message_wait_time_seconds,omitempty"` // RedriveMaxReceiveCount The number of times a // message is delivered to the source queue before // being moved to the dead-letter queue. RedriveMaxReceiveCount int `json:"redrive_max_receive_count,omitempty"` // VisibilityTimeout The length of time during // which a message will be unavailable after a // message is delivered from the queue. This blocks // other components from receiving the same message // and gives the initial component time to process // and delete the message from the queue. // Values must be from 0 to 43,200 seconds (12 hours). If you don't specify a value, AWS CloudFormation uses the default value of 30 seconds. VisibilityTimeout int `json:"visibility_timeout,omitempty"` // Tags are the AWS resource tags to attach to this queue. Tags map[string]string `json:"-"` }
type UserParams ¶ added in v0.18.0
type UserParams struct { BindingID string `json:"-"` ResourcePrefix string `json:"-"` UserPath string `json:"-"` PrimaryQueueURL string `json:"-"` PrimaryQueueARN string `json:"-"` SecondaryQueueURL string `json:"-"` SecondaryQueueARN string `json:"-"` Tags map[string]string `json:"-"` PermissionsBoundary string `json:"-"` }
Click to show internal directories.
Click to hide internal directories.