repositorypackage
0.0.0-20180228214447-c9ffa0511183
Repository: https://github.com/deis/controller-sdk-go.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# 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
This is the Go SDK for interacting with the Deis Controller.
Usage
import deis "github.com/deis/controller-sdk-go"
import "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
client, err := deis.New(true, "deis.test.io", "abc123")
if err != nil {
log.Fatal(err)
}
apps, _, err := apps.List(client, 100)
if err != nil {
log.Fatal(err)
}
Authentication
import deis "github.com/deis/controller-sdk-go"
import "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.
// Create a client with a blank token to pass to login.
client, err := deis.New(true, "deis.test.io", "")
if err != nil {
log.Fatal(err)
}
token, err := auth.Login(client, "user", "password")
if err != nil {
log.Fatal(err)
}
// Set the client to use the retrieved token
client.Token = token
For a complete usage guide to the SDK, see full package documentation.