lib

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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 AESDecrypt(cryptData, key []byte) ([]byte, error)

func AESDecryptHexStringToOrigin

func AESDecryptHexStringToOrigin(hexStr string, key []byte) (string, error)

func AESEncrypt

func AESEncrypt(data, key []byte) ([]byte, error)

func AESEncryptToHexString

func AESEncryptToHexString(data, key []byte) (string, error)

func GenTestObjectUrl

func GenTestObjectUrl(sc *S3Client) string

func GenTestSpecialCharaterObjectUrl added in v1.2.2

func GenTestSpecialCharaterObjectUrl(sc *S3Client) string

func HTTPRequestToGetObject

func HTTPRequestToGetObject(url string) (status int, val []byte, err error)

func TransferToS3AccessControlPolicy

func TransferToS3AccessControlPolicy(policy *datatype.AccessControlPolicy) (s3policy *s3.AccessControlPolicy)

Types

type S3Client

type S3Client struct {
	Client *s3.S3
}

func NewS3

func NewS3() *S3Client

func NewS3Internal added in v1.2.2

func NewS3Internal() *S3Client

func (*S3Client) AppendObject added in v1.2.1

func (s3client *S3Client) AppendObject(bucketName, key, value string, position int64) (nextPos int64, err error)

func (*S3Client) DeleteBucket

func (s3client *S3Client) DeleteBucket(bucketName string) (err error)

func (*S3Client) DeleteBucketPolicy

func (s3client *S3Client) DeleteBucketPolicy(bucketName string) (err error)

func (*S3Client) DeleteObject

func (s3client *S3Client) DeleteObject(bucketName, key string) (err error)

func (*S3Client) GetBucketAcl

func (s3client *S3Client) GetBucketAcl(bucketName string) (ret string, err error)

func (*S3Client) GetBucketPolicy

func (s3client *S3Client) GetBucketPolicy(bucketName string) (policy string, err error)

func (*S3Client) GetEncryptObjectWithSSEC

func (s3client *S3Client) GetEncryptObjectWithSSEC(bucketName, key string) (value string, err error)

func (*S3Client) GetEncryptObjectWithSSES3

func (s3client *S3Client) GetEncryptObjectWithSSES3(bucketName, key string) (value string, err error)

func (*S3Client) GetObject

func (s3client *S3Client) GetObject(bucketName, key string) (value string, err error)

func (*S3Client) GetObjectAcl

func (s3client *S3Client) GetObjectAcl(bucketName, objName string) (ret string, err error)

func (*S3Client) GetObjectPreSigned

func (s3client *S3Client) GetObjectPreSigned(bucketName, key string, expire time.Duration) (url string, err error)

func (*S3Client) HeadBucket

func (s3client *S3Client) HeadBucket(bucketName string) (err error)

func (*S3Client) HeadObject

func (s3client *S3Client) HeadObject(bucketName, key string) (err error)

func (*S3Client) MakeBucket

func (s3client *S3Client) MakeBucket(bucketName string) (err error)

func (*S3Client) PutBucketAcl

func (s3client *S3Client) PutBucketAcl(bucketName string, acl string) (err error)

func (*S3Client) PutBucketAclWithXml

func (s3client *S3Client) PutBucketAclWithXml(bucketName string, acl *s3.AccessControlPolicy) (err error)

func (*S3Client) PutBucketPolicy

func (s3client *S3Client) PutBucketPolicy(bucketName, policy string) (err error)

func (*S3Client) PutEncryptObjectWithSSEC

func (s3client *S3Client) PutEncryptObjectWithSSEC(bucketName, key, value string) (err error)

func (*S3Client) PutEncryptObjectWithSSES3

func (s3client *S3Client) PutEncryptObjectWithSSES3(bucketName, key, value string) (err error)

func (*S3Client) PutObject

func (s3client *S3Client) PutObject(bucketName, key, value string) (err error)

func (*S3Client) PutObjectAcl

func (s3client *S3Client) PutObjectAcl(bucketName, objName string, acl string) (err error)

func (*S3Client) PutObjectAclWithXml

func (s3client *S3Client) PutObjectAclWithXml(bucketName, objName string, acl *s3.AccessControlPolicy) (err error)

func (*S3Client) PutObjectPreSignedWithSpecifiedBody

func (s3client *S3Client) PutObjectPreSignedWithSpecifiedBody(bucketName, key, value string, expire time.Duration) (url string, err error)

func (*S3Client) PutObjectPreSignedWithoutSpecifiedBody

func (s3client *S3Client) PutObjectPreSignedWithoutSpecifiedBody(bucketName, key, value string, expire time.Duration) (url string, err error)

Jump to

Keyboard shortcuts

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