Documentation
¶
Index ¶
- Constants
- Variables
- func AcmClient() *acm.Client
- func AcmClientExplicit(accessKeyID, accessKeySecret, region string) *acm.Client
- func AcmListCertificates(ctx context.Context) ([]acmtypes.CertificateSummary, error)
- func Api(ctx context.Context, name string) (*apitypes.Api, error)
- func ApiClient() *apigatewayv2.Client
- func ApiClientExplicit(accessKeyID, accessKeySecret, region string) *apigatewayv2.Client
- func ApiList(ctx context.Context) ([]apitypes.Api, error)
- func ApiListDomains(ctx context.Context) ([]apitypes.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 CloudwatchClient() *cloudwatch.Client
- func CloudwatchClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatch.Client
- func CloudwatchEnsureAlarm(ctx context.Context, name string) error
- func CloudwatchGetMetricData(ctx context.Context, period int, stat string, fromTime, toTime *time.Time, ...) ([]cwtypes.MetricDataResult, error)
- func CloudwatchListMetrics(ctx context.Context, namespace, metric *string) ([]cwtypes.Metric, error)
- func CodeCommitClient() *codecommit.Client
- func CodeCommitClientExplicit(accessKeyID, accessKeySecret, region string) *codecommit.Client
- func CodeCommitListRepos(ctx context.Context) ([]codecommittypes.RepositoryNameIdPair, error)
- func CostExplorerClient() *costexplorer.Client
- func CostExplorerClientExplicit(accessKeyID, accessKeySecret, region string) *costexplorer.Client
- func DropLinesWithAny(s string, tokens ...string) string
- func DynamoDBArn(ctx context.Context, tableName string) (string, error)
- func DynamoDBClient() *dynamodb.Client
- func DynamoDBClientExplicit(accessKeyID, accessKeySecret, region string) *dynamodb.Client
- func DynamoDBDeleteTable(ctx context.Context, tableName string, preview bool) error
- func DynamoDBEnsure(ctx context.Context, input *dynamodb.CreateTableInput, ...) error
- func DynamoDBEnsureInput(infraSetName, tableName string, keys []string, attrs []string) (*dynamodb.CreateTableInput, *ddbtypes.TimeToLiveSpecification, 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) ([]ddbtypes.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.Client
- func EC2ClientExplicit(accessKeyID, accessKeySecret, region string) *ec2.Client
- 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) ([]ec2types.Instance, error)
- func EC2DescribeSpotFleet(ctx context.Context, spotFleetRequestId *string) (*ec2types.SpotFleetRequestConfig, error)
- func EC2DescribeSpotFleetActiveInstances(ctx context.Context, spotFleetRequestId *string) ([]ec2types.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 []ec2types.Tag, key string, defaultValue string) string
- func EC2GoSsh(ctx context.Context, input *EC2GoSshInput) ([]*ec2GoSshResult, error)
- func EC2Kind(instance ec2types.Instance) string
- func EC2ListInstances(ctx context.Context, selectors []string, state ec2types.InstanceStateName) ([]ec2types.Instance, error)
- func EC2ListSgs(ctx context.Context) ([]ec2types.SecurityGroup, error)
- func EC2Name(tags []ec2types.Tag) string
- func EC2NameColored(instance ec2types.Instance) string
- func EC2NewAmi(ctx context.Context, input *EC2NewAmiInput) (string, error)
- func EC2NewInstances(ctx context.Context, config *EC2Config) ([]ec2types.Instance, error)
- func EC2RequestSpotFleet(ctx context.Context, spotStrategy ec2types.AllocationStrategy, ...) ([]ec2types.Instance, error)
- func EC2Rsync(ctx context.Context, input *EC2RsyncInput) ([]*ec2SshResult, error)
- func EC2Scp(ctx context.Context, input *EC2ScpInput) ([]*ec2SshResult, error)
- func EC2SecurityGroups(sgs []ec2types.GroupIdentifier) string
- func EC2SgID(ctx context.Context, vpcName, sgName string) (string, error)
- func EC2Ssh(ctx context.Context, input *EC2SshInput) ([]*ec2SshResult, error)
- func EC2SshLogin(instance ec2types.Instance, user, key string) error
- func EC2Tags(tags []ec2types.Tag) string
- func EC2TagsAll(tags []ec2types.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 ec2types.InstanceStateName) error
- func EC2ZonesWithInstance(ctx context.Context, instanceType ec2types.InstanceType) (zones []string, err error)
- func ECSClient() *ecs.Client
- func ECSClientExplicit(accessKeyID, accessKeySecret, region string) *ecs.Client
- func EcrClient() *ecr.Client
- func EcrClientExplicit(accessKeyID, accessKeySecret, region string) *ecr.Client
- func EcrDescribeRepos(ctx context.Context) ([]ecrtypes.Repository, error)
- func EcrEnsure(ctx context.Context, name string, preview bool) error
- func EcrUrl(ctx context.Context) (string, error)
- func EventsClient() *eventbridge.Client
- func EventsClientExplicit(accessKeyID, accessKeySecret, region string) *eventbridge.Client
- func EventsListBuses(ctx context.Context) ([]eventbridgetypes.EventBus, error)
- func EventsListRuleTargets(ctx context.Context, ruleName string, busName *string) ([]eventbridgetypes.Target, error)
- func EventsListRules(ctx context.Context, busName *string) ([]eventbridgetypes.Rule, error)
- func Exists(path string) bool
- func FromDynamoDBEventAV(from events.DynamoDBAttributeValue) (ddbtypes.AttributeValue, error)
- func FromDynamoDBEventAVList(from []events.DynamoDBAttributeValue) (to []ddbtypes.AttributeValue, err error)
- func FromDynamoDBEventAVMap(from map[string]events.DynamoDBAttributeValue) (to map[string]ddbtypes.AttributeValue, err error)
- func FromUnixMilli(msec int64) time.Time
- func IamClient() *iam.Client
- func IamClientExplicit(accessKeyID, accessKeySecret, region string) *iam.Client
- 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) (*iamtypes.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) (*iamtypes.SSHPublicKey, error)
- func IamInstanceProfileArn(ctx context.Context, profileName string) (string, error)
- func IamListPolicies(ctx context.Context) ([]iamtypes.Policy, error)
- func IamListRolePolicies(ctx context.Context, roleName string) ([]iamtypes.AttachedPolicy, error)
- func IamListSSHPublicKeys(ctx context.Context) ([]iamtypes.SSHPublicKeyMetadata, error)
- func IamListUserPolicies(ctx context.Context, username string) ([]*iamtypes.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 any) string
- func LambdaArn(ctx context.Context, name string) (string, error)
- func LambdaArnToLambdaName(arn string) string
- func LambdaClient() *lambda.Client
- func LambdaClientExplicit(accessKeyID, accessKeySecret, region string) *lambda.Client
- 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 LambdaEnsureTriggerSes(ctx context.Context, infraLambda *InfraLambda, preview bool) (string, error)
- func LambdaIncludeInZip(infraLambda *InfraLambda) error
- func LambdaListFunctions(ctx context.Context) ([]lambdatypes.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[T any](xs []T) T
- func LogsClient() *cloudwatchlogs.Client
- func LogsClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatchlogs.Client
- 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) ([]cwlogstypes.LogGroup, error)
- func LogsMostRecentStreams(ctx context.Context, name string) ([]cwlogstypes.LogStream, error)
- func LogsStreams(ctx context.Context, name string) ([]cwlogstypes.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.Client
- func OrganizationsClientExplicit(accessKeyID, accessKeySecret, region string) *organizations.Client
- func OrganizationsEnsure(ctx context.Context, name, email string, preview bool) (string, error)
- func Pformat(i any) string
- func PformatAlways(i any) string
- func PreviewString(preview bool) string
- func Region() string
- func Regions() ([]string, error)
- func Retry(ctx context.Context, fn func() error) error
- func RetryAttempts(ctx context.Context, attempts int, fn func() error) error
- func Route53Client() *route53.Client
- func Route53ClientExplicit(accessKeyID, accessKeySecret, region string) *route53.Client
- 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) ([]r53types.ResourceRecordSet, error)
- func Route53ListZones(ctx context.Context) ([]r53types.HostedZone, error)
- func Route53ZoneID(ctx context.Context, name string) (string, error)
- func S3BucketRegion(bucket string) (string, error)
- func S3Client() *s3.Client
- func S3ClientBucketRegion(bucket string) (*s3.Client, error)
- func S3ClientBucketRegionMust(bucket string) *s3.Client
- func S3ClientExplicit(accessKeyID, accessKeySecret, region string) *s3.Client
- func S3ClientRegion(region string) (*s3.Client, error)
- func S3ClientRegionMust(region string) *s3.Client
- 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.Client
- func SNSClientExplicit(accessKeyID, accessKeySecret, region string) *sns.Client
- func SNSEnsure(ctx context.Context, name string, preview bool) error
- func SNSListSubscriptions(ctx context.Context, topicArn string) ([]snstypes.Subscription, error)
- func SQSArn(ctx context.Context, name string) (string, error)
- func SQSArnToName(arn string) string
- func SQSClient() *sqs.Client
- func SQSClientExplicit(accessKeyID, accessKeySecret, region string) *sqs.Client
- 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.Client
- func STSClientExplicit(accessKeyID, accessKeySecret, region string) *sts.Client
- func SesClient() *sesv2.Client
- func SesClientExplicit(accessKeyID, accessKeySecret, region string) *sesv2.Client
- func SesEnsureReceiptRuleset(ctx context.Context, domain string, bucket string, prefix string, ...) (string, error)
- func SesListReceiptRulesets(ctx context.Context) ([]sestypes.ReceiptRuleSetMetadata, error)
- func SesRmReceiptRuleset(ctx context.Context, domain string, preview bool) error
- func Session() *aws.Config
- func SessionExplicit(accessKeyID, accessKeySecret, region string) *aws.Config
- func SessionRegion(region string) (*aws.Config, 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) ([]ec2types.Vpc, error)
- func VpcListSubnets(ctx context.Context, vpcID string) ([]ec2types.Subnet, error)
- func VpcRm(ctx context.Context, name string, preview bool) error
- func VpcSubnets(ctx context.Context, vpcID string) ([]ec2types.Subnet, error)
- func Zones(ctx context.Context) ([]ec2types.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" )
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 = map[string]ArgsStruct{}
View Source
var Commands = make(map[string]func())
Functions ¶
func AcmClientExplicit ¶
func AcmListCertificates ¶
func AcmListCertificates(ctx context.Context) ([]acmtypes.CertificateSummary, error)
func ApiClient ¶
func ApiClient() *apigatewayv2.Client
func ApiClientExplicit ¶
func ApiClientExplicit(accessKeyID, accessKeySecret, region string) *apigatewayv2.Client
func ApiListDomains ¶
func ApiListDomains(ctx context.Context) ([]apitypes.DomainName, error)
func ApiWebsocketClose ¶
func ApiWebsocketSend ¶
func ArnToInfraName ¶
func CloudwatchClient ¶
func CloudwatchClient() *cloudwatch.Client
func CloudwatchClientExplicit ¶
func CloudwatchClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatch.Client
func CloudwatchGetMetricData ¶
func CloudwatchListMetrics ¶
func CodeCommitClient ¶
func CodeCommitClient() *codecommit.Client
func CodeCommitClientExplicit ¶
func CodeCommitClientExplicit(accessKeyID, accessKeySecret, region string) *codecommit.Client
func CodeCommitListRepos ¶
func CodeCommitListRepos(ctx context.Context) ([]codecommittypes.RepositoryNameIdPair, error)
func CostExplorerClient ¶
func CostExplorerClient() *costexplorer.Client
func CostExplorerClientExplicit ¶
func CostExplorerClientExplicit(accessKeyID, accessKeySecret, region string) *costexplorer.Client
func DropLinesWithAny ¶
func DynamoDBClient ¶
func DynamoDBClientExplicit ¶
func DynamoDBDeleteTable ¶
func DynamoDBEnsure ¶
func DynamoDBEnsure(ctx context.Context, input *dynamodb.CreateTableInput, ttl *ddbtypes.TimeToLiveSpecification, preview bool) error
func DynamoDBEnsureInput ¶
func DynamoDBEnsureInput(infraSetName, tableName string, keys []string, attrs []string) (*dynamodb.CreateTableInput, *ddbtypes.TimeToLiveSpecification, error)
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) ([]ec2types.SecurityGroup, error)
func EC2NameColored ¶
func EC2NewInstances ¶
func EC2RequestSpotFleet ¶
func EC2SecurityGroups ¶
func EC2SecurityGroups(sgs []ec2types.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) ([]ecrtypes.Repository, error)
func EventsClient ¶
func EventsClient() *eventbridge.Client
func EventsClientExplicit ¶
func EventsClientExplicit(accessKeyID, accessKeySecret, region string) *eventbridge.Client
func EventsListBuses ¶
func EventsListBuses(ctx context.Context) ([]eventbridgetypes.EventBus, error)
func EventsListRuleTargets ¶
func EventsListRules ¶
func FromDynamoDBEventAV ¶
func FromDynamoDBEventAV(from events.DynamoDBAttributeValue) (ddbtypes.AttributeValue, error)
func FromDynamoDBEventAVList ¶
func FromDynamoDBEventAVList(from []events.DynamoDBAttributeValue) (to []ddbtypes.AttributeValue, err error)
func FromDynamoDBEventAVMap ¶
func FromDynamoDBEventAVMap(from map[string]events.DynamoDBAttributeValue) (to map[string]ddbtypes.AttributeValue, err error)
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) ([]iamtypes.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 LambdaEnsureTriggerSes ¶
func LambdaIncludeInZip ¶
func LambdaIncludeInZip(infraLambda *InfraLambda) error
func LambdaListFunctions ¶
func LambdaListFunctions(ctx context.Context) ([]lambdatypes.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.Client
func LogsClientExplicit ¶
func LogsClientExplicit(accessKeyID, accessKeySecret, region string) *cloudwatchlogs.Client
func LogsEnsureGroup ¶
func LogsListLogGroups ¶
func LogsListLogGroups(ctx context.Context) ([]cwlogstypes.LogGroup, error)
func LogsMostRecentStreams ¶
func LogsStreams ¶
func NowUnixMilli ¶
func NowUnixMilli() int64
func OrganizationsClient ¶
func OrganizationsClient() *organizations.Client
func OrganizationsClientExplicit ¶
func OrganizationsClientExplicit(accessKeyID, accessKeySecret, region string) *organizations.Client
func OrganizationsEnsure ¶
func PformatAlways ¶
func PreviewString ¶
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) ([]r53types.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 SesClientExplicit ¶
func SesEnsureReceiptRuleset ¶
func SesListReceiptRulesets ¶
func SesListReceiptRulesets(ctx context.Context) ([]sestypes.ReceiptRuleSetMetadata, error)
func SesRmReceiptRuleset ¶
func SessionExplicit ¶
func SignalHandler ¶
func SignalHandler(cancel func())
func SplitWhiteSpace ¶
func SplitWhiteSpaceN ¶
func SshKeygenEd25519 ¶
func SshKeygenRsa ¶
func StringSlice ¶
func ToUnixMilli ¶
func VpcListSubnets ¶
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 cwtypes.ComparisonOperator `json:",omitempty"` DatapointsToAlarm *int32 `json:",omitempty"` Dimensions []cwtypes.Dimension `json:",omitempty"` EvaluateLowSampleCountPercentile *string `json:",omitempty"` EvaluationPeriods *int32 `json:",omitempty"` ExtendedStatistic *string `json:",omitempty"` InsufficientDataActions []string `json:",omitempty"` MetricName *string `json:",omitempty"` Metrics []cwtypes.MetricDataQuery `json:",omitempty"` Namespace *string `json:",omitempty"` OKActions []string `json:",omitempty"` Period *int32 `json:",omitempty"` StateValue cwtypes.StateValue `json:",omitempty"` Statistic cwtypes.Statistic `json:",omitempty"` Threshold *float64 `json:",omitempty"` ThresholdMetricId *string `json:",omitempty"` TreatMissingData *string `json:",omitempty"` Unit cwtypes.StandardUnit `json:",omitempty"` // contains filtered or unexported fields }
func CloudwatchListAlarms ¶
func CloudwatchListAlarms(ctx context.Context) ([]*CloudwatchAlarm, error)
func (*CloudwatchAlarm) FromAlarm ¶
func (a *CloudwatchAlarm) FromAlarm(alarm *cwtypes.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 ec2types.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 *iamtypes.InstanceProfile) error
type IamPolicy ¶
type IamPolicy struct { Arn *string `json:",omitempty"` AttachmentCount *int32 `json:",omitempty"` CreateDate *time.Time `json:",omitempty"` DefaultVersionId *string `json:",omitempty"` Description *string `json:",omitempty"` IsAttachable *bool `json:",omitempty"` Path *string `json:",omitempty"` PermissionsBoundaryUsageCount *int32 `json:",omitempty"` PolicyId *string `json:",omitempty"` PolicyName *string `json:",omitempty"` Tags []iamtypes.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 *iamtypes.AttachedPermissionsBoundary `json:",omitempty" yaml:",omitempty"` RoleLastUsed *iamtypes.RoleLastUsed `json:",omitempty" yaml:",omitempty"` RoleName *string `json:",omitempty" yaml:",omitempty"` Tags []iamtypes.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 IamStatementEntryCondition ¶
type IamStatementEntryCondition struct { Sid string Effect string `json:",omitempty" yaml:",omitempty"` Resource any `json:",omitempty" yaml:",omitempty"` Principal any `json:",omitempty" yaml:",omitempty"` Action any `json:",omitempty" yaml:",omitempty"` Condition any `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 ...any) Flush func() // contains filtered or unexported fields }
func (*LoggerStruct) Fatal ¶
func (l *LoggerStruct) Fatal(v ...any)
func (*LoggerStruct) Fatalf ¶
func (l *LoggerStruct) Fatalf(format string, v ...any)
func (*LoggerStruct) Printf ¶
func (l *LoggerStruct) Printf(format string, v ...any)
func (*LoggerStruct) Println ¶
func (l *LoggerStruct) Println(v ...any)
type S3BucketDescription ¶
type S3BucketDescription struct { Metrics *s3types.MetricsConfiguration Versioning bool Acl *s3.GetBucketAclOutput Cors []s3types.CORSRule Encryption *s3types.ServerSideEncryptionConfiguration Lifecycle []s3types.LifecycleRule Region string Logging *s3types.LoggingEnabled Notifications *s3.GetBucketNotificationConfigurationOutput Policy *IamPolicyDocument Replication *s3types.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.