Documentation ¶
Index ¶
- Constants
- func AddAdditionalEnvironment(requestEnv map[string]string, responseEnv map[string]string)
- func GetRoleSessionName(env map[string]string) (string, error)
- type AssumeRoleProviderFactory
- type ECRClientFactory
- type ECRLifecyclePolicy
- type ECRLifecyclePolicyRule
- type ECRLifecyclePolicyRuleAction
- type ECRLifecyclePolicyRuleSelection
- type Handler
- func (h *Handler) AddDeployAccountCredentialsValue(request *common.PrepareTerraformRequest, team string, ...) error
- func (h *Handler) ConfigureRelease(request *common.ConfigureReleaseRequest, ...) error
- func (h *Handler) GetRootAccountSession(env map[string]string) (*session.Session, error)
- func (h *Handler) InitReleaseAccountCredentials(env map[string]string, team string) error
- func (h *Handler) PrepareTerraform(request *common.PrepareTerraformRequest, ...) error
- func (h *Handler) Setup(request *common.SetupRequest, response *common.SetupResponse) error
- func (h *Handler) UploadRelease(request *common.UploadReleaseRequest, response *common.UploadReleaseResponse, ...) error
- func (h *Handler) WithAssumeRoleProviderFactory(factory AssumeRoleProviderFactory) *Handler
- func (h *Handler) WithECRClientFactory(factory ECRClientFactory) *Handler
- func (h *Handler) WithErrorStream(errorStream io.Writer) *Handler
- func (h *Handler) WithOrganizationsClientFactory(factory OrganizationsClientFactory) *Handler
- func (h *Handler) WithReleaseFolder(folder string) *Handler
- func (h *Handler) WithReleaseLoader(loader common.ReleaseLoader) *Handler
- func (h *Handler) WithReleaseSaver(saver common.ReleaseSaver) *Handler
- func (h *Handler) WithS3ClientFactory(factory S3ClientFactory) *Handler
- func (h *Handler) WithS3UploaderFactory(factory S3UploaderFactory) *Handler
- func (h *Handler) WithSTSClientFactory(factory STSClientFactory) *Handler
- func (h *Handler) WithSecretsManagerClientFactory(factory SecretsManagerClientFactory) *Handler
- type OrganizationsClientFactory
- type S3ClientFactory
- type S3UploaderFactory
- type STSClientFactory
- type SecretsManagerClientFactory
Constants ¶
const ( AccountID = "724178030834" LambdaBucket = "acuris-lambdas" ReleaseBucket = "acuris-releases" TFStateBucket = "acuris-tfstate" ReleaseFolder = "/release" Region = "eu-west-1" )
const ECR_REPO_POLICY = `` /* 483-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func AddAdditionalEnvironment ¶
AddAdditionalEnvironment variables sends in env variables
Types ¶
type AssumeRoleProviderFactory ¶
type AssumeRoleProviderFactory func(session client.ConfigProvider, roleARN, roleSessionName string) credentials.Provider
AssumeRoleProviderFactory is a function that returns an assume role provider.
type ECRClientFactory ¶
type ECRClientFactory func(client.ConfigProvider) ecriface.ECRAPI
ECRClientFactory is a function that returns an ECR client.
type ECRLifecyclePolicy ¶
type ECRLifecyclePolicy struct {
Rules []*ECRLifecyclePolicyRule `json:"rules"`
}
ECRLifecyclePolicy represents a lifecycle policy in ECR.
type ECRLifecyclePolicyRule ¶
type ECRLifecyclePolicyRule struct { RulePriority int `json:"rulePriority"` Selection *ECRLifecyclePolicyRuleSelection `json:"selection"` Action *ECRLifecyclePolicyRuleAction `json:"action"` }
ECRLifecyclePolicyRule represents a rule in a lifecycle policy in ECR.
type ECRLifecyclePolicyRuleAction ¶
type ECRLifecyclePolicyRuleAction struct {
Type string `json:"type"`
}
ECRLifecyclePolicyRuleAction represents an action within an ECR lifecycle policy rule.
type ECRLifecyclePolicyRuleSelection ¶
type ECRLifecyclePolicyRuleSelection struct { TagStatus string `json:"tagStatus"` TagPrefixList []string `json:"tagPrefixList"` CountType string `json:"countType"` CountNumber int `json:"countNumber"` }
ECRLifecyclePolicyRuleSelection represents a selection within an ECR lifecycle policy rule.
type Handler ¶
type Handler struct { RootAccountSession *session.Session AssumeRoleProviderFactory AssumeRoleProviderFactory ReleaseAccountCredentials *credentials.Credentials ErrorStream io.Writer ReleaseFolder string ECRClientFactory ECRClientFactory S3ClientFactory S3ClientFactory S3UploaderFactory S3UploaderFactory STSClientFactory STSClientFactory OrganizationsClientFactory OrganizationsClientFactory SecretsManagerClientFactory SecretsManagerClientFactory ReleaseLoader common.ReleaseLoader ReleaseSaver common.ReleaseSaver }
Handler handles config requests.
func (*Handler) AddDeployAccountCredentialsValue ¶
func (h *Handler) AddDeployAccountCredentialsValue(request *common.PrepareTerraformRequest, team string, responseEnv map[string]string, monitoringData map[string]string) error
AddDeployAccountCredentialsValue assumes a role in the right account and returns credentials.
func (*Handler) ConfigureRelease ¶
func (h *Handler) ConfigureRelease(request *common.ConfigureReleaseRequest, response *common.ConfigureReleaseResponse) error
ConfigureRelease runs before release to configure it.
func (*Handler) GetRootAccountSession ¶
GetRootAccountSession gets an AWS session in the root account.
func (*Handler) InitReleaseAccountCredentials ¶
InitReleaseAccountCredentials initialises the release account credentials.
func (*Handler) PrepareTerraform ¶
func (h *Handler) PrepareTerraform(request *common.PrepareTerraformRequest, response *common.PrepareTerraformResponse, releaseDir string) error
PrepareTerraform runs before terraform to configure.
func (*Handler) Setup ¶
func (h *Handler) Setup(request *common.SetupRequest, response *common.SetupResponse) error
Setup sets up the project.
func (*Handler) UploadRelease ¶
func (h *Handler) UploadRelease(request *common.UploadReleaseRequest, response *common.UploadReleaseResponse, configureReleaseRequest *common.ConfigureReleaseRequest, releaseDir string) error
UploadRelease runs after release to upload the release., releaseReader io.ReadSeeker
func (*Handler) WithAssumeRoleProviderFactory ¶
func (h *Handler) WithAssumeRoleProviderFactory(factory AssumeRoleProviderFactory) *Handler
WithAssumeRoleProviderFactory overrides the function used to create an assume role provider.
func (*Handler) WithECRClientFactory ¶
func (h *Handler) WithECRClientFactory(factory ECRClientFactory) *Handler
WithECRClientFactory overrides the function used to create an ECR client.
func (*Handler) WithErrorStream ¶
WithErrorStream overrides the stream where errors are written.
func (*Handler) WithOrganizationsClientFactory ¶
func (h *Handler) WithOrganizationsClientFactory(factory OrganizationsClientFactory) *Handler
WithOrganizationsClientFactory overrides the function used to create an Organizations client.
func (*Handler) WithReleaseFolder ¶
WithReleaseFolder overrides the release folder.
func (*Handler) WithReleaseLoader ¶
func (h *Handler) WithReleaseLoader(loader common.ReleaseLoader) *Handler
WithReleaseLoader overrides the release loader.
func (*Handler) WithReleaseSaver ¶
func (h *Handler) WithReleaseSaver(saver common.ReleaseSaver) *Handler
WithReleaseSaver overrides the release saver.
func (*Handler) WithS3ClientFactory ¶
func (h *Handler) WithS3ClientFactory(factory S3ClientFactory) *Handler
WithS3ClientFactory overrides the function used to create an S3 client.
func (*Handler) WithS3UploaderFactory ¶
func (h *Handler) WithS3UploaderFactory(factory S3UploaderFactory) *Handler
WithS3UploaderFactory overrides the function used to create an S3 uploader.
func (*Handler) WithSTSClientFactory ¶
func (h *Handler) WithSTSClientFactory(factory STSClientFactory) *Handler
WithSTSClientFactory overrides the function used to create an STS client.
func (*Handler) WithSecretsManagerClientFactory ¶
func (h *Handler) WithSecretsManagerClientFactory(factory SecretsManagerClientFactory) *Handler
WithSecretsManagerClientFactory overrides the function used to create a SecretsManagerClient client.
type OrganizationsClientFactory ¶
type OrganizationsClientFactory func(client.ConfigProvider) organizationsiface.OrganizationsAPI
OrganizationsClientFactory is a function that returns an organizations client.
type S3ClientFactory ¶
type S3ClientFactory func(client.ConfigProvider) s3iface.S3API
S3ClientFactory is a function that returns an S3 client.
type S3UploaderFactory ¶
type S3UploaderFactory func(client.ConfigProvider) s3manageriface.UploaderAPI
S3UploaderFactory is a function that returns an s3manager uploader.
type STSClientFactory ¶
type STSClientFactory func(client.ConfigProvider) stsiface.STSAPI
STSClientFactory is a function that returns an STS client.
type SecretsManagerClientFactory ¶
type SecretsManagerClientFactory func(client.ConfigProvider) secretsmanageriface.SecretsManagerAPI
SecretsManagerClientFactory is a function that returns a secrets manager client.