# README

aws-sdk-go-v2-wrapper | S3

Quick Usage

import (
	"context"

	"github.com/evalphobia/aws-sdk-go-v2-wrapper/config"
	"github.com/evalphobia/aws-sdk-go-v2-wrapper/s3"
)

func main() {
	svc, err := s3.New(config.Config{
		AccessKey: "<...>",
		SecretKey: "<...>",
	})
	if err != nil {
		panic(err)
	}

	ctx := context.Background()
	has, err := svc.XExistObject(ctx, "my-bucket", "users/101/data")
	if err != nil {
		panic(err)
	}
	if !has {
		panic("cannot find the data")
	}

	result, err := svc.XGetObjectFromPath(ctx, "my-bucket", "users/101/data")
	if err != nil {
		panic(err)
	}
	if !result.Exists {
		panic("cannot find the data")
	}

	byt, err := fresult.ToBytes()
	if err != nil {
		panic(err)
	}
	fmt.Printf("[my-bucket/users/101/data] has %d bytes", len(byt))

	presignedURL, err := svc.XGetPresignURL(ctx, "my-bucket", "users/101/data", 10 * time.Minute)
	if err != nil {
		panic(err)
	}
	fmt.Printf("Download here: %s (this link expires after 10 minutes)", presignedURL)
	// ...
}

X API

NameDescription
XCreateBucketFromNamecreates a bucket.
XDeleteBucketFromNamedeletes a bucket.
XDeleteAllObjectsdeletes all of objects in the bucket.
XDeleteObjectFromPathdeletes an object.
XExistBucketchecks if the bucket already exists or not.
XExistObjectchecks if the object exists or not.
XGetObjectFromPathgets an object.
XGetPresignURLgets an presigned url of the object for GET.
XPutObjectToPathputs an object to the path and bytes data.

# Functions

New returns initialized *S3.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
CopyObjectRequest has parameters for `CopyObject` operation.
CopyObjectResult contains results from `CopyObject` operation.
CreateBucketRequest has parameters for `CreateBucket` operation.
CreateBucketResult contains results from `CreateBucket` operation.
No description provided by the author
DeleteBucketLifecycleRequest has parameters for `DeleteBucketLifecycle` operation.
DeleteBucketPolicyRequest has parameters for `DeleteBucketPolicy` operation.
DeleteBucketRequest has parameters for `DeleteBucket` operation.
DeleteBucketTaggingRequest has parameters for `DeleteBucketTagging` operation.
No description provided by the author
No description provided by the author
DeleteObjectRequest has parameters for `DeleteObject` operation.
DeleteObjectResult contains results from `DeleteObject` operation.
DeleteObjectsRequest has parameters for `DeleteObjects` operation.
DeleteObjectsResult contains results from `DeleteObjects` operation.
DeleteObjectTaggingRequest has parameters for `DeleteObjectTagging` operation.
DeleteObjectTaggingResult contains results from `DeleteObjectTagging` operation.
No description provided by the author
GetBucketLifecycleConfigurationRequest has parameters for `GetBucketLifecycleConfiguration` operation.
GetBucketLifecycleConfigurationResult contains results from `GetBucketLifecycleConfiguration` operation.
GetBucketPolicyRequest has parameters for `GetBucketPolicy` operation.
GetBucketPolicyResult contains results from `GetBucketPolicy` operation.
GetBucketTaggingRequest has parameters for `GetBucketTagging` operation.
GetBucketTaggingResult contains results from `GetBucketTagging` operation.
GetObjectACLRequest has parameters for `GetObjectACL` operation.
GetObjectACLResult contains results from `GetObjectACL` operation.
GetObjectRequest has parameters for `GetObject` operation.
GetObjectResult contains results from `GetObject` operation.
GetObjectRetentionRequest has parameters for `GetObjectRetention` operation.
GetObjectRetentionResult contains results from `GetObjectRetention` operation.
GetObjectTaggingRequest has parameters for `GetObjectTagging` operation.
GetObjectTaggingResult contains results from `GetObjectTagging` operation.
No description provided by the author
HeadBucketRequest has parameters for `HeadBucket` operation.
HeadObjectRequest has parameters for `HeadObject` operation.
HeadObjectResult contains results from `HeadObject` operation.
No description provided by the author
No description provided by the author
No description provided by the author
ListBucketsResult contains results from `ListBuckets` operation.
ListObjectsRequest has parameters for `ListObjectsV2` operation.
ListObjectsResult contains data from ListObjectsV2.
ListObjectVersionsRequest has parameters for `ListObjectVersions` operation.
ListObjectVersionsResult contains results from `ListObjectVersions` operation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PutBucketLifecycleConfigurationRequest has parameters for `PutBucketLifecycleConfiguration` operation.
PutBucketPolicyRequest has parameters for `PutBucketPolicy` operation.
PutBucketTaggingRequest has parameters for `PutBucketTagging` operation.
PutObjectACLRequest has parameters for `PutObjectACL` operation.
PutObjectACLResult contains results from `PutObjectACL` operation.
PutObjectRequest has parameters for `PutObject` operation.
PutObjectResult contains results from `PutObject` operation.
PutObjectRetentionRequest has parameters for `PutObjectRetention` operation.
PutObjectRetentionResult contains results from `PutObjectRetention` operation.
PutObjectTaggingRequest has parameters for `PutObjectTagging` operation.
PutObjectTaggingResult contains results from `PutObjectTagging` operation.
S3 has S3 client.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author