Documentation ¶
Overview ¶
Package addon contains the service to manage addons.
Package addon contains the service to manage addons.
Index ¶
Constants ¶
const ( // Engine types for RDS Aurora Serverless. RDSEngineTypeMySQL = "MySQL" RDSEngineTypePostgreSQL = "PostgreSQL" )
const (
// StackName is the name of the addons nested stack resource.
StackName = "AddonsStack"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addons ¶
type Addons struct {
// contains filtered or unexported fields
}
Addons represents additional resources for a workload.
func (*Addons) Parameters ¶ added in v1.13.0
Parameters returns the content of user-defined additional CloudFormation Parameters to pass from the parent stack to Template.
If there is no addons/ directory defined, then returns "" and ErrAddonsNotFound. If there are addons but no parameters file defined, then returns "" and nil for error. If there are multiple parameters files, then returns "" and cannot define multiple parameter files error. If the addons parameters use the reserved parameter names, then returns "" and a reserved parameter error.
type DDBAttribute ¶
DDBAttribute holds the attribute definition of a DynamoDB attribute (keys, local secondary indices).
func DDBAttributeFromKey ¶
func DDBAttributeFromKey(input string) (DDBAttribute, error)
DDBAttributeFromKey parses the DDB type and name out of keys specified in the form "Email:S"
type DDBLocalSecondaryIndex ¶
DDBLocalSecondaryIndex holds a representation of an LSI.
type DynamoDBProps ¶
type DynamoDBProps struct { *StorageProps Attributes []DDBAttribute LSIs []DDBLocalSecondaryIndex SortKey *string PartitionKey *string HasLSI bool }
DynamoDBProps contains DynamoDB-specific properties for addon.NewDDBTemplate().
func (*DynamoDBProps) BuildLocalSecondaryIndex ¶
func (p *DynamoDBProps) BuildLocalSecondaryIndex(noLSI bool, lsiSorts []string) (bool, error)
BuildLocalSecondaryIndex generates the correct LocalSecondaryIndex property configuration based on customer input to ensure that the CF template is valid. BuildLocalSecondaryIndex should be called last, after BuildPartitionKey && BuildSortKey
func (*DynamoDBProps) BuildPartitionKey ¶
func (p *DynamoDBProps) BuildPartitionKey(partitionKey string) error
BuildPartitionKey generates the properties required to specify the partition key based on customer inputs.
func (*DynamoDBProps) BuildSortKey ¶
func (p *DynamoDBProps) BuildSortKey(noSort bool, sortKey string) (bool, error)
BuildSortKey generates the correct property configuration based on customer inputs.
type DynamoDBTemplate ¶ added in v1.13.0
type DynamoDBTemplate struct { DynamoDBProps // contains filtered or unexported fields }
DynamoDBTemplate contains configuration options which fully describe a DynamoDB table. Implements the encoding.BinaryMarshaler interface.
func NewDDBTemplate ¶ added in v1.13.0
func NewDDBTemplate(input *DynamoDBProps) *DynamoDBTemplate
NewDDBTemplate creates a DynamoDB cloudformation template specifying attributes, primary key schema, and local secondary index configuration.
func (*DynamoDBTemplate) MarshalBinary ¶ added in v1.13.0
func (d *DynamoDBTemplate) MarshalBinary() ([]byte, error)
MarshalBinary serializes the content of the template into binary.
type ErrAddonsNotFound ¶ added in v1.8.2
ErrAddonsNotFound occurs when an addons directory for a workload is either not found or empty.
func (*ErrAddonsNotFound) Error ¶ added in v1.8.2
func (e *ErrAddonsNotFound) Error() string
type Output ¶
type Output struct { // Name is the Logical ID of the output. Name string // IsSecret is true if the output value refers to a SecretsManager ARN. Otherwise, false. IsSecret bool // IsManagedPolicy is true if the output value refers to an IAM ManagedPolicy ARN. Otherwise, false. IsManagedPolicy bool // SecurityGroup is true if the output value refers a SecurityGroup ARN. Otherwise, false. IsSecurityGroup bool }
Output represents an output from a CloudFormation template.
type RDSParams ¶ added in v1.13.0
type RDSParams struct {
// contains filtered or unexported fields
}
RDSParams represents the addons.parameters.yml file for a RDS Aurora Serverless cluster.
func NewRDSParams ¶ added in v1.13.0
func NewRDSParams() *RDSParams
NewRDSParams creates a new RDS parameters marshaler.
func (*RDSParams) MarshalBinary ¶ added in v1.13.0
MarshalBinary serializes the content of the params file into binary.
type RDSProps ¶ added in v1.5.0
type RDSProps struct { WorkloadType string // The type of the workload associated with the RDS addon. ClusterName string // The name of the cluster. Engine string // The engine type of the RDS Aurora Serverless cluster. InitialDBName string // The name of the initial database created inside the cluster. ParameterGroup string // The parameter group to use for the cluster. Envs []string // The copilot environments found inside the current app. }
RDSProps holds RDS-specific properties for addon.NewRDSTemplate().
type RDSTemplate ¶ added in v1.13.0
type RDSTemplate struct { RDSProps // contains filtered or unexported fields }
RDSTemplate contains configuration options which fully describe a RDS Aurora Serverless cluster. Implements the encoding.BinaryMarshaler interface.
func NewRDSTemplate ¶ added in v1.13.0
func NewRDSTemplate(input RDSProps) *RDSTemplate
NewRDSTemplate creates a new RDS marshaler which can be used to write a RDS CloudFormation template.
func (*RDSTemplate) MarshalBinary ¶ added in v1.13.0
func (r *RDSTemplate) MarshalBinary() ([]byte, error)
MarshalBinary serializes the content of the template into binary.
type S3Props ¶
type S3Props struct {
*StorageProps
}
S3Props contains S3-specific properties for addon.NewS3Template().
type S3Template ¶ added in v1.13.0
type S3Template struct { S3Props // contains filtered or unexported fields }
S3Template contains configuration options which fully describe an S3 bucket. Implements the encoding.BinaryMarshaler interface.
func NewS3Template ¶ added in v1.13.0
func NewS3Template(input *S3Props) *S3Template
NewS3Template creates a new S3 marshaler which can be used to write CF via addonWriter.
func (*S3Template) MarshalBinary ¶ added in v1.13.0
func (s *S3Template) MarshalBinary() ([]byte, error)
MarshalBinary serializes the content of the template into binary.
type StorageProps ¶
type StorageProps struct {
Name string
}
StorageProps holds basic input properties for addon.NewDDBTemplate() or addon.NewS3Template().