Documentation ¶
Index ¶
- Constants
- func AESDecrypt(cryptData, key []byte) ([]byte, error)
- func AESDecryptHexStringToOrigin(hexStr string, key []byte) (string, error)
- func AESEncrypt(data, key []byte) ([]byte, error)
- func AESEncryptToHexString(data, key []byte) (string, error)
- func GenTestObjectUrl(sc *S3Client) string
- func GenTestSpecialCharaterObjectUrl(sc *S3Client) string
- func HTTPRequestToGetObject(url string) (status int, val []byte, err error)
- func TransferToS3AccessControlPolicy(policy *datatype.AccessControlPolicy) (s3policy *s3.AccessControlPolicy)
- type S3Client
- func (s3client *S3Client) AppendObject(bucketName, key, value string, position int64) (nextPos int64, err error)
- func (s3client *S3Client) DeleteBucket(bucketName string) (err error)
- func (s3client *S3Client) DeleteBucketPolicy(bucketName string) (err error)
- func (s3client *S3Client) DeleteObject(bucketName, key string) (err error)
- func (s3client *S3Client) GetBucketAcl(bucketName string) (ret string, err error)
- func (s3client *S3Client) GetBucketPolicy(bucketName string) (policy string, err error)
- func (s3client *S3Client) GetEncryptObjectWithSSEC(bucketName, key string) (value string, err error)
- func (s3client *S3Client) GetEncryptObjectWithSSES3(bucketName, key string) (value string, err error)
- func (s3client *S3Client) GetObject(bucketName, key string) (value string, err error)
- func (s3client *S3Client) GetObjectAcl(bucketName, objName string) (ret string, err error)
- func (s3client *S3Client) GetObjectPreSigned(bucketName, key string, expire time.Duration) (url string, err error)
- func (s3client *S3Client) HeadBucket(bucketName string) (err error)
- func (s3client *S3Client) HeadObject(bucketName, key string) (err error)
- func (s3client *S3Client) MakeBucket(bucketName string) (err error)
- func (s3client *S3Client) PutBucketAcl(bucketName string, acl string) (err error)
- func (s3client *S3Client) PutBucketAclWithXml(bucketName string, acl *s3.AccessControlPolicy) (err error)
- func (s3client *S3Client) PutBucketPolicy(bucketName, policy string) (err error)
- func (s3client *S3Client) PutEncryptObjectWithSSEC(bucketName, key, value string) (err error)
- func (s3client *S3Client) PutEncryptObjectWithSSES3(bucketName, key, value string) (err error)
- func (s3client *S3Client) PutObject(bucketName, key, value string) (err error)
- func (s3client *S3Client) PutObjectAcl(bucketName, objName string, acl string) (err error)
- func (s3client *S3Client) PutObjectAclWithXml(bucketName, objName string, acl *s3.AccessControlPolicy) (err error)
- func (s3client *S3Client) PutObjectPreSignedWithSpecifiedBody(bucketName, key, value string, expire time.Duration) (url string, err error)
- func (s3client *S3Client) PutObjectPreSignedWithoutSpecifiedBody(bucketName, key, value string, expire time.Duration) (url string, err error)
Constants ¶
View Source
const ( // BucketCannedACLPrivate is a BucketCannedACL enum value BucketCannedACLPrivate = "private" // BucketCannedACLPublicRead is a BucketCannedACL enum value BucketCannedACLPublicRead = "public-read" // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value BucketCannedACLPublicReadWrite = "public-read-write" // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value BucketCannedACLAuthenticatedRead = "authenticated-read" // ObjectCannedACLPrivate is a ObjectCannedACL enum value ObjectCannedACLPrivate = "private" // ObjectCannedACLPublicRead is a ObjectCannedACL enum value ObjectCannedACLPublicRead = "public-read" // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value ObjectCannedACLPublicReadWrite = "public-read-write" // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value ObjectCannedACLAuthenticatedRead = "authenticated-read" // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value ObjectCannedACLAwsExecRead = "aws-exec-read" // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value ObjectCannedACLBucketOwnerRead = "bucket-owner-read" // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control" )
View Source
const ( TEST_BUCKET = "mybucket" TEST_KEY = "testput" TEST_KEY_SPECIAL = "testputspecial:!@$%^&*()_+=-;?><| " TEST_VALUE = "valueput" )
Variables ¶
This section is empty.
Functions ¶
func AESDecrypt ¶
func AESEncrypt ¶
func AESEncryptToHexString ¶
func GenTestObjectUrl ¶
func GenTestSpecialCharaterObjectUrl ¶ added in v1.2.2
func HTTPRequestToGetObject ¶
func TransferToS3AccessControlPolicy ¶
func TransferToS3AccessControlPolicy(policy *datatype.AccessControlPolicy) (s3policy *s3.AccessControlPolicy)
Types ¶
type S3Client ¶
func NewS3Internal ¶ added in v1.2.2
func NewS3Internal() *S3Client
func (*S3Client) AppendObject ¶ added in v1.2.1
func (*S3Client) DeleteBucket ¶
func (*S3Client) DeleteBucketPolicy ¶
func (*S3Client) DeleteObject ¶
func (*S3Client) GetBucketAcl ¶
func (*S3Client) GetBucketPolicy ¶
func (*S3Client) GetEncryptObjectWithSSEC ¶
func (*S3Client) GetEncryptObjectWithSSES3 ¶
func (*S3Client) GetObjectAcl ¶
func (*S3Client) GetObjectPreSigned ¶
func (*S3Client) HeadBucket ¶
func (*S3Client) HeadObject ¶
func (*S3Client) MakeBucket ¶
func (*S3Client) PutBucketAcl ¶
func (*S3Client) PutBucketAclWithXml ¶
func (s3client *S3Client) PutBucketAclWithXml(bucketName string, acl *s3.AccessControlPolicy) (err error)
func (*S3Client) PutBucketPolicy ¶
func (*S3Client) PutEncryptObjectWithSSEC ¶
func (*S3Client) PutEncryptObjectWithSSES3 ¶
func (*S3Client) PutObjectAcl ¶
func (*S3Client) PutObjectAclWithXml ¶
func (s3client *S3Client) PutObjectAclWithXml(bucketName, objName string, acl *s3.AccessControlPolicy) (err error)
func (*S3Client) PutObjectPreSignedWithSpecifiedBody ¶
Click to show internal directories.
Click to hide internal directories.