Git Product home page Git Product logo

bluemix-go's Introduction

IBM Cloud SDK for Go

Build Status GoDoc

bluemix-go provides the Go implementation for operating the IBM Cloud platform, which is based on the Cloud Foundry API.

Installing

  1. Install the SDK using the following command
go get github.com/IBM-Cloud/bluemix-go
  1. Update the SDK to the latest version using the following command
go get -u github.com/IBM-Cloud/bluemix-go

Using the SDK

You must have a working IBM Cloud account to use the APIs. Sign up if you don't have one.

The SDK has examples folder which cites few examples on how to use the SDK. First you need to create a session.

import "github.com/IBM-Cloud/bluemix-go/session"

func main(){

    s := session.New()
    .....
}

Creating session in this way creates a default configuration which reads the value from the environment variables. You must export the following environment variables.

  • IBMID - This is the IBM ID
  • IBMID_PASSWORD - This is the password for the above ID

OR

  • IC_API_KEY/IBMCLOUD_API_KEY - This is the Bluemix API Key. Login to IBMCloud to create one if you don't already have one. See instructions below for creating an API Key.

The default region is us_south. You can override it in the Config struct. You can also provide the value via environment variables; either via IC_REGION or IBMCLOUD_REGION. Valid regions are -

  • us-south
  • us-east
  • eu-gb
  • eu-de
  • au-syd
  • jp-tok

The maximum retries is 3. You can override it in the Config struct. You can also provide the value via environment variable; via MAX_RETRIES

Creating an IBM Cloud API Key

First, navigate to the IBM Cloud console and use the Manage toolbar to access IAM.

Access IAM from the Manage toolbar

On the left, click "IBM Cloud API Keys"

Click IBM Cloud API Keys

Press "Create API Key"

Press Create API Key

Pick a name and description for your key

Set name and description

You have created a key! Press the eyeball to show the key. Copy or save it because keys can't be displayed or downloaded twice.

Your key is now created

bluemix-go's People

Contributors

ashishth09 avatar hkantare avatar praveengostu avatar kavya498 avatar smjtd avatar anil-cm avatar sakshiag avatar stevestrutt avatar prgavali avatar anujit-ibm avatar anilkumarnagaraj avatar alxmk avatar umarali-nagoor avatar anujit-raj avatar bonifaido avatar xpy3106 avatar argeiger avatar junliwang avatar nibalizer avatar robherley avatar mkm-r avatar hasueki avatar logdnalf avatar dvrkps avatar bkuschel avatar bobbyradford avatar andreainnocenti avatar mihivagyok 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.