service

package
v0.3.1-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const StableVersion = "stable"

Variables

This section is empty.

Functions

func CreateDynamoDBTable

func CreateDynamoDBTable(awsConfig aws.Config, tableName string) (*types.TableDescription, error)

func GetConfig

func GetConfig(configFile string) model.Config

func GetDynamoDBTable

func GetDynamoDBTable(client *dynamodb.Client, tableName string) (*types.TableDescription, error)

func GetModuleState

func GetModuleState(stepState *model.StateStep, moduleName string) *model.StateModule

func GetStepState

func GetStepState(state *model.State, step model.Step) *model.StateStep

func NewAWSConfig

func NewAWSConfig() aws.Config

func UpdateSteps

func UpdateSteps(config model.Config, state *model.State)

Types

type Account

type Account interface {
	GetAccountID() string
}

func NewSTS

func NewSTS(config aws.Config) Account

type Artifacts

type Artifacts struct {
	Files []string
}

type Build

type Build struct {
	Commands []string
}

type BuildSpec

type BuildSpec struct {
	Version   string
	Phases    Phases
	Artifacts Artifacts
}

type Builder

type Builder interface {
	CreateProject(projectName string, roleArn string, logGroup string, streamName string, bucketArn string, repoURL string, stepName string, workspace string, vpcConfig *types.VpcConfig) error
}

func NewBuilder

func NewBuilder(awsConfig aws.Config) Builder

type CloudWatch

type CloudWatch interface {
	CreateLogGroup(logGroupName string) (string, error)
	CreateLogStream(logGroupName string, logStreamName string) error
	GetLogs(logGroupName string, logStreamName string, limit int32) ([]string, error)
}

func NewCloudWatch

func NewCloudWatch(awsConfig aws.Config) CloudWatch

type CodeCommit

type CodeCommit interface {
	CreateRepository() (bool, error)
	GetLatestCommitId() (*string, error)
	GetRepoMetadata() *types.RepositoryMetadata
	PutFile(file string, content []byte)
	GetFile(file string) []byte
}

func NewCodeCommit

func NewCodeCommit(awsConfig aws.Config, repoName string, branchName string) CodeCommit

type Github

type Github interface {
	GetLatestReleaseTag() (*Release, error)
	GetReleaseByTag(tag string) (*Release, error)
	GetNewerReleases(after time.Time, until time.Time) ([]Release, error)
}

func NewGithub

func NewGithub(repoURL string) Github

type IAM

type IAM interface {
	AttachRolePolicy(policyArn string, roleName string) error
	CreatePolicy(policyName string, statement []PolicyStatement) *types.Policy
	CreateRole(roleName string, statement []PolicyStatement) *types.Role
	GetRole(roleName string) *types.Role
}

func NewIAM

func NewIAM(config aws.Config) IAM

type Install

type Install struct {
	Commands []string
}

type Phases

type Phases struct {
	Install Install
	Build   Build
}

type Pipeline

type Pipeline interface {
	CreateTerraformPipeline(pipelineName string, projectName string, stepName string, workspace string) (*string, error)
	CreateTerraformDestroyPipeline(pipelineName string, projectName string, stepName string, workspace string) error
	CreateArgoCDPipeline(pipelineName string, projectName string, stepName string, workspace string) (*string, error)
	CreateArgoCDDestroyPipeline(pipelineName string, projectName string, stepName string, workspace string) error
	StartPipelineExecution(pipelineName string) (*string, error)
	WaitPipelineExecution(pipelineName string, executionId *string, autoApprove bool, delay int, stepType string) error
}

func NewPipeline

func NewPipeline(awsConfig aws.Config, repo string, branch string, roleArn string, bucket string, cloudWatch CloudWatch, logGroup string, logStream string) Pipeline

type PolicyDocument

type PolicyDocument struct {
	Version   string
	Statement []PolicyStatement
}

type PolicyStatement

type PolicyStatement struct {
	Effect    string
	Action    []string
	Principal map[string]string `json:",omitempty"`
	Resource  []string          `json:",omitempty"`
}

func CodeBuildPolicy

func CodeBuildPolicy(logGroupArn string, s3Arn string, repoArn string, dynamodbArn string) []PolicyStatement

func CodePipelinePolicy

func CodePipelinePolicy(s3Arn string, repoArn string) []PolicyStatement

type Release

type Release struct {
	Tag         string
	PublishedAt time.Time
}

type S3

type S3 interface {
	CreateBucket(bucketName string) (string, error)
}

func NewS3

func NewS3(awsConfig aws.Config) S3

type SSM

type SSM interface {
	GetParameter(name string) (string, error)
}

func NewSSM

func NewSSM(awsConfig aws.Config) SSM

type Updater

type Updater interface {
	ProcessSteps()
}

func NewUpdater

func NewUpdater(awsConfig aws.Config, accountId string, flags *common.Flags) Updater

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL