Documentation ¶
Index ¶
- Constants
- func AwsConfigFromCredentials(accessKeyId string, secretAccessKey string, sessionToken string, ...) aws.Config
- func CoalesceErr(args ...error) error
- func CustomUserAgentApiOptions(uniqueCorrelationId uuid.UUID) config.LoadOptionsFunc
- func DownloadAllObjects(client *s3.Client, bucketName string) error
- func FileExists(path string) bool
- func GetCurrentAccountId(cfg aws.Config) (string, error)
- func IndexOf[T comparable](slice []T, searchValue T) int
- func IsErrorDueToEBSEncryptionByDefault(err error) bool
- func ListAllObjectVersions(s3Client *s3.Client, bucketName string) ([]s3types.ObjectIdentifier, error)
- func MD5HashBase64(text string) string
- func Min(a int, b int) int
- func RandomHexString(length int) string
- func RandomString(length int) string
- func Remove(slice []string, index int) []string
- func SHA256Hash(input string) string
- func UploadFile(s3Client *s3.Client, bucketName string, filename string, contents io.Reader) error
- func WaitForAndAssumeAWSRole(awsConnection *aws.Config, roleArn string) error
- func WaitForInstanceToRegisterInSSM(ssmClient *ssm.Client, instanceId string) error
- func WaitForInstancesToRegisterInSSM(ssmClient *ssm.Client, instanceIds []string) error
Constants ¶
View Source
const AttackerEmailEnvVarKey = "STRATUS_RED_TEAM_ATTACKER_EMAIL"
Variables ¶
This section is empty.
Functions ¶
func CoalesceErr ¶
func CustomUserAgentApiOptions ¶ added in v2.17.0
func CustomUserAgentApiOptions(uniqueCorrelationId uuid.UUID) config.LoadOptionsFunc
func DownloadAllObjects ¶ added in v2.9.0
func FileExists ¶
func IndexOf ¶ added in v2.7.0
func IndexOf[T comparable](slice []T, searchValue T) int
IndexOf returns the index of a given value in a slice, or -1 if not found
func ListAllObjectVersions ¶ added in v2.9.0
func MD5HashBase64 ¶ added in v2.9.0
func Min ¶
The Min function returns the smallest of two integers Note: math.Min only works for float64
func RandomHexString ¶
func RandomString ¶
func SHA256Hash ¶ added in v2.18.0
func UploadFile ¶ added in v2.9.0
func WaitForAndAssumeAWSRole ¶ added in v2.5.6
WaitForAndAssumeAWSRole waits for an AWS role to be assumable (due to eventual consistency) then sets a credentials provider that can be used to assume the role.
func WaitForInstanceToRegisterInSSM ¶ added in v2.14.0
utility function for a single instance
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.