Spectra S3 Go SDK
An SDK conforming to Spectra S3 for Golang 1.10
Join us at our Google Groups forum to ask questions, or see frequently asked questions.
The latest documentation is located at Go SDK Documentation.
Installing with GB
The Go SDK must be installed under
$GOPATH denotes the location of the Go workspace, and
src denotes the location of source files within the workspace.
For information regarding Go workspace, see Golang Workspaces.
Install the latest version of the Go SDK in the
src/github.com/SpectraLogic folder. You can clone it with the following command:
cd $GOPATH/src/github.com/SpectraLogic git clone https://github.com/SpectraLogic/ds3_go_sdk.git
Install the latest version of GB. Make sure to compiled the GB project.
Compile the Go SDK using GB with the commands:
cd ds3_go_sdk gb build all
In the ds3_go_sdk you create a
Client instance through the setting of the following environment variables and using
DS3_ENDPOINT- The URL to the DS3 Endpoint
DS3_ACCESS_KEY- The DS3 access key
DS3_SECRET_KEY- The DS3 secret key
http_proxy- If set, the
Clientinstance will proxy through this URL
- How to use get service to list buckets
- How to create a bucket
- How to get a list of S3 objects in a bucket
- How to get a single object using a naked S3 get
- How to use bulk put to send multiple files to the BP efficiently
- How to use bulk get to retrieve multiple files from the BP efficiently
Running Tests with GB
There are unit tests in the
ds3 package, and integration tests in the
ds3_integration package. To run tests, cd to
the Go SDK's main folder
In order to run the integration tests the following environment variables must be used to configure which DS3 appliance
to run the tests against:
Run all tests (unit and integration) with test output:
gb test -v
Run unit tests with test output:
gb test -v ds3
Run integration tests with test output:
gb test -v ds3_integration