4a96126d5a
This reverts commit eb74ca61fc4dcb7038f39defb127d5d639ba0ca1. |
||
---|---|---|
.. | ||
.gitignore | ||
.travis.yml | ||
Gopkg.lock | ||
Gopkg.toml | ||
LICENSE | ||
README.md | ||
app_update.go | ||
app_usage_events.go | ||
appevents.go | ||
apps.go | ||
buildpacks.go | ||
cf_error.go | ||
client.go | ||
domains.go | ||
environmentvariablegroups.go | ||
error.go | ||
events.go | ||
go.mod | ||
go.sum | ||
info.go | ||
isolationsegments.go | ||
org_quotas.go | ||
orgs.go | ||
processes.go | ||
route_mappings.go | ||
routes.go | ||
secgroups.go | ||
service_bindings.go | ||
service_brokers.go | ||
service_instances.go | ||
service_keys.go | ||
service_plan_visibilities.go | ||
service_plans.go | ||
service_usage_events.go | ||
services.go | ||
space_quotas.go | ||
spaces.go | ||
stacks.go | ||
tasks.go | ||
types.go | ||
user_provided_service_instances.go | ||
users.go | ||
v3types.go |
README.md
go-cfclient
Overview
cfclient
is a package to assist you in writing apps that need to interact with Cloud Foundry.
It provides functions and structures to retrieve and update
Usage
go get github.com/cloudfoundry-community/go-cfclient
NOTE: Currently this project is not versioning its releases and so breaking changes might be introduced.
Whilst hopefully notifications of breaking changes are made via commit messages, ideally your project will use a local
vendoring system to lock in a version of go-cfclient
that is known to work for you.
This will allow you to control the timing and maintenance of upgrades to newer versions of this library.
Some example code:
package main
import (
"github.com/cloudfoundry-community/go-cfclient"
)
func main() {
c := &cfclient.Config{
ApiAddress: "https://api.10.244.0.34.xip.io",
Username: "admin",
Password: "admin",
}
client, _ := cfclient.NewClient(c)
apps, _ := client.ListApps()
fmt.Println(apps)
}
Development
Errors
If the Cloud Foundry error definitions change at https://github.com/cloudfoundry/cloud_controller_ng/blob/master/vendor/errors/v2.yml then the error predicate functions in this package need to be regenerated.
To do this, simply use Go to regenerate the code:
go generate
Contributing
Pull requests welcome.