How cloudfoundry/go-cfclient works
go-cfclient is a Go library for interacting with the Cloud Foundry v3 API. A caller configures authentication and API access, creates a client, then uses resource-specific clients to make API requests and receive typed resources or asynchronous job IDs. The library also provides manifest-driven app push/deployment operations, filtering, pagination, and job polling. The graph preserves those documented capabilities; unsampled resource areas use exact enclosing directories, and unverified implementation links are omitted.
Main entry points: client.go Client facade · push.go App push workflow · service_instance.go Service instances · service_plan.go Service plans
Components 18
Configuration and auth
- Config and auth
config/config.go
API client
- Client facade
client/client.go - Applications
client/app.go - Service instances
client/service_instance.go - Service plans
client/service_plan.go - Service route bindings
client/service_route_binding.go - Other resource clients
client - HTTP transport
internal/http/client.go - Response decoding
internal/http/response.go - Job polling
client/job.go
App operations
- Manifest definitions
operation/manifest.go - App push workflow
operation/push.go
Resource models
- App resources
resource/app.go - Service resources
resource - Other resources
resource
Other components
- Library caller
- UAA
- Cloud Controller
Connections 32
- Library caller → Config and auth: configures
README.md - Library caller → Client facade: creates
README.md - Config and auth → UAA: authenticates with
README.md - Client facade → HTTP transport: sends requests
client/client.go - HTTP transport → UAA: refreshes tokens
- Library caller → Applications: requests resources
README.md - Library caller → Service instances: requests resources
README.md - Library caller → Service plans: requests resources
README.md - Library caller → Service route bindings: requests resources
README.md - Library caller → Other resource clients: requests resources
README.md - Applications → Client facade: calls
client/app.go - Service instances → Client facade: calls
client/service_instance.go - Service plans → Client facade: calls
client/service_plan.go - Service route bindings → Client facade: calls
client/service_route_binding.go - Other resource clients → Client facade: calls
- Client facade → Response decoding: decodes responses
client/client.go - Response decoding → App resources: decodes JSON
internal/http/response.go - Service instances → Service resources: uses typed resources
client/service_instance.go - Service plans → Service resources: uses typed resources
client/service_plan.go - Service route bindings → Service resources: uses typed resources
client/service_route_binding.go - Library caller → App push workflow: runs push
README.md - App push workflow → Manifest definitions: consumes manifest
operation/push.go - App push workflow → Applications: manages apps
operation/push.go - App push workflow → Other resource clients: uses deployment resources
operation/push.go - App push workflow → Job polling: polls completion
- Library caller → Job polling: polls jobs
README.md - Applications → Cloud Controller: requests API
client/app.go - Service instances → Cloud Controller: requests API
client/service_instance.go - Service plans → Cloud Controller: requests API
client/service_plan.go - Service route bindings → Cloud Controller: requests API
client/service_route_binding.go - Other resource clients → Cloud Controller: requests API
- App push workflow → Cloud Controller: deploys applications