Documentation ¶
Overview ¶
Package fnspec provides a function spec for lambdafy.
Index ¶
Constants ¶
View Source
const RoleGenerate = "generate"
RoleGenerate is a special role name that indicates the role should be generated.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EFSMount ¶
type EFSMount struct { ARN string `yaml:"arn"` // ARN of the EFS filesystem endpoint. Path string `yaml:"path"` // Path to mount the EFS filesystem at. }
EFSMount represents an AWS Elastic Filesystem mount.
type RolePolicy ¶
type RolePolicy struct { Effect string `yaml:"effect" json:"Effect"` Action []string `yaml:"action" json:"Action"` Resource []string `yaml:"resource" json:"Resource"` }
RolePolicy represents a policy for a lambda function's IAM role.
type SQSTrigger ¶
type SQSTrigger struct { ARN string `yaml:"arn"` BatchSize *int32 `yaml:"batch_size,omitempty"` BatchWindow *int32 `yaml:"batch_window,omitempty"` Concurrency *int32 `yaml:"concurrency,omitempty"` }
SQSTrigger represents an SQS trigger for a lambda function.
type Spec ¶
type Spec struct { Name string `yaml:"name"` Description string `yaml:"description,omitempty"` Image string `yaml:"image"` Role string `yaml:"role"` RoleExtraPolicy []*RolePolicy `yaml:"role_extra_policy,omitempty"` CreateRepo *bool `yaml:"create_repo,omitempty"` RepoName string `yaml:"repo_name,omitempty"` Env map[string]string `yaml:"env,omitempty"` Entrypoint []string `yaml:"entrypoint,omitempty"` Command []string `yaml:"command,omitempty"` WorkDir *string `yaml:"workdir,omitempty"` Memory *int32 `yaml:"memory,omitempty"` Timeout *int32 `yaml:"timeout,omitempty"` Tags map[string]string `yaml:"tags,omitempty"` VPCSecurityGroupIds []string `yaml:"vpc_security_group_ids,omitempty"` VPCSubnetIds []string `yaml:"vpc_subnet_ids,omitempty"` EFSMounts []*EFSMount `yaml:"efs_mounts,omitempty"` TempSize *int32 `yaml:"temp_size,omitempty"` CORS bool `yaml:"cors,omitempty"` SQSTriggers []*SQSTrigger `yaml:"sqs_triggers,omitempty"` CronTriggers map[string]string `yaml:"cron,omitempty"` AllowedAccountRegions []string `yaml:"allowed_account_regions,omitempty"` // contains filtered or unexported fields }
Spec is the specification of a lambda function.
func (*Spec) IsAccountRegionAllowed ¶
IsAccountRegionAllowed returns true if the given account and region are allowed by the spec.
func (*Spec) MakeAndPush ¶
MakeAndPush returns true if the image should be built and pushed to ECR.
Click to show internal directories.
Click to hide internal directories.