Categorygithub.com/beyondstorage/go-service-cos/v2
modulepackage
2.3.0
Repository: https://github.com/beyondstorage/go-service-cos.git
Documentation: pkg.go.dev

# README

Build Status Integration Tests License

go-services-cos

COS(Cloud Object Storage) service support for go-storage.

Install

go get github.com/beyondstorage/go-service-cos/v2

Usage

import (
	"log"

	_ "github.com/beyondstorage/go-service-cos/v2"
	"github.com/beyondstorage/go-storage/v4/services"
)

func main() {
	store, err := services.NewStoragerFromString("cos://bucket_name/path/to/workdir?credential=hmac:<account_name>:<account_key>")
	if err != nil {
		log.Fatal(err)
	}
	
	// Write data from io.Reader into hello.txt
	n, err := store.Write("hello.txt", r, length)
}

# Packages

No description provided by the author

# Functions

GetObjectSystemMetadata will get ObjectSystemMetadata from Object.
GetStorageSystemMetadata will get SystemMetadata from StorageMeta.
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.
WithDefaultStoragePairs will apply default_storage_pairs value to Options.
WithEnableVirtualDir will apply enable_virtual_dir value to Options.
WithServerSideEncryption will apply server_side_encryption value to Options.
WithServerSideEncryptionContext will apply server_side_encryption_context value to Options.
WithServerSideEncryptionCosKmsKeyID will apply server_side_encryption_cos_kms_key_id 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.

# 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.
Type is the type for cos.

# 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 Tencent oss *Service config.
No description provided by the author
Storage is the cos object storage service.
No description provided by the author
StorageSystemMetadata stores system metadata for storage meta.