GithubHelp home page GithubHelp logo

yu-fish / aliyungo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from denverdino/aliyungo

1.0 0.0 0.0 4.65 MB

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.

License: Apache License 2.0

Go 100.00%

aliyungo's Introduction

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.

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

aliyungo's People

Contributors

denverdino avatar menglingwei avatar demonwy avatar jzwlqx avatar tg123 avatar chainone avatar yarous224 avatar xiaozhu36 avatar shuwei-yin avatar zhuzhih2017 avatar yufeizyf avatar johnzeng avatar ringtail avatar aoxn avatar hb-chen avatar pragkent avatar keontang avatar aiden0z avatar choleraehyq avatar wspl avatar zachcr avatar liubin avatar bswang avatar jimmycmh avatar hmgle avatar ledzep2 avatar

Stargazers

Jesse avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.