Documentation
¶
Index ¶
- Constants
- func InRange(s string, minVal, maxVal int) bool
- func IsAlphanumeric(s string) bool
- func IsAlphanumericWithHyphens(s string) bool
- func ValidateAccessKey(accessKey string) error
- func ValidateBucketName(name string) error
- func ValidateObjectKey(key string) error
- func ValidatePolicyDocument(doc *iam.PolicyDocument) error
- func ValidatePolicyName(name string) error
- func ValidateSecretKey(secretKey string) error
- func ValidateStatus(status iam.UserStatus) error
Constants ¶
const ( MinBucketNameLength = 3 MaxBucketNameLength = 63 )
const ( MinPolicyNameLength = 1 MaxPolicyNameLength = 128 RequiredVersion = "2012-10-17" )
const ( MinAccessKeyLength = 3 // AWS IAM and MinIO allow short usernames like "bob" MaxAccessKeyLength = 20 MinSecretKeyLength = 8 )
const (
MaxObjectKeyLength = 1024 // bytes
)
Variables ¶
This section is empty.
Functions ¶
func IsAlphanumeric ¶
IsAlphanumeric checks if a string contains only alphanumeric characters
func IsAlphanumericWithHyphens ¶
IsAlphanumericWithHyphens checks if a string contains only alphanumeric characters and hyphens
func ValidateAccessKey ¶
ValidateAccessKey validates an access key
func ValidateBucketName ¶
ValidateBucketName validates an S3 bucket name according to AWS S3 naming rules See: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
func ValidateObjectKey ¶
ValidateObjectKey validates an S3 object key according to AWS S3 naming rules See: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
func ValidatePolicyDocument ¶
func ValidatePolicyDocument(doc *iam.PolicyDocument) error
ValidatePolicyDocument validates a policy document
func ValidatePolicyName ¶
ValidatePolicyName validates a policy name
func ValidateSecretKey ¶
ValidateSecretKey validates a secret key
func ValidateStatus ¶
func ValidateStatus(status iam.UserStatus) error
ValidateStatus validates a user status
Types ¶
This section is empty.