Skip to content
API library to communicate with Cloud 66.
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor/github.com
.gitignore
Gopkg.lock
Gopkg.toml
README.md
account.go
async.go
backups.go
base-template.go
cloud.go
cloud66.go
config-store-record.go
configuration.go
container.go
easy_deploy.go
fayecore.go
formation-bundle.go
formation.go
gateway.go
helm-release.go
job-docker-host-task.go
job-docker-service-task.go
job-factory.go
job.go
manifest-yaml.go
onprem.go
ping.go
pipeline.go
policy.go
process.go
server.go
service-yaml.go
service.go
session.go
snapshot.go
source.sh
ssl-certificate.go
stack.go
stencil.go
stencil_group.go
transformation.go
user.go

README.md

Cloud 66 Go Library

Getting Started

go get github.com/cloud66-oss/cloud66

Authorization

By default, you can use Cloud66 Toolbet token which stores in ~/.cloud66/cx.json. If the file doesn't exist, you can authorize it yourself

var (
	tokenFile    string = "YOUR_TOKEN_FILENAME"
	tokenDir     string = "YOUR_TOKEN_DIRECTORY"
)
cloud66.Authorize(tokenDir, tokenFile)

Or you can use Personal Access Token. Create one on and store it in a file like format below:

{"AccessToken":"YOUR_TOKEN_GOES_HERE","RefreshToken":"","Expiry":"0001-01-01T00:00:00Z","Extra":null}

Get Client

var (
	tokenFile    string = "YOUR_TOKEN_FILENAME"
	tokenDir     string = "YOUR_TOKEN_DIRECTORY"
)
client := cloud66.GetClient(tokenDir, tokenFile, "")

Get Stacks List

var stacks []cloud66.Stack
stacks, err := client.StackList()
You can’t perform that action at this time.