deis/controller-sdk-go

Name: controller-sdk-go

Owner: Deis

Description: The Go SDK for the Deis Controller API

Created: 2016-06-14 18:46:27.0

Updated: 2018-03-01 17:50:19.0

Pushed: 2018-02-28 21:44:48.0

Homepage: null

Size: 1465

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

| | Deis Workflow is no longer maintained.
Please read the announcement for more detail. | |—:|—| | 09/07/2017 | Deis Workflow v2.18 final release before entering maintenance mode | | 03/01/2018 | End of Workflow maintenance: critical patches no longer merged | | | Hephy is a fork of Workflow that is actively developed and accepts code contributions. |

Controller Go SDK

Build Status codecov Go Report Card codebeat badge GoDoc

This is the Go SDK for interacting with the Deis Controller.

Usage
rt deis "github.com/deis/controller-sdk-go"
rt "github.com/deis/controller-sdk-go/apps"

Construct a deis client to interact with the controller API. Then, get the first 100 apps the user has access to.

                  Verify SSL, Controller URL, API Token
nt, err := deis.New(true, "deis.test.io", "abc123")
rr != nil {
log.Fatal(err)

, _, err := apps.List(client, 100)
rr != nil {
log.Fatal(err)

Authentication
rt deis "github.com/deis/controller-sdk-go"
rt "github.com/deis/controller-sdk-go/auth"

If you don't already have a token for a user, you can retrieve one with a username and password.

reate a client with a blank token to pass to login.
nt, err := deis.New(true, "deis.test.io", "")
rr != nil {
log.Fatal(err)

n, err := auth.Login(client, "user", "password")
rr != nil {
log.Fatal(err)

et the client to use the retrieved token
nt.Token = token

For a complete usage guide to the SDK, see full package documentation.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.