Documentation ¶
Index ¶
- Constants
- type Account
- type ApiGateway
- type BuildTime
- type Bus
- type Caller
- type Computed
- type ComputedRegistry
- type ComputedRepository
- type ComputedResource
- type ComputedResources
- type ComputedTemplateData
- type Config
- func (c Config) AssumeRoleWithPolicy(ctx context.Context, policy string) (*types.Credentials, error)
- func (c Config) BuildTime(buildPath string) (BuildTime, error)
- func (c Config) ComputeBuildTime(mfst manifest.BuildTime) (BuildTime, error)
- func (c Config) ComputeDeployTime(mfst manifest.DeployTime) (DeployTime, error)
- func (c Config) DeployTime(labels map[string]string) (DeployTime, error)
- func (c *Config) FromAws(ctx context.Context, awsConfig aws.Config, stsc STSClient, ecrc ECRClient) (err error)
- func (c *Config) FromCwd(ctx context.Context) (err error)
- func (c *Config) FromEvent(ctx context.Context, event Event) (err error)
- func (c Config) Scaffold(templateName, functionName string) error
- func (c Config) Template(document string) (string, error)
- type DeployTime
- type ECRClient
- type Event
- type EventDetail
- type Git
- type Registry
- type Repository
- type Resource
- type STSClient
- type Selfish
- type TemplateData
- type Vpc
Constants ¶
View Source
const ( EnvGitBranch = "SELF_BRANCH_OVERRIDE" EnvGitSha = "SELF_SHA_OVERRIDE" EnvOwnerPrefixResources = "SELF_PREFIX_RESOURCES_WITH_OWNER" EnvOwnerPrefixRoutes = "SELF_PREFIX_ROUTE_KEY_WITH_OWNER" EnvEcrId = "SELF_ECR_REGISTRY_ID" EnvEcrRegion = "SELF_ECR_REGISTRY_REGION" EnvGwId = "SELF_API_GATEWAY_ID" EnvAuthType = "SELF_API_GATEWAY_AUTH_TYPE" EnvAuthorizerId = "SELF_API_GATEWAY_AUTHORIZER_ID" EnvSgIds = "SELF_SECURITY_GROUP_IDS" EnvSnIds = "SELF_SUBNET_IDS" EnvBusName = "SELF_SELF_BUS_NAME" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiGateway ¶
type ApiGateway struct {
Id *string
}
type Computed ¶
type Computed struct { Registry ComputedRegistry Repository ComputedRepository Resource ComputedResource Resources ComputedResources TemplateData ComputedTemplateData }
type ComputedRegistry ¶
type ComputedRegistry struct {
Url string
}
type ComputedRepository ¶
func (*ComputedRepository) Solve ¶
func (r *ComputedRepository) Solve(registry Registry, repository Repository, git gitlib.DotGit, name string)
type ComputedResource ¶
type ComputedResources ¶
type ComputedResources struct { EphemeralStorage int32 `json:"ephemeralStorage"` MemorySize int32 `json:"memorySize"` Timeout int32 `json:"timeout"` Http bool `json:"http"` AuthType string `json:"authType"` AuthorizerId *string `json:"authorizerId"` Audience []string `json:"audience"` RouteKey string `json:"routeKey"` }
func (*ComputedResources) Solve ¶
func (resources *ComputedResources) Solve(repository Repository, git gitlib.DotGit, resourcesJson, name string)
type ComputedTemplateData ¶
type ComputedTemplateData struct { AccountId string Region string RegistryRegion string RegistryAccountId string }
func (*ComputedTemplateData) Solve ¶
func (t *ComputedTemplateData) Solve(account Account, registry Registry)
type Config ¶
type Config struct { Selfish []Selfish Caller Caller Account Account Bus Bus Git gitlib.DotGit Registry Registry Repository Repository Resource Resource ApiGateway ApiGateway Vpc Vpc TemplateData TemplateData Version string AwsConfig aws.Config `json:"-"` }
func Stateful ¶
func Stateful(ctx context.Context, awsConfig aws.Config, stsc STSClient, ecrc ECRClient) (c Config, err error)
Initialize configuration from AWS and local filesystem.
func Stateless ¶
func Stateless(ctx context.Context, awsConfig aws.Config, stsc STSClient, ecrc ECRClient, event Event) (c Config, err error)
Initialize configuration from AWS only.
func (Config) AssumeRoleWithPolicy ¶
func (Config) ComputeBuildTime ¶
func (Config) ComputeDeployTime ¶
func (c Config) ComputeDeployTime(mfst manifest.DeployTime) (DeployTime, error)
func (Config) DeployTime ¶
func (c Config) DeployTime(labels map[string]string) (DeployTime, error)
Generate deploytime configuration from release labels.
type DeployTime ¶
type DeployTime struct { manifest.DeployTime Computed Computed }
type ECRClient ¶
type ECRClient interface {
DescribeRegistry(ctx context.Context, params *ecr.DescribeRegistryInput, optFns ...func(*ecr.Options)) (*ecr.DescribeRegistryOutput, error)
}
type Event ¶
type Event struct { Source string `json:"source"` DetailType string `json:"detail-type"` Detail EventDetail `json:"detail"` }
type EventDetail ¶
type EventDetail struct { Traceparent string `json:"traceparent"` Tracestate string `json:"tracestate"` Action string `json:"action"` Sha string `json:"sha"` Branch string `json:"branch"` Origin string `json:"origin"` RepositoryName string `json:"repository-name"` ResourceName string `json:"resource-name"` ExceptAccounts []string `json:"except-accounts"` }
type Repository ¶
type Repository struct {
Namespace string
}
type STSClient ¶
type STSClient interface { GetCallerIdentity(ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error) AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error) }
type TemplateData ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.