acs-sdk-go

module
v0.0.0-...-e17fecd Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: MPL-2.0

README

ACS SDK for Go

The Go SDK for Accelerated Cloud Storage's Object Storage offering.

acs-sdk-go is the ACS SDK for the Go programming language.

The SDK requires a minimum version of Go 1.24.0.

Check out the Release Notes for information about the latest bug fixes, updates, and features added to the SDK.

Jump To:

Go version support policy

The SDK follows the upstream release policy with an additional one month of support for the most recently deprecated language version.

ACS reserves the right to drop support for unsupported Go versions earlier to address critical security issues.

Getting started

Website API Reference Demo

To get started working with the SDK setup your project for Go modules, and retrieve the SDK dependencies with go get. This example shows how you can use the SDK to make an API request using the SDK's client.

Get credentials

Get your credentials and setup payments from the console on the website.

Next, set up credentials (in e.g. ~/.acs/credentials):

default:
    access_key_id = YOUR_KEY
    secret_access_key = YOUR_SECRET

Note: You can include multiple profiles and set them using the ACS_PROFILE environment variable. See the examples/config folder for a sample file.

Initialize Project
$ mkdir ~/helloacs
$ cd ~/helloacs
$ go mod init helloacs
Add SDK Dependencies
$ go get github.com/AcceleratedCloudStorage/acs-sdk-go/client
Write Code

You can either use the client for an interface similar to the AWS SDK or a FUSE mount for a file system interface. Check out the example folder for more details.

Share bucket

You can also bring your existing buckets into the service by setting a bucket policy and then sharing the bucket with the service.

Step 1: Setting a bucket policy

Here is the AWS reference guide for bucket policies. You can set the following bucket policy through the AWS Console or SDK to enable ACS to access it.

{
"Version": "2012-10-17",
   "Statement": [
    {
     "Sid": "AllowUserFullAccess", 
     "Effect": "Allow",
     "Principal": {
      "AWS": "arn:aws:iam::160885293701:root"
     },
     "Action": [
      "s3:*"
     ],
     "Resource": [
      "arn:aws:s3:::BUCKETNAME",
      "arn:aws:s3:::BUCKETNAME/*"
     ]
    }
   ]
}
Step 2: Notify ACS of this newly shared bucket
// Create a new client
acsClient, err := client.NewClient(&client.Session{Region: "us-east-1"})
defer acsClient.Close()
// Share a bucket
err = client.ShareBucket(context, BUCKETNAME)

Getting Help

Please use these community resources for getting help.

Feedback

If you encounter a bug with the ACS SDK for Go we would like to hear about it. Search the existing issues and see if others are also experiencing the same issue before opening a new issue. Please include the version of ACS SDK for Go, Go language, and OS you’re using. Please also include reproduction case when appropriate. Keeping the list of open issues lean will help us respond in a timely manner.

Discussion

We have a discussion forum where you can read about announcements, product ideas, partcipate in Q&A. Here is a link to the discussion.

Contact us

Email us at sales@acceleratedcloudstorage.com if you have any further questions or concerns.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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