Documentation ¶
Index ¶
- Constants
- Variables
- func AcmClient() *acm.ACM
- func AcmClientExplicit(accessKeyID, accessKeySecret, region string) *acm.ACM
- func AcmListCertificates(ctx context.Context) ([]*acm.CertificateSummary, error)
- func Api(ctx context.Context, name string) (*apigatewayv2.Api, error)
- func ApiClient() *apigatewayv2.ApiGatewayV2
- func ApiClientExplicit(accessKeyID, accessKeySecret, region string) *apigatewayv2.ApiGatewayV2
- func ApiList(ctx context.Context) ([]*apigatewayv2.Api, error)
- func ApiListDomains(ctx context.Context) ([]*apigatewayv2.DomainName, error)
- func ApiUrl(ctx context.Context, name string) (string, error)
- func ApiWebsocketClose(ctx context.Context, domain, connectionID string) error
- func ApiWebsocketSend(ctx context.Context, domain, connectionID string, data []byte) error
- func ArnToInfraName(arn string) string
- func Atoi(a string) int
- func Caller(n int) string
- func Chunk(xs []string, chunkSize int) [][]string
- func CloudwatchClient() *cloudwatch.CloudWatch
- func CloudwatchClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatch.CloudWatch
- func CloudwatchEnsureAlarm(ctx context.Context, name string) error
- func CloudwatchGetMetricData(ctx context.Context, period int, stat string, fromTime, toTime *time.Time, ...) ([]*cloudwatch.MetricDataResult, error)
- func CloudwatchListMetrics(ctx context.Context, namespace, metric *string) ([]*cloudwatch.Metric, error)
- func CodeCommitClient() *codecommit.CodeCommit
- func CodeCommitClientExplicit(accessKeyID, accessKeySecret, region string) *codecommit.CodeCommit
- func CodeCommitListRepos(ctx context.Context) ([]*codecommit.RepositoryNameIdPair, error)
- func Contains(parts []string, part string) bool
- func CostExplorerClient() *costexplorer.CostExplorer
- func CostExplorerClientExplicit(accessKeyID, accessKeySecret, region string) *costexplorer.CostExplorer
- func DropLinesWithAny(s string, tokens ...string) string
- func DynamoDBArn(ctx context.Context, tableName string) (string, error)
- func DynamoDBClient() *dynamodb.DynamoDB
- func DynamoDBClientExplicit(accessKeyID, accessKeySecret, region string) *dynamodb.DynamoDB
- func DynamoDBDeleteTable(ctx context.Context, tableName string, preview bool) error
- func DynamoDBEnsure(ctx context.Context, input *dynamodb.CreateTableInput, preview bool) error
- func DynamoDBEnsureInput(infraSetName, tableName string, keys []string, attrs []string) (*dynamodb.CreateTableInput, error)
- func DynamoDBItemDeleteAll(ctx context.Context, tableName string, keyNames []string) error
- func DynamoDBListTables(ctx context.Context) ([]string, error)
- func DynamoDBListTags(ctx context.Context, tableName string) ([]*dynamodb.Tag, error)
- func DynamoDBStreamArn(ctx context.Context, tableName string) (string, error)
- func DynamoDBStreamArnToTableName(arn string) string
- func DynamoDBWaitForGone(ctx context.Context, tableName string) error
- func DynamoDBWaitForReady(ctx context.Context, tableName string) error
- func EC2AmiBase(ctx context.Context, name, arch string) (amiID string, sshUser string, err error)
- func EC2AmiUser(ctx context.Context, amiID string) (string, error)
- func EC2Client() *ec2.EC2
- func EC2ClientExplicit(accessKeyID, accessKeySecret, region string) *ec2.EC2
- func EC2DeleteKeypair(ctx context.Context, keypairName string, preview bool) error
- func EC2DeleteSg(ctx context.Context, vpcName, sgName string, preview bool) error
- func EC2DescribeInstances(ctx context.Context, instanceIDs []string) ([]*ec2.Instance, error)
- func EC2DescribeSpotFleet(ctx context.Context, spotFleetRequestId *string) (*ec2.SpotFleetRequestConfig, error)
- func EC2DescribeSpotFleetActiveInstances(ctx context.Context, spotFleetRequestId *string) ([]*ec2.ActiveInstance, error)
- func EC2EnsureKeypair(ctx context.Context, infraSetName, keyName, pubkeyContent string, preview bool) error
- func EC2EnsureSg(ctx context.Context, input *ec2EnsureSgInput, preview bool) error
- func EC2EnsureSgInput(infraSetName, vpcName, sgName string, rules []string) (*ec2EnsureSgInput, error)
- func EC2GetTag(tags []*ec2.Tag, key string, defaultValue string) string
- func EC2GoSsh(ctx context.Context, input *EC2GoSshInput) ([]*ec2GoSshResult, error)
- func EC2Kind(instance *ec2.Instance) string
- func EC2ListInstances(ctx context.Context, selectors []string, state string) ([]*ec2.Instance, error)
- func EC2ListSgs(ctx context.Context) ([]*ec2.SecurityGroup, error)
- func EC2Name(tags []*ec2.Tag) string
- func EC2NameColored(instance *ec2.Instance) string
- func EC2NewAmi(ctx context.Context, input *EC2NewAmiInput) (string, error)
- func EC2NewInstances(ctx context.Context, config *EC2Config) ([]*ec2.Instance, error)
- func EC2RequestSpotFleet(ctx context.Context, spotStrategy string, config *EC2Config) ([]*ec2.Instance, error)
- func EC2Rsync(ctx context.Context, input *EC2RsyncInput) ([]*ec2SshResult, error)
- func EC2Scp(ctx context.Context, input *EC2ScpInput) ([]*ec2SshResult, error)
- func EC2SecurityGroups(sgs []*ec2.GroupIdentifier) string
- func EC2SgID(ctx context.Context, vpcName, sgName string) (string, error)
- func EC2Ssh(ctx context.Context, input *EC2SshInput) ([]*ec2SshResult, error)
- func EC2SshLogin(instance *ec2.Instance, user, key string) error
- func EC2Tags(tags []*ec2.Tag) string
- func EC2TagsAll(tags []*ec2.Tag) string
- func EC2TeardownSpotFleet(ctx context.Context, spotFleetRequestId *string) error
- func EC2WaitGoSsh(ctx context.Context, input *EC2WaitGoSshInput) ([]string, error)
- func EC2WaitSsh(ctx context.Context, input *EC2WaitSshInput) ([]string, error)
- func EC2WaitState(ctx context.Context, instanceIDs []string, state string) error
- func EC2ZonesWithInstance(ctx context.Context, instanceType string) (zones []string, err error)
- func ECSClient() *ecs.ECS
- func ECSClientExplicit(accessKeyID, accessKeySecret, region string) *ecs.ECS
- func EcrClient() *ecr.ECR
- func EcrClientExplicit(accessKeyID, accessKeySecret, region string) *ecr.ECR
- func EcrDescribeRepos(ctx context.Context) ([]*ecr.Repository, error)
- func EcrEnsure(ctx context.Context, name string, preview bool) error
- func EcrUrl(ctx context.Context) (string, error)
- func EventsClient() *cloudwatchevents.CloudWatchEvents
- func EventsClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatchevents.CloudWatchEvents
- func EventsListBuses(ctx context.Context) ([]*cloudwatchevents.EventBus, error)
- func EventsListRuleTargets(ctx context.Context, ruleName string, busName *string) ([]*cloudwatchevents.Target, error)
- func EventsListRules(ctx context.Context, busName *string) ([]*cloudwatchevents.Rule, error)
- func Exists(path string) bool
- func FromUnixMilli(msec int64) time.Time
- func IamClient() *iam.IAM
- func IamClientExplicit(accessKeyID, accessKeySecret, region string) *iam.IAM
- func IamDeleteInstanceProfile(ctx context.Context, profileName string, preview bool) error
- func IamDeleteRole(ctx context.Context, roleName string, preview bool) error
- func IamDeleteUser(ctx context.Context, name string, preview bool) error
- func IamEnsureEC2SpotRoles(ctx context.Context, preview bool) error
- func IamEnsureInstanceProfile(ctx context.Context, infrasetName, profileName string, ...) error
- func IamEnsureRole(ctx context.Context, infrasetName, roleName, principalName string, ...) error
- func IamEnsureRoleAllows(ctx context.Context, roleName string, allows []string, preview bool) error
- func IamEnsureRolePolicies(ctx context.Context, roleName string, policyNames []string, preview bool) error
- func IamEnsureUserAllows(ctx context.Context, username string, allows []string, preview bool) error
- func IamEnsureUserApi(ctx context.Context, username string, preview bool) (*iam.AccessKey, error)
- func IamEnsureUserLogin(ctx context.Context, username, password string, preview bool) error
- func IamEnsureUserPolicies(ctx context.Context, username string, policyNames []string, preview bool) error
- func IamGetSSHPublicKey(ctx context.Context, keyID string) (*iam.SSHPublicKey, error)
- func IamInstanceProfileArn(ctx context.Context, profileName string) (string, error)
- func IamListPolicies(ctx context.Context) ([]*iam.Policy, error)
- func IamListRolePolicies(ctx context.Context, roleName string) ([]*iam.AttachedPolicy, error)
- func IamListSSHPublicKeys(ctx context.Context) ([]*iam.SSHPublicKeyMetadata, error)
- func IamListUserPolicies(ctx context.Context, username string) ([]*iam.Policy, error)
- func IamPolicyArn(ctx context.Context, policyName string) (string, error)
- func IamResetUserLoginTempPassword(ctx context.Context, username, password string) error
- func IamRoleArn(ctx context.Context, principalName, roleName string) (string, error)
- func InfraDelete(ctx context.Context, infraSet *InfraSet, preview bool) error
- func InfraEnsure(ctx context.Context, infraSet *InfraSet, quick string, ...) error
- func InfraEnsureDynamoDB(ctx context.Context, infraSet *InfraSet, preview bool) error
- func InfraEnsureInstanceProfile(ctx context.Context, infraSet *InfraSet, preview bool) error
- func InfraEnsureKeypair(ctx context.Context, infraSet *InfraSet, preview bool) error
- func InfraEnsureLambda(ctx context.Context, infraSet *InfraSet, quick string, ...) error
- func InfraEnsureS3(ctx context.Context, infraSet *InfraSet, preview bool) error
- func InfraEnsureSQS(ctx context.Context, infraSet *InfraSet, preview bool) error
- func InfraEnsureVpc(ctx context.Context, infraSet *InfraSet, preview bool) error
- func InfraListApi(ctx context.Context, triggersChan chan<- *InfraTrigger) (map[string]*InfraApi, error)
- func InfraListDynamoDB(ctx context.Context) (map[string]*InfraDynamoDB, error)
- func InfraListEC2(ctx context.Context) (map[string]*InfraEC2, error)
- func InfraListEvent(ctx context.Context, triggersChan chan<- *InfraTrigger) (map[string]*InfraEvent, error)
- func InfraListInstanceProfile(ctx context.Context) (map[string]*InfraInstanceProfile, error)
- func InfraListKeypair(ctx context.Context) (map[string]*InfraKeypair, error)
- func InfraListLambda(ctx context.Context, triggersChan <-chan *InfraTrigger, filter string) (map[string]*InfraLambda, error)
- func InfraListRole(ctx context.Context) (map[string]*InfraRole, error)
- func InfraListS3(ctx context.Context, triggersChan chan<- *InfraTrigger) (map[string]*InfraS3, error)
- func InfraListSQS(ctx context.Context) (map[string]*InfraSQS, error)
- func InfraListUser(ctx context.Context) (map[string]*InfraUser, error)
- func InfraListVpc(ctx context.Context) (map[string]*InfraVpc, error)
- func IsDigit(s string) bool
- func Json(i interface{}) string
- func LambdaApiUri(ctx context.Context, lambdaName string) (string, error)
- func LambdaApiUriToLambdaName(apiUri string) string
- func LambdaArn(ctx context.Context, name string) (string, error)
- func LambdaArnToLambdaName(arn string) string
- func LambdaClient() *lambda.Lambda
- func LambdaClientExplicit(accessKeyID, accessKeySecret, region string) *lambda.Lambda
- func LambdaDelete(ctx context.Context, name string, preview bool) error
- func LambdaDeleteFunction(ctx context.Context, name string, preview bool) error
- func LambdaEnsureTriggerApi(ctx context.Context, infraLambda *InfraLambda, preview bool) ([]string, error)
- func LambdaEnsureTriggerDynamoDB(ctx context.Context, infraLambda *InfraLambda, preview bool) error
- func LambdaEnsureTriggerEcr(ctx context.Context, infraLambda *InfraLambda, preview bool) ([]string, error)
- func LambdaEnsureTriggerS3(ctx context.Context, infraLambda *InfraLambda, preview bool) ([]string, error)
- func LambdaEnsureTriggerSQS(ctx context.Context, infraLambda *InfraLambda, preview bool) error
- func LambdaEnsureTriggerSchedule(ctx context.Context, infraLambda *InfraLambda, preview bool) ([]string, error)
- func LambdaIncludeInZip(infraLambda *InfraLambda) error
- func LambdaListFunctions(ctx context.Context) ([]*lambda.FunctionConfiguration, error)
- func LambdaSetConcurrency(ctx context.Context, lambdaName string, concurrency int, preview bool) error
- func LambdaUpdateFunctionCode(ctx context.Context, infraLambda *InfraLambda, preview bool) error
- func LambdaZipBytes(infraLambda *InfraLambda) ([]byte, error)
- func LambdaZipFile(name string) string
- func Last(parts []string) string
- func LogsClient() *cloudwatchlogs.CloudWatchLogs
- func LogsClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatchlogs.CloudWatchLogs
- func LogsDeleteGroup(ctx context.Context, name string, preview bool) error
- func LogsEnsureGroup(ctx context.Context, infrasetName, logGroupName string, ttlDays int, ...) error
- func LogsListLogGroups(ctx context.Context) ([]*cloudwatchlogs.LogGroup, error)
- func LogsMostRecentStreams(ctx context.Context, name string) ([]*cloudwatchlogs.LogStream, error)
- func LogsStreams(ctx context.Context, name string) ([]*cloudwatchlogs.LogStream, error)
- func LogsTail(ctx context.Context, name string, minAge time.Time, ...) error
- func Max(i, j int) int
- func NowUnixMilli() int64
- func OrganizationsClient() *organizations.Organizations
- func OrganizationsClientExplicit(accessKeyID, accessKeySecret, region string) *organizations.Organizations
- func OrganizationsEnsure(ctx context.Context, name, email string, preview bool) (string, error)
- func Pformat(i interface{}) string
- func PformatAlways(i interface{}) string
- func PreviewString(preview bool) string
- func PromptProceed(prompt string) error
- func Region() string
- func Retry(ctx context.Context, fn func() error) error
- func RetryAttempts(ctx context.Context, attempts int, fn func() error) error
- func Route53Client() *route53.Route53
- func Route53ClientExplicit(accessKeyID, accessKeySecret, region string) *route53.Route53
- func Route53DeleteRecord(ctx context.Context, input *route53EnsureRecordInput, preview bool) error
- func Route53DeleteZone(ctx context.Context, name string, preview bool) error
- func Route53EnsureRecord(ctx context.Context, input *route53EnsureRecordInput, preview bool) error
- func Route53EnsureRecordInput(zoneName, recordName string, attrs []string) (*route53EnsureRecordInput, error)
- func Route53EnsureZone(ctx context.Context, name string, preview bool) error
- func Route53ListRecords(ctx context.Context, zoneId string) ([]*route53.ResourceRecordSet, error)
- func Route53ListZones(ctx context.Context) ([]*route53.HostedZone, error)
- func Route53ZoneID(ctx context.Context, name string) (string, error)
- func S3BucketRegion(bucket string) (string, error)
- func S3Client() *s3.S3
- func S3ClientBucketRegion(bucket string) (*s3.S3, error)
- func S3ClientBucketRegionMust(bucket string) *s3.S3
- func S3ClientExplicit(accessKeyID, accessKeySecret, region string) *s3.S3
- func S3ClientRegion(region string) (*s3.S3, error)
- func S3ClientRegionMust(region string) *s3.S3
- func S3DeleteBucket(ctx context.Context, bucket string, preview bool) error
- func S3Ensure(ctx context.Context, input *s3EnsureInput, preview bool) error
- func S3EnsureInput(infraSetName, bucketName string, attrs []string) (*s3EnsureInput, error)
- func S3PresignGet(bucket, key, byterange string, expire time.Duration) string
- func S3PresignPut(bucket, key string, expire time.Duration) string
- func SNSArn(ctx context.Context, name string) (string, error)
- func SNSClient() *sns.SNS
- func SNSClientExplicit(accessKeyID, accessKeySecret, region string) *sns.SNS
- func SNSEnsure(ctx context.Context, name string, preview bool) error
- func SNSListSubscriptions(ctx context.Context, topicArn string) ([]*sns.Subscription, error)
- func SQSArn(ctx context.Context, name string) (string, error)
- func SQSArnToName(arn string) string
- func SQSClient() *sqs.SQS
- func SQSClientExplicit(accessKeyID, accessKeySecret, region string) *sqs.SQS
- func SQSDeleteQueue(ctx context.Context, name string, preview bool) error
- func SQSEnsure(ctx context.Context, input *sqsEnsureInput, preview bool) error
- func SQSEnsureInput(infraSetName, queueName string, attrs []string) (*sqsEnsureInput, error)
- func SQSListQueueUrls(ctx context.Context) ([]string, error)
- func SQSListQueues(ctx context.Context) ([]string, error)
- func SQSQueueUrl(ctx context.Context, name string) (string, error)
- func SQSUrlToName(url string) string
- func STSClient() *sts.STS
- func STSClientExplicit(accessKeyID, accessKeySecret, region string) *sts.STS
- func Session() *session.Session
- func SessionExplicit(accessKeyID, accessKeySecret, region string) *session.Session
- func SessionRegion(region string) (*session.Session, error)
- func SignalHandler(cancel func())
- func SplitOnce(s string, sep string) (head, tail string, err error)
- func SplitTwice(s string, sep string) (head, mid, tail string, err error)
- func SplitWhiteSpace(s string) []string
- func SplitWhiteSpaceN(s string, n int) []string
- func SshKeygenEd25519() (string, string, error)
- func SshKeygenRsa() (string, string, error)
- func StringOr(s *string, d string) string
- func StringSlice(xs []*string) []string
- func StsAccount(ctx context.Context) (string, error)
- func StsArn(ctx context.Context) (string, error)
- func StsUser(ctx context.Context) (string, error)
- func ToUnixMilli(t time.Time) int64
- func VpcEnsure(ctx context.Context, infraSetName, vpcName string, preview bool) (string, error)
- func VpcID(ctx context.Context, name string) (string, error)
- func VpcList(ctx context.Context) ([]*ec2.Vpc, error)
- func VpcListSubnets(ctx context.Context, vpcID string) ([]*ec2.Subnet, error)
- func VpcRm(ctx context.Context, name string, preview bool) error
- func VpcSubnets(ctx context.Context, vpcID string) ([]*ec2.Subnet, error)
- func Zones(ctx context.Context) ([]*ec2.AvailabilityZone, error)
- type ArgsStruct
- type CloudwatchAlarm
- type Debug
- type EC2Config
- type EC2GoSshInput
- type EC2NewAmiInput
- type EC2RsyncInput
- type EC2ScpInput
- type EC2SgRule
- type EC2SshInput
- type EC2Tag
- type EC2WaitGoSshInput
- type EC2WaitSshInput
- type IamAllow
- type IamInstanceProfile
- type IamPolicy
- type IamPolicyDocument
- type IamPolicyDocumentCondition
- type IamRole
- type IamStatementEntry
- type IamStatementEntryCondition
- type IamUser
- type InfraApi
- type InfraDynamoDB
- type InfraDynamoDBIndex
- type InfraEC2
- type InfraEvent
- type InfraInstanceProfile
- type InfraKeypair
- type InfraLambda
- type InfraListOutput
- type InfraRole
- type InfraS3
- type InfraSQS
- type InfraSecurityGroup
- type InfraSet
- type InfraTrigger
- type InfraUser
- type InfraVpc
- type Kind
- type LambdaCreateZipFn
- type LambdaUpdateZipFn
- type LoggerStruct
- type S3BucketDescription
- type SQSNumMessageOutput
Constants ¶
View Source
const ( EC2ArchAmd64 = "x86_64" EC2ArchArm64 = "arm64" EC2AmiAmzn2023 = "amzn2023" EC2AmiAmzn2 = "amzn2" EC2AmiUbuntuJammy = "jammy" EC2AmiUbuntuFocal = "focal" EC2AmiUbuntuBionic = "bionic" EC2AmiUbuntuXenial = "xenial" EC2AmiUbuntuTrusty = "trusty" EC2AmiDebianBookworm = "bookworm" EC2AmiDebianBullseye = "bullseye" EC2AmiDebianBuster = "buster" EC2AmiDebianStretch = "stretch" EC2AmiAlpine3160 = "alpine-3.16.0" EC2AmiAlpine3182 = "alpine-3.18.2" EC2AmiAlpine3183 = "alpine-3.18.3" EC2AmiAlpine3184 = "alpine-3.18.4" )
View Source
const (
EC2SpotFleetTaggingRole = "aws-ec2-spot-fleet-tagging-role"
)
View Source
const (
ErrApiNotFound = "ErrApiNotFound"
)
View Source
const (
ErrPrefixDidntFindExactlyOne = "didn't find exactly one"
)
View Source
const (
LambdaWebsocketSuffix = lambdaEventRuleNameSeparator + "websocket"
)
Variables ¶
View Source
var ( Red = color(31) Green = color(32) Yellow = color(33) Blue = color(34) Magenta = color(35) Cyan = color(36) White = color(37) )
View Source
var Args = make(map[string]ArgsStruct)
View Source
var Commands = make(map[string]func())
View Source
var Logger = &LoggerStruct{ Print: func(args ...interface{}) { fmt.Fprint(os.Stderr, args...) }, Flush: func() {}, disabled: strings.ToLower(os.Getenv("LOGGING") + " ")[:1] == "n", }
Functions ¶
func AcmClientExplicit ¶
func AcmListCertificates ¶
func AcmListCertificates(ctx context.Context) ([]*acm.CertificateSummary, error)
func ApiClient ¶
func ApiClient() *apigatewayv2.ApiGatewayV2
func ApiClientExplicit ¶
func ApiClientExplicit(accessKeyID, accessKeySecret, region string) *apigatewayv2.ApiGatewayV2
func ApiListDomains ¶
func ApiListDomains(ctx context.Context) ([]*apigatewayv2.DomainName, error)
func ApiWebsocketClose ¶
func ApiWebsocketSend ¶
func ArnToInfraName ¶
func CloudwatchClient ¶
func CloudwatchClient() *cloudwatch.CloudWatch
func CloudwatchClientExplicit ¶
func CloudwatchClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatch.CloudWatch
func CloudwatchGetMetricData ¶
func CloudwatchListMetrics ¶
func CodeCommitClient ¶
func CodeCommitClient() *codecommit.CodeCommit
func CodeCommitClientExplicit ¶
func CodeCommitClientExplicit(accessKeyID, accessKeySecret, region string) *codecommit.CodeCommit
func CodeCommitListRepos ¶
func CodeCommitListRepos(ctx context.Context) ([]*codecommit.RepositoryNameIdPair, error)
func CostExplorerClient ¶
func CostExplorerClient() *costexplorer.CostExplorer
func CostExplorerClientExplicit ¶
func CostExplorerClientExplicit(accessKeyID, accessKeySecret, region string) *costexplorer.CostExplorer
func DropLinesWithAny ¶
func DynamoDBClient ¶
func DynamoDBClientExplicit ¶
func DynamoDBDeleteTable ¶
func DynamoDBEnsure ¶
func DynamoDBEnsureInput ¶
func DynamoDBItemDeleteAll ¶
func DynamoDBListTags ¶
func DynamoDBStreamArn ¶
func EC2AmiBase ¶
func EC2ClientExplicit ¶
func EC2DeleteKeypair ¶
func EC2DeleteSg ¶
func EC2DescribeInstances ¶
func EC2DescribeSpotFleet ¶
func EC2EnsureKeypair ¶
func EC2EnsureSg ¶
func EC2EnsureSgInput ¶
func EC2ListInstances ¶
func EC2ListSgs ¶
func EC2ListSgs(ctx context.Context) ([]*ec2.SecurityGroup, error)
func EC2NameColored ¶
func EC2NewInstances ¶
func EC2RequestSpotFleet ¶
func EC2SecurityGroups ¶
func EC2SecurityGroups(sgs []*ec2.GroupIdentifier) string
func EC2TagsAll ¶
func EC2TeardownSpotFleet ¶
func EC2WaitGoSsh ¶
func EC2WaitGoSsh(ctx context.Context, input *EC2WaitGoSshInput) ([]string, error)
func EC2WaitSsh ¶
func EC2WaitSsh(ctx context.Context, input *EC2WaitSshInput) ([]string, error)
func EC2WaitState ¶
func EC2ZonesWithInstance ¶
func ECSClientExplicit ¶
func EcrClientExplicit ¶
func EcrDescribeRepos ¶
func EcrDescribeRepos(ctx context.Context) ([]*ecr.Repository, error)
func EventsClient ¶
func EventsClient() *cloudwatchevents.CloudWatchEvents
func EventsClientExplicit ¶
func EventsClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatchevents.CloudWatchEvents
func EventsListBuses ¶
func EventsListBuses(ctx context.Context) ([]*cloudwatchevents.EventBus, error)
func EventsListRuleTargets ¶
func EventsListRules ¶
func FromUnixMilli ¶
func IamClientExplicit ¶
func IamEnsureRole ¶
func IamEnsureRoleAllows ¶
func IamEnsureRolePolicies ¶
func IamEnsureUserAllows ¶
func IamEnsureUserApi ¶
func IamEnsureUserLogin ¶
func IamEnsureUserPolicies ¶
func IamGetSSHPublicKey ¶
func IamInstanceProfileArn ¶
func IamListRolePolicies ¶
func IamListSSHPublicKeys ¶
func IamListSSHPublicKeys(ctx context.Context) ([]*iam.SSHPublicKeyMetadata, error)
func IamListUserPolicies ¶
func IamRoleArn ¶
func InfraEnsure ¶
func InfraEnsureDynamoDB ¶
func InfraEnsureKeypair ¶
func InfraEnsureLambda ¶
func InfraEnsureS3 ¶
func InfraEnsureSQS ¶
func InfraEnsureVpc ¶
func InfraListApi ¶
func InfraListDynamoDB ¶
func InfraListDynamoDB(ctx context.Context) (map[string]*InfraDynamoDB, error)
func InfraListEvent ¶
func InfraListEvent(ctx context.Context, triggersChan chan<- *InfraTrigger) (map[string]*InfraEvent, error)
func InfraListInstanceProfile ¶
func InfraListInstanceProfile(ctx context.Context) (map[string]*InfraInstanceProfile, error)
func InfraListKeypair ¶
func InfraListKeypair(ctx context.Context) (map[string]*InfraKeypair, error)
func InfraListLambda ¶
func InfraListLambda(ctx context.Context, triggersChan <-chan *InfraTrigger, filter string) (map[string]*InfraLambda, error)
func InfraListS3 ¶
func LambdaArnToLambdaName ¶
func LambdaClient ¶
func LambdaClientExplicit ¶
func LambdaDeleteFunction ¶
func LambdaEnsureTriggerApi ¶
func LambdaEnsureTriggerDynamoDB ¶
func LambdaEnsureTriggerDynamoDB(ctx context.Context, infraLambda *InfraLambda, preview bool) error
func LambdaEnsureTriggerEcr ¶
func LambdaEnsureTriggerS3 ¶
func LambdaEnsureTriggerSQS ¶
func LambdaEnsureTriggerSQS(ctx context.Context, infraLambda *InfraLambda, preview bool) error
func LambdaIncludeInZip ¶
func LambdaIncludeInZip(infraLambda *InfraLambda) error
func LambdaListFunctions ¶
func LambdaListFunctions(ctx context.Context) ([]*lambda.FunctionConfiguration, error)
func LambdaSetConcurrency ¶
func LambdaUpdateFunctionCode ¶
func LambdaUpdateFunctionCode(ctx context.Context, infraLambda *InfraLambda, preview bool) error
func LambdaZipBytes ¶
func LambdaZipBytes(infraLambda *InfraLambda) ([]byte, error)
func LambdaZipFile ¶
func LogsClient ¶
func LogsClient() *cloudwatchlogs.CloudWatchLogs
func LogsClientExplicit ¶
func LogsClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatchlogs.CloudWatchLogs
func LogsEnsureGroup ¶
func LogsListLogGroups ¶
func LogsListLogGroups(ctx context.Context) ([]*cloudwatchlogs.LogGroup, error)
func LogsMostRecentStreams ¶
func LogsStreams ¶
func NowUnixMilli ¶
func NowUnixMilli() int64
func OrganizationsClient ¶
func OrganizationsClient() *organizations.Organizations
func OrganizationsClientExplicit ¶
func OrganizationsClientExplicit(accessKeyID, accessKeySecret, region string) *organizations.Organizations
func OrganizationsEnsure ¶
func PformatAlways ¶
func PformatAlways(i interface{}) string
func PreviewString ¶
func PromptProceed ¶
func RetryAttempts ¶
6 attempts = 5 seconds total delay 7 attempts = 10 seconds total delay 8 attempts = 20 seconds total delay 9 attempts = 40 seconds total delay 10 attempts = 80 seconds total delay 11 attempts = 160 seconds total delay 12 attempts = 320 seconds total delay
func Route53Client ¶
func Route53ClientExplicit ¶
func Route53DeleteRecord ¶
func Route53DeleteZone ¶
func Route53EnsureRecord ¶
func Route53EnsureZone ¶
func Route53ListRecords ¶
func Route53ListZones ¶
func Route53ListZones(ctx context.Context) ([]*route53.HostedZone, error)
func S3BucketRegion ¶
func S3ClientExplicit ¶
func S3ClientRegionMust ¶
func S3EnsureInput ¶
func SNSClientExplicit ¶
func SNSListSubscriptions ¶
func SQSArnToName ¶
func SQSClientExplicit ¶
func SQSEnsureInput ¶
func SQSUrlToName ¶
func STSClientExplicit ¶
func SessionExplicit ¶
func SignalHandler ¶
func SignalHandler(cancel func())
func SplitWhiteSpace ¶
func SplitWhiteSpaceN ¶
func SshKeygenEd25519 ¶
func SshKeygenRsa ¶
func StringSlice ¶
func ToUnixMilli ¶
Types ¶
type ArgsStruct ¶
type ArgsStruct interface {
Description() string
}
type CloudwatchAlarm ¶
type CloudwatchAlarm struct { ActionsEnabled *bool `json:",omitempty"` AlarmActions []*string `json:",omitempty"` AlarmConfigurationUpdatedTimestamp *time.Time `json:",omitempty"` AlarmName *string `json:",omitempty"` ComparisonOperator *string `json:",omitempty"` DatapointsToAlarm *int64 `json:",omitempty"` Dimensions []*cloudwatch.Dimension `json:",omitempty"` EvaluateLowSampleCountPercentile *string `json:",omitempty"` EvaluationPeriods *int64 `json:",omitempty"` ExtendedStatistic *string `json:",omitempty"` InsufficientDataActions []*string `json:",omitempty"` MetricName *string `json:",omitempty"` Metrics []*cloudwatch.MetricDataQuery `json:",omitempty"` Namespace *string `json:",omitempty"` OKActions []*string `json:",omitempty"` Period *int64 `json:",omitempty"` StateValue *string `json:",omitempty"` Statistic *string `json:",omitempty"` Threshold *float64 `json:",omitempty"` ThresholdMetricId *string `json:",omitempty"` TreatMissingData *string `json:",omitempty"` Unit *string `json:",omitempty"` // contains filtered or unexported fields }
func CloudwatchListAlarms ¶
func CloudwatchListAlarms(ctx context.Context) ([]*CloudwatchAlarm, error)
func (*CloudwatchAlarm) FromAlarm ¶
func (a *CloudwatchAlarm) FromAlarm(alarm *cloudwatch.MetricAlarm)
type EC2GoSshInput ¶
type EC2NewAmiInput ¶
type EC2RsyncInput ¶
type EC2ScpInput ¶
type EC2SgRule ¶
type EC2SgRule struct { Proto string `json:"proto"` Port int `json:"port"` Source string `json:"source"` }
func EC2SgRules ¶
func EC2SgRules(p *ec2.IpPermission) ([]EC2SgRule, error)
type EC2SshInput ¶
type EC2WaitGoSshInput ¶
type EC2WaitSshInput ¶
type IamInstanceProfile ¶
type IamInstanceProfile struct { Name *string `json:",omitempty" yaml:",omitempty"` Roles []*IamRole `json:",omitempty" yaml:",omitempty"` // contains filtered or unexported fields }
func IamListInstanceProfiles ¶
func IamListInstanceProfiles(ctx context.Context, pathPrefix *string) ([]*IamInstanceProfile, error)
func (*IamInstanceProfile) FromProfile ¶
func (p *IamInstanceProfile) FromProfile(ctx context.Context, profile *iam.InstanceProfile) error
type IamPolicy ¶
type IamPolicy struct { Arn *string `json:",omitempty"` AttachmentCount *int64 `json:",omitempty"` CreateDate *time.Time `json:",omitempty"` DefaultVersionId *string `json:",omitempty"` Description *string `json:",omitempty"` IsAttachable *bool `json:",omitempty"` Path *string `json:",omitempty"` PermissionsBoundaryUsageCount *int64 `json:",omitempty"` PolicyId *string `json:",omitempty"` PolicyName *string `json:",omitempty"` Tags []*iam.Tag `json:",omitempty"` UpdateDate *time.Time `json:",omitempty"` PolicyDocument *IamPolicyDocument `json:",omitempty"` }
type IamPolicyDocument ¶
type IamPolicyDocument struct { Version string `json:",omitempty" yaml:",omitempty"` Id string `json:",omitempty" yaml:",omitempty"` Statement []IamStatementEntry `json:",omitempty" yaml:",omitempty"` }
type IamPolicyDocumentCondition ¶
type IamPolicyDocumentCondition struct { Version string Id string Statement []IamStatementEntryCondition }
type IamRole ¶
type IamRole struct { AssumeRolePolicyDocument *IamPolicyDocument `json:",omitempty" yaml:",omitempty"` PermissionsBoundary *iam.AttachedPermissionsBoundary `json:",omitempty" yaml:",omitempty"` RoleLastUsed *iam.RoleLastUsed `json:",omitempty" yaml:",omitempty"` RoleName *string `json:",omitempty" yaml:",omitempty"` Tags []*iam.Tag `json:",omitempty" yaml:",omitempty"` Allow []string `json:",omitempty" yaml:",omitempty"` Policy []string `json:",omitempty" yaml:",omitempty"` // contains filtered or unexported fields }
type IamStatementEntry ¶
type IamStatementEntry struct { Sid string `json:",omitempty" yaml:",omitempty"` Effect string `json:",omitempty" yaml:",omitempty"` Resource interface{} `json:",omitempty" yaml:",omitempty"` Principal interface{} `json:",omitempty" yaml:",omitempty"` Action interface{} `json:",omitempty" yaml:",omitempty"` }
type IamStatementEntryCondition ¶
type IamStatementEntryCondition struct { Sid string Effect string `json:",omitempty" yaml:",omitempty"` Resource interface{} `json:",omitempty" yaml:",omitempty"` Principal interface{} `json:",omitempty" yaml:",omitempty"` Action interface{} `json:",omitempty" yaml:",omitempty"` Condition interface{} `json:",omitempty" yaml:",omitempty"` }
type IamUser ¶
type InfraDynamoDB ¶
type InfraDynamoDB struct { Key []string `json:"key" yaml:"key"` Attr []string `json:"attr,omitempty" yaml:"attr,omitempty"` GlobalIndex map[string]*InfraDynamoDBIndex `json:"global-index,omitempty" yaml:"global-index,omitempty"` LocalIndex map[string]*InfraDynamoDBIndex `json:"local-index,omitempty" yaml:"local-index,omitempty"` // contains filtered or unexported fields }
type InfraDynamoDBIndex ¶
type InfraEvent ¶
type InfraInstanceProfile ¶
type InfraKeypair ¶
type InfraKeypair struct { PubkeyContent string `json:"pubkey-content" yaml:"pubkey-content"` // contains filtered or unexported fields }
type InfraLambda ¶
type InfraLambda struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Arn string `json:"arn,omitempty" yaml:"arn,omitempty"` Entrypoint string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"` Policy []string `json:"policy,omitempty" yaml:"policy,omitempty"` Allow []string `json:"allow,omitempty" yaml:"allow,omitempty"` Attr []string `json:"attr,omitempty" yaml:"attr,omitempty"` Require []string `json:"require,omitempty" yaml:"require,omitempty"` Env []string `json:"env,omitempty" yaml:"env,omitempty"` Include []string `json:"include,omitempty" yaml:"include,omitempty"` Trigger []*InfraTrigger `json:"trigger,omitempty" yaml:"trigger,omitempty"` // contains filtered or unexported fields }
type InfraListOutput ¶
type InfraS3 ¶
type InfraS3 struct { Attr []string `json:"attr,omitempty" yaml:"attr,omitempty"` // contains filtered or unexported fields }
type InfraSQS ¶
type InfraSQS struct { Attr []string `json:"attr,omitempty" yaml:"attr,omitempty"` // contains filtered or unexported fields }
type InfraSecurityGroup ¶
type InfraSecurityGroup struct {
Rule []string `json:"rule,omitempty" yaml:"rule,omitempty"`
}
type InfraSet ¶
type InfraSet struct { // infra set name Name string `yaml:"name,omitempty"` // lambda Lambda map[string]*InfraLambda `yaml:"lambda,omitempty"` // stateful infra DynamoDB map[string]*InfraDynamoDB `yaml:"dynamodb,omitempty"` SQS map[string]*InfraSQS `yaml:"sqs,omitempty"` S3 map[string]*InfraS3 `yaml:"s3,omitempty"` // ec2 infra Keypair map[string]*InfraKeypair `yaml:"keypair,omitempty"` Vpc map[string]*InfraVpc `yaml:"vpc,omitempty"` InstanceProfile map[string]*InfraInstanceProfile `yaml:"instance-profile,omitempty"` // "none" infraset gets a few extra slots for resources not associated with any infraset User map[string]*InfraUser `yaml:"user,omitempty"` Role map[string]*InfraRole `yaml:"role,omitempty"` // any role not associated with an infraset shows up here Api map[string]*InfraApi `yaml:"api,omitempty"` // any api not associated with an infraset shows up here Event map[string]*InfraEvent `yaml:"event,omitempty"` // any event not associated with an infraset shows up here }
func InfraParse ¶
type InfraTrigger ¶
type InfraVpc ¶
type InfraVpc struct { SecurityGroup map[string]*InfraSecurityGroup `json:"security-group" yaml:"security-group"` ReadOnlyEC2 map[string]*InfraEC2 `json:"ec2,omitempty" yaml:"ec2,omitempty"` // contains filtered or unexported fields }
type Kind ¶
type Kind string
const ( KindTags Kind = "tags" KindDnsName Kind = "dns-name" KindVpcId Kind = "vpc-id" KindSubnetID Kind = "subnet-id" KindSecurityGroupID Kind = "instance.group-id" KindPrivateDnsName Kind = "private-dns-name" KindIPAddress Kind = "ip-address" KindPrivateIPAddress Kind = "private-ip-address" KindInstanceID Kind = "instance-id" )
type LambdaCreateZipFn ¶
type LambdaCreateZipFn func(infraLambda *InfraLambda) error
type LambdaUpdateZipFn ¶
type LambdaUpdateZipFn func(infraLambda *InfraLambda) error
type LoggerStruct ¶
type LoggerStruct struct { Print func(args ...interface{}) Flush func() // contains filtered or unexported fields }
func (*LoggerStruct) Fatal ¶
func (l *LoggerStruct) Fatal(v ...interface{})
func (*LoggerStruct) Fatalf ¶
func (l *LoggerStruct) Fatalf(format string, v ...interface{})
func (*LoggerStruct) Printf ¶
func (l *LoggerStruct) Printf(format string, v ...interface{})
func (*LoggerStruct) Println ¶
func (l *LoggerStruct) Println(v ...interface{})
type S3BucketDescription ¶
type S3BucketDescription struct { Metrics *s3.MetricsConfiguration Versioning bool Acl *s3.GetBucketAclOutput Cors []*s3.CORSRule Encryption *s3.ServerSideEncryptionConfiguration Lifecycle []*s3.LifecycleRule Region string Logging *s3.LoggingEnabled Notifications *s3.NotificationConfiguration Policy *IamPolicyDocument Replication *s3.ReplicationConfiguration }
func S3GetBucketDescription ¶
func S3GetBucketDescription(ctx context.Context, bucket string) (*S3BucketDescription, error)
type SQSNumMessageOutput ¶
func SQSNumMessages ¶
func SQSNumMessages(ctx context.Context, queueUrl string) (*SQSNumMessageOutput, error)
Click to show internal directories.
Click to hide internal directories.