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.
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 DynamoDB ¶
type DynamoDB struct { DynamoDBProps // contains filtered or unexported fields }
DynamoDB contains configuration options which fully describe a DynamoDB table. Implements the encoding.BinaryMarshaler interface.
func NewDynamoDB ¶
func NewDynamoDB(input *DynamoDBProps) *DynamoDB
NewDynamoDB creates a DynamoDB cloudformation template specifying attributes, primary key schema, and local secondary index configuration.
func (*DynamoDB) MarshalBinary ¶
MarshalBinary serializes the DynamoDB object into a binary YAML CF template. Implements the encoding.BinaryMarshaler interface.
type DynamoDBProps ¶
type DynamoDBProps struct { *StorageProps Attributes []DDBAttribute LSIs []DDBLocalSecondaryIndex SortKey *string PartitionKey *string HasLSI bool }
DynamoDBProps contains DynamoDB-specific properties for addon.NewDynamoDB().
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 ErrAddonsDirNotExist ¶ added in v0.5.0
ErrAddonsDirNotExist occurs when an addons directory for a workload does not exist.
func (*ErrAddonsDirNotExist) Error ¶ added in v0.5.0
func (e *ErrAddonsDirNotExist) 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 RDS ¶ added in v1.5.0
type RDS struct { RDSProps // contains filtered or unexported fields }
RDS contains configuration options which fully describe a RDS Aurora Serverless cluster. Implements the encoding.BinaryMarshaler interface.
func NewRDS ¶ added in v1.5.0
NewRDS creates a new RDS marshaler which can be used to write CF via addonWriter.
func (*RDS) MarshalBinary ¶ added in v1.5.0
MarshalBinary serializes the RDS object into a binary YAML CF template. Implements the encoding.BinaryMarshaler interface.
type RDSProps ¶ added in v1.5.0
type RDSProps struct { // The name of the cluster. ClusterName string // The engine type of the RDS Aurora Serverless cluster. Engine string // The name of the initial database created inside the cluster. InitialDBName string // The parameter group to use for the cluster. ParameterGroup string // The copilot environments found inside the current app. Envs []string }
RDSProps holds RDS-specific properties for addon.NewRDS().
type S3 ¶
type S3 struct { S3Props // contains filtered or unexported fields }
S3 contains configuration options which fully describe an S3 bucket. Implements the encoding.BinaryMarshaler interface.
func (*S3) MarshalBinary ¶
MarshalBinary serializes the S3 object into a binary YAML CF template. Implements the encoding.BinaryMarshaler interface.
type S3Props ¶
type S3Props struct {
*StorageProps
}
S3Props contains S3-specific properties for addon.NewS3().
type StorageProps ¶
type StorageProps struct {
Name string
}
StorageProps holds basic input properties for addon.NewDynamoDB() or addon.NewS3().