# README
go-services-s3
AWS S3 service support for go-storage.
Install
go get github.com/beyondstorage/go-service-s3/v2
Usage
import (
"log"
_ "github.com/beyondstorage/go-service-s3/v2"
"github.com/beyondstorage/go-storage/v4/services"
)
func main() {
store, err := services.NewStoragerFromString("s3://bucket_name/path/to/workdir")
if err != nil {
log.Fatal(err)
}
// Write data from io.Reader into hello.txt
n, err := store.Write("hello.txt", r, length)
}
- See more examples in go-storage-example.
- Read more docs about go-service-s3.
Compatible Services
We can use go-service-s3 for the following services:
- Aliyun OSS S3 Compatible API (We also provide native support in go-service-oss)
- AWS S3 (The native support service.)
- DigitalOcean Space
- ECloud (China Mobile Cloud) Object Storage
- GCS S3 Compatible API (We also provide native support in go-service-gcs)
- IBM Cloud Storage Service
- ksyun KS3
- JCloud Object Storage
- Minio (We also provide native support in go-service-minio)
- QingStor Object Storage S3 Compatible API (We also provide native support in go-service-qingstor)
- Scaleway Object Storage
# Packages
No description provided by the author
# Functions
GetObjectSystemMetadata will get ObjectSystemMetadata from Object.
GetStorageSystemMetadata will get StorageSystemMetadata from Storage.
New will create both Servicer and Storager.
NewServicer will create Servicer only.
NewStorager will create Storager only.
WithDefaultServicePairs will apply default_service_pairs value to Options.
WithDefaultStorageClass will apply default_storage_class value to Options.
WithDefaultStoragePairs will apply default_storage_pairs value to Options.
WithDisable100Continue will apply disable_100_continue value to Options.
WithEnableVirtualDir will apply enable_virtual_dir value to Options.
WithEnableVirtualLink will apply enable_virtual_link value to Options.
WithExceptedBucketOwner will apply excepted_bucket_owner value to Options.
WithForcePathStyle will apply force_path_style value to Options.
WithServerSideEncryption will apply server_side_encryption value to Options.
WithServerSideEncryptionAwsKmsKeyID will apply server_side_encryption_aws_kms_key_id value to Options.
WithServerSideEncryptionBucketKeyEnabled will apply server_side_encryption_bucket_key_enabled value to Options.
WithServerSideEncryptionContext will apply server_side_encryption_context value to Options.
WithServerSideEncryptionCustomerAlgorithm will apply server_side_encryption_customer_algorithm value to Options.
WithServerSideEncryptionCustomerKey will apply server_side_encryption_customer_key value to Options.
WithServiceFeatures will apply service_features value to Options.
WithStorageClass will apply storage_class value to Options.
WithStorageFeatures will apply storage_features value to Options.
WithUseAccelerate will apply use_accelerate value to Options.
WithUseArnRegion will apply use_arn_region value to Options.
# Constants
All available server side algorithm are listed here.
All available server side algorithm are listed here.
All available storage classes are listed here.
All available storage classes are listed here.
All available storage classes are listed here.
All available storage classes are listed here.
All available storage classes are listed here.
All available storage classes are listed here.
All available storage classes are listed here.
Type is the type for s3.
# Variables
ErrServerSideEncryptionCustomerKeyInvalid will be returned while server-side encryption customer key is invalid.
# Structs
DefaultServicePairs is default pairs for specific action.
DefaultStoragePairs is default pairs for specific action.
ObjectSystemMetadata stores system metadata for object.
Service is the s3 service config.
No description provided by the author
Storage is the s3 object storage service.
No description provided by the author
StorageSystemMetadata stores system metadata for object.