validation

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MinBucketNameLength = 3
	MaxBucketNameLength = 63
)
View Source
const (
	MinPolicyNameLength = 1
	MaxPolicyNameLength = 128
	RequiredVersion     = "2012-10-17"
)
View Source
const (
	MinAccessKeyLength = 3 // AWS IAM and MinIO allow short usernames like "bob"
	MaxAccessKeyLength = 20
	MinSecretKeyLength = 8
)
View Source
const (
	MaxObjectKeyLength = 1024 // bytes
)

Variables

This section is empty.

Functions

func InRange

func InRange(s string, minVal, maxVal int) bool

InRange checks if a string length is within the specified range

func IsAlphanumeric

func IsAlphanumeric(s string) bool

IsAlphanumeric checks if a string contains only alphanumeric characters

func IsAlphanumericWithHyphens

func IsAlphanumericWithHyphens(s string) bool

IsAlphanumericWithHyphens checks if a string contains only alphanumeric characters and hyphens

func ValidateAccessKey

func ValidateAccessKey(accessKey string) error

ValidateAccessKey validates an access key

func ValidateBucketName

func ValidateBucketName(name string) error

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

func ValidateObjectKey(key string) error

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

func ValidatePolicyName(name string) error

ValidatePolicyName validates a policy name

func ValidateSecretKey

func ValidateSecretKey(secretKey string) error

ValidateSecretKey validates a secret key

func ValidateStatus

func ValidateStatus(status iam.UserStatus) error

ValidateStatus validates a user status

Types

This section is empty.

Jump to

Keyboard shortcuts

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