Golang client lib for Cloud Foundry
Go
Clone or download
Permalink
Failed to load latest commit information.
.gitignore Use dep to manage dependencies (#154) Nov 23, 2017
.travis.yml Removing trailing slashes from the API Address (#177) Feb 28, 2018
Gopkg.lock Add user field to info Jun 22, 2018
Gopkg.toml Add Staging Spaces to model, make changes based on review Jun 14, 2018
LICENSE Update LICENSE (#85) Mar 17, 2017
README.md Initial AppUpdate and AppUpdateTest commit (#180) Mar 8, 2018
app_update.go go fmt (#190) Jun 1, 2018
app_update_test.go go fmt (#190) Jun 1, 2018
app_usage_events.go Adding the client business logic for the App Usage Events enpoint. Ad… Feb 26, 2018
app_usage_events_test.go Adding the client business logic for the App Usage Events enpoint. Ad… Feb 26, 2018
appevents.go Added another date format for AppStats.Usage.Time and Bugfix for app.… Apr 12, 2017
appevents_test.go move to should be nil Aug 4, 2017
apps.go Add foundational calls to cf push a new app (#187) Jun 1, 2018
apps_test.go Add foundational calls to cf push a new app (#187) Jun 1, 2018
buildpacks.go Add ability to delete a buildpack Jul 12, 2018
buildpacks_test.go Add ability to delete a buildpack Jul 12, 2018
cf_error.go Sort error defs by code to gen predictable output (#155) Nov 23, 2017
cf_error_test.go Add generated IsXError(err error) functions Nov 14, 2017
cf_test.go add methods to patch orgs/spaces with isolation segment guid Jul 9, 2018
client.go Add foundational calls to cf push a new app (#187) Jun 1, 2018
client_test.go Improve HTTP error handling (#185) May 30, 2018
domains.go Add the ability to delete shared domains Jul 11, 2018
domains_test.go Add the ability to delete shared domains Jul 11, 2018
environmentvariablegroups.go Add methods to get/set running/staging environment variable group Jun 29, 2018
environmentvariablegroups_test.go Add methods to get/set running/staging environment variable group Jun 29, 2018
error.go Improve HTTP error handling (#185) May 30, 2018
events.go Add CreatedAt to event resource (#171) Feb 13, 2018
events_test.go Add CreatedAt to event resource (#171) Feb 13, 2018
gen_error.go Sort error defs by code to gen predictable output (#155) Nov 23, 2017
info.go Add user field to info Jun 22, 2018
info_test.go Add foundational calls to cf push a new app (#187) Jun 1, 2018
isolationsegments.go fix function to remove org relationship as url was incorrect - http:/… Jul 9, 2018
isolationsegments_test.go fix function to remove org relationship as url was incorrect - http:/… Jul 9, 2018
org_quotas.go Add ability to delete org quota Jul 12, 2018
org_quotas_test.go Add ability to delete org quota Jul 12, 2018
orgs.go add methods to patch orgs/spaces with isolation segment guid Jul 9, 2018
orgs_test.go add methods to patch orgs/spaces with isolation segment guid Jul 9, 2018
payloads_test.go Add methods to get/set running/staging environment variable group Jun 29, 2018
route_mappings.go Add CreatedAt and UpdatedAt to RouteMapping Jul 3, 2018
route_mappings_test.go Added functions to make /v2/route_mappings endpoint available (#189) Jun 1, 2018
routes.go Add ability to set path and port on a route request Jun 27, 2018
routes_test.go Add foundational calls to cf push a new app (#187) Jun 1, 2018
secgroups.go Add CreatedAt and UpdatedAt to service entities Jun 25, 2018
secgroups_test.go Add methods (and tests) to list default running and staging security … Jun 14, 2018
service_bindings.go Add the ability to associate a user provided service instance to a route Jul 10, 2018
service_bindings_test.go Add the ability to associate a user provided service instance to a route Jul 10, 2018
service_brokers.go Add CreatedAt and UpdatedAt to service entities Jun 25, 2018
service_brokers_test.go Added the service broker guid to the ServiceBroker type (#149) Nov 13, 2017
service_instances.go Add missing services API calls (#181) Mar 23, 2018
service_instances_test.go Add missing services API calls (#181) Mar 23, 2018
service_keys.go Add CreatedAt and UpdatedAt to service entities Jun 25, 2018
service_keys_test.go Add CreateServiceKey (#138) Oct 27, 2017
service_plan_visibilities.go Add CreatedAt and UpdatedAt to service plan visibilities Jun 25, 2018
service_plan_visibilities_test.go Add service plan visibilities functionality (#107) May 21, 2017
service_plans.go Add methods to update a service plan's global visibility Jun 28, 2018
service_plans_test.go Add methods to update a service plan's global visibility Jun 28, 2018
service_usage_events.go Adding the client business logic for the Service Usage Event endpoin… Feb 27, 2018
service_usage_events_test.go Adding the client business logic for the Service Usage Event endpoin… Feb 27, 2018
services.go Add missing fields to Service Jun 24, 2018
services_test.go Add support for Service Broker management APIs (#140) Nov 6, 2017
space_quotas.go Correctly set CreatedAt and UpdatedAt for org quota, space quota, user Jun 27, 2018
space_quotas_test.go go fmt (#190) Jun 1, 2018
spaces.go add methods to patch orgs/spaces with isolation segment guid Jul 9, 2018
spaces_test.go add methods to patch orgs/spaces with isolation segment guid Jul 9, 2018
stacks.go Add CreatedAt and UpdatedAt to shared and private domains Jun 23, 2018
stacks_test.go Adding support for isolation segments (PCF 1.10) (#98) Apr 10, 2017
tasks.go Fix goreportcard issues (#143) Nov 10, 2017
tasks_test.go Use consistent names for get by guid methods. (#117) Jul 8, 2017
types.go Add createdAt/updatedAt/packageState/packageUpdatedAt fields to App s… Mar 11, 2017
user_provided_service_instances.go Add CreatedAt and UpdatedAt to user provided service instance Jun 25, 2018
user_provided_service_instances_test.go Add CreateUserProvidedServiceInstance method Jun 12, 2018
users.go Correctly set CreatedAt and UpdatedAt for org quota, space quota, user Jun 27, 2018
users_test.go Add GetUserByGUID (#146) Nov 10, 2017

README.md

go-cfclient · Travis-CI GoDoc Report card

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.