1
mirror of https://github.com/rclone/rclone synced 2024-11-11 09:30:44 +01:00
rclone/vendor/github.com/yunify/qingstor-sdk-go
2017-09-30 15:27:27 +01:00
..
client vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
config vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
docs vendor: resync with dep ensure 2017-09-30 08:10:50 +01:00
logger vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
request vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
service vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
template vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
test vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
utils vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
.gitignore vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
.gitmodules vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
.travis.yml vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
AUTHORS vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
CHANGELOG.md vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
glide.lock vendor: update qingstor 2017-08-09 13:03:07 +01:00
glide.yaml vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
LICENSE vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
MAINTAINERS vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
Makefile vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00
README.md vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
version_test.go vendor: add qingstor-sdk-go for QingStor 2017-08-04 17:09:28 +01:00
version.go vendor: update all dependencies to latest versions 2017-09-30 15:27:27 +01:00

QingStor SDK for Go

Build Status Go Report Card API Reference License

The official QingStor SDK for the Go programming language.

Getting Started

Installation

Refer to the Installation Guide, and have this SDK installed.

Preparation

Before your start, please go to QingCloud Console to create a pair of QingCloud API AccessKey.

API AccessKey Example:

access_key_id: 'ACCESS_KEY_ID_EXAMPLE'
secret_access_key: 'SECRET_ACCESS_KEY_EXAMPLE'

Usage

Now you are ready to code. You can read the detailed guides in the list below to have a clear understanding or just take the quick start code example.

Checkout our releases and change log for information about the latest features, bug fixes and new ideas.

Quick Start Code Example:

package main

import (
	"fmt"

	"github.com/yunify/qingstor-sdk-go/config"
	qs "github.com/yunify/qingstor-sdk-go/service"
)

func main() {
	conf, _ := config.New("ACCESS_KEY_ID", "SECRET_ACCESS_KEY")

	// Initialize service object for QingStor.
	qsService, _ := qs.Init(conf)

	// List all buckets.
	qsOutput, _ := qsService.ListBuckets(&qs.ListBucketsInput{})

	// Print HTTP status code.
	fmt.Println(qs.IntValue(qsOutput.StatusCode))

	// Print the count of buckets.
	fmt.Println(qs.IntValue(qsOutput.Count))

	// Print the first bucket name.
	fmt.Println(qs.StringValue(qsOutput.Buckets[0].Name))
}

Reference Documentations

Contributing

  1. Fork it ( https://github.com/yunify/qingstor-sdk-go/fork )
  2. Create your feature branch (git checkout -b new-feature)
  3. Commit your changes (git commit -asm 'Add some feature')
  4. Push to the branch (git push origin new-feature)
  5. Create a new Pull Request

LICENSE

The Apache License (Version 2.0, January 2004).