Documentation
¶
Overview ¶
package config allows re-use of the config struct
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketTrigger ¶
type BucketTrigger struct { Bucket *string Filters []*s3.FilterRule EventNames []*string Disabled bool }
BucketTrigger defines options for S3 bucket notifications
type CloudWatchRuleEventPattern ¶
type CloudWatchRuleEventPattern struct { Source []string `json:"source"` DetailType []string `json:"detail-type"` Detail map[string]interface{} `json:"detail"` }
CloudWatchRuleEventPattern defines an event pattern (ultimately sent as JSON)
type DeploymentConfig ¶
type DeploymentConfig struct { App struct { Name string KeepBuildFiles bool BuildFileName string BuildEnvVars map[string]string } AWS struct { Region string Profile string AccessKeyID string SecretAccessKey string } Lambda struct { Wrapper string Runtime string Handler string FunctionName string Alias string Description string MemorySize int64 Role string Timeout int64 SourceZip string EnvironmentVariables map[string]*string KMSKeyArn string VPC struct { SecurityGroups []string Subnets []string } TraceMode string MaxConcurrentExecutions int64 } API struct { Name string Description string Cache bool CacheSize string Stages map[string]DeploymentStage ResourceTimeoutMs int BinaryMediaTypes []*string } BucketTriggers []BucketTrigger SESRules []SESRule Queues []SQS }
DeploymentConfig holds the AWS Lambda configuration
type DeploymentStage ¶
type DeploymentStage struct { Name string Description string Variables map[string]interface{} Cache bool CacheSize string }
DeploymentStage defines an API Gateway stage and holds configuration options for it
type PolicyStatement ¶
type PolicyStatement struct { Sid string `json:"Sid"` Effect string `json:"Effect"` Principal StatementPrincipal `json:"Principal"` Action interface{} `json:"Action"` // can be string or []string Resource interface{} `json:"Resource"` // can be string or []string Condition StatementCondition `json:"Condition"` }
PolicyStatement defines a generic AWS policy statement
type S3BucketPolicy ¶
type S3BucketPolicy struct { Version string `json:"Version"` ID string `json:"Id"` Statement []PolicyStatement `json:"Statement"` }
S3BucketPolicy defines a generic bucket policy
{ "Version": "2012-10-17", "Id": "default", "Statement": [ { "Sid": "<optional>", "Effect": "Allow", "Principal": { "Service": "s3.amazonaws.com" }, "Action": "lambda:InvokeFunction", "Resource": "<ArnToYourFunction>", "Condition": { "StringEquals": { "AWS:SourceAccount": "<YourAccountId>" }, "ArnLike": { "AWS:SourceArn": "arn:aws:s3:::<YourBucketName>" } } } ] }
type SESRule ¶
type SESRule struct { RuleName string `json:"ruleName"` Enabled bool `json:"enabled"` RequireTLS bool `json:"requireTLS"` ScanEnabled bool `json:"scanEnabled"` RuleSet string `json:"ruleSet"` InvocationType string `json:"invocationType"` // either Event or RequestResponse SNSTopicArn string `json:"snsTopicArn"` Recipients []string `json:"recipients"` S3Bucket string `json:"s3Bucket"` S3ObjectKeyPrefix string `json:"s3ObjectKeyPrefix"` S3EncryptMessage bool `json:"s3encryptMessage"` S3KMSKeyArn string `json:"s3KMSKeyArn"` S3SNSTopicArn string `json:"s3SNSTopicArn"` }
SESRule defines options for an SES Recipeint Rule
type StatementCondition ¶
StatementCondition defines a generic AWS policy statement condition (TODO: Add more fields as needed)
type StatementPrincipal ¶
type StatementPrincipal struct {
Service string `json:"Service"`
}
StatementPrincipal defines a generic AWS policy statement principal (TODO: see what else there is besides Service in here)
type Task ¶
type Task struct { Schedule string `json:"schedule"` Input json.RawMessage `json:"input"` Disabled bool `json:"disabled"` Description string `json:"description"` Name string `json:"-"` // Do not allow names to be set by JSON files (for now) }
Task defines options for a CloudWatch event rule (scheduled task)