Documentation ¶
Index ¶
- func CheckValidBucketName(bucketName string) (err error)
- func CheckValidBucketNameStrict(bucketName string) (err error)
- func CheckValidObjectName(objectName string) error
- func CheckValidObjectNamePrefix(objectName string) error
- func EncodePath(pathName string) string
- func GetRegionFromURL(endpointURL url.URL) string
- func IsAmazonEndpoint(endpointURL url.URL) bool
- func IsAmazonFIPSGovCloudEndpoint(endpointURL url.URL) bool
- func IsAmazonGovCloudEndpoint(endpointURL url.URL) bool
- func IsGoogleEndpoint(endpointURL url.URL) bool
- func IsValidDomain(host string) bool
- func IsValidIP(ip string) bool
- func IsVirtualHostSupported(endpointURL url.URL, bucketName string) bool
- func QueryEncode(v url.Values) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckValidBucketName ¶
CheckValidBucketName - checks if we have a valid input bucket name.
func CheckValidBucketNameStrict ¶
CheckValidBucketNameStrict - checks if we have a valid input bucket name. This is a stricter version. - http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html
func CheckValidObjectName ¶
CheckValidObjectName - checks if we have a valid input object name.
func CheckValidObjectNamePrefix ¶
CheckValidObjectNamePrefix - checks if we have a valid input object name prefix.
func EncodePath ¶
EncodePath encode the strings from UTF-8 byte representations to HTML hex escape sequences
This is necessary since regular url.Parse() and url.Encode() functions do not support UTF-8 non english characters cannot be parsed due to the nature in which url.Encode() is written
This function on the other hand is a direct replacement for url.Encode() technique to support pretty much every UTF-8 character.
func GetRegionFromURL ¶
GetRegionFromURL - returns a region from url host.
func IsAmazonEndpoint ¶
IsAmazonEndpoint - Match if it is exactly Amazon S3 endpoint.
func IsAmazonFIPSGovCloudEndpoint ¶
IsAmazonFIPSGovCloudEndpoint - Match if it is exactly Amazon S3 FIPS GovCloud endpoint.
func IsAmazonGovCloudEndpoint ¶
IsAmazonGovCloudEndpoint - Match if it is exactly Amazon S3 GovCloud endpoint.
func IsGoogleEndpoint ¶
IsGoogleEndpoint - Match if it is exactly Google cloud storage endpoint.
func IsValidDomain ¶
IsValidDomain validates if input string is a valid domain name.
func IsVirtualHostSupported ¶
IsVirtualHostSupported - verifies if bucketName can be part of virtual host. Currently only Amazon S3 and Google Cloud Storage would support this.
func QueryEncode ¶
QueryEncode - encodes query values in their URL encoded form. In addition to the percent encoding performed by urlEncodePath() used here, it also percent encodes '/' (forward slash)
Types ¶
This section is empty.