The Wayback Machine - https://web.archive.org/web/20200219080156/https://github.com/denverdino/aliyungo
Skip to content
Go SDK for Aliyun (Alibaba Cloud) - Golang API for ECS, OSS, DNS, SLB, RDS, RAM, MNS, STS, SLS, MQ, Push, OpenSearch, DM, Container Service etc.
Go
Branch: master
Clone or download
Latest commit f6c3b44 Feb 18, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update the CI build to golang 1.0 Dec 27, 2019
.github/workflows Update go.yml Jan 27, 2020
acm Fix warnings from golangci-lint Dec 27, 2019
cdn make the variable Video visable outside the package Nov 28, 2019
cms Add SetTransport method for other Client structs Feb 4, 2020
common product regional endpoint support more regions Feb 18, 2020
cs Add SetTransport method for other Client structs Feb 4, 2020
dm Format code Jan 11, 2018
dns formate go sdk according to standard go project Mar 30, 2018
ecs Merge pull request #366 from gujingit/feature/DescribeRouteEntryListArgs Feb 18, 2020
ess
kms
location Fix gofmt warnings Apr 10, 2019
metadata Fix warnings from golangci-lint Dec 27, 2019
mns Add SetTransport method for other Client structs Feb 4, 2020
mq Format code Jan 11, 2018
nas revert nas Dec 6, 2017
opensearch Format code Jan 11, 2018
oss Add SetTransport method for other Client structs Feb 4, 2020
push Add AndroidPopupActivity to push args Aug 30, 2018
pvtz Fix warnings from golangci-lint Dec 27, 2019
ram Fix warnings from golangci-lint Dec 27, 2019
rds Update comments Jan 11, 2019
ros Add SetTransport method for other Client structs Feb 4, 2020
slb Fix warnings from golangci-lint Dec 27, 2019
sls Add SetTransport method for other Client structs Feb 4, 2020
sms support get available resource method May 21, 2018
sts Fix gofmt warnings Apr 10, 2019
util Fix warnings from golangci-lint Dec 27, 2019
.gitignore 添加消息服务(MNS) ,支持队列单条消息的发送、消费和删除 Mar 25, 2017
.travis.yml Update the CI build to golang 1.0 Dec 27, 2019
LICENSE.txt Add Apache license file May 15, 2015
README.md Update with Official SDK URL Dec 17, 2017

README.md

AliyunGo: Go SDK for Aliyun Services

Build Status CircleCI Go Report Card

This is an unofficial Go SDK for Aliyun services. You are welcome for contribution.

The official SDK for Aliyun services is published. Please visit https://github.com/aliyun/alibaba-cloud-sdk-go for details

Package Structure

Quick Start

package main

import (
  "fmt"

	"github.com/denverdino/aliyungo/ecs"
)

const ACCESS_KEY_ID = "<YOUR_ID>"
const ACCESS_KEY_SECRET = "<****>"

func main() {
	client := ecs.NewClient(ACCESS_KEY_ID, ACCESS_KEY_SECRET)
	fmt.Print(client.DescribeRegions())
}

Documentation

Build and Install

go get:

go get github.com/denverdino/aliyungo

Test ECS

Modify "ecs/config_test.go"

	TestAccessKeyId     = "MY_ACCESS_KEY_ID"
	TestAccessKeySecret = "MY_ACCESS_KEY_ID"
	TestInstanceId      = "MY_INSTANCE_ID"
	TestIAmRich         = false
  • TestAccessKeyId: the Access Key Id
  • TestAccessKeySecret: the Access Key Secret.
  • TestInstanceId: the existing instance id for testing. It will be stopped and restarted during testing.
  • TestIAmRich(Optional): If it is set to true, it will perform tests to create virtual machines and disks under your account. And you will pay the bill. :-)

Under "ecs" and run

go test

Test OSS

Modify "oss/config_test.go"

	TestAccessKeyId     = "MY_ACCESS_KEY_ID"
	TestAccessKeySecret = "MY_ACCESS_KEY_ID"
	TestRegion          = oss.Beijing
	TestBucket          = "denverdino"
  • TestAccessKeyId: the Access Key Id
  • TestAccessKeySecret: the Access Key Secret.
  • TestRegion: the region of OSS for testing
  • TestBucket: the bucket name for testing

Under "oss" and run

go test

Contributors

License

This project is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Related projects

References

The GO API design of OSS refer the implementation from https://github.com/AdRoll/goamz

You can’t perform that action at this time.