Documentation ¶
Index ¶
- Variables
- func BasicAuthCheck() http.HandlerFunc
- func NewAPI(serviceBroker ServiceBroker, logger lager.Logger) *martini.ClassicMartini
- type BindingResponse
- type CatalogResponse
- type DashboardClient
- type EmptyResponse
- type ErrorResponse
- type Plan
- type PlanMetadata
- type ProvisionRequest
- type ProvisionResponse
- type Service
- type ServiceBroker
- type ServiceMetadata
- type ServiceMetadataListing
- type ServiceMetadataProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 409 HTTP status code should be returned if the requested service instance already exists. ErrServiceInstanceAlreadyExists = errors.New("Service instance already exists") // 500 HTTP status code should be returned if the instance limit for this service has been reached. ErrServiceInstanceLimitReached = errors.New("Maximum number of instances for this service has been reached") // 409 HTTP status code should be returned if the service instance does not exist when attempting to bind to it. ErrServiceInstanceDoesNotExists = errors.New("Service instance does not exists") // 409 HTTP status code should be returned if the requested binding already exists ErrServiceInstanceBindingAlreadyExists = errors.New("Binding already exists") )
Service Broker API Errors
Functions ¶
func BasicAuthCheck ¶
func BasicAuthCheck() http.HandlerFunc
func NewAPI ¶
func NewAPI(serviceBroker ServiceBroker, logger lager.Logger) *martini.ClassicMartini
Creates v2 service broker api for a given broker
Types ¶
type BindingResponse ¶
type BindingResponse struct {
Credentials interface{} `json:"credentials"`
}
type CatalogResponse ¶
type CatalogResponse struct {
Services []Service `json:"services"`
}
type DashboardClient ¶
type EmptyResponse ¶
type EmptyResponse struct{}
type ErrorResponse ¶
type ErrorResponse struct {
Description string `json:"description"`
}
type Plan ¶
type Plan struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Metadata PlanMetadata `json:"metadata,omitempty"` }
type PlanMetadata ¶
type ProvisionRequest ¶
type ProvisionResponse ¶
type ProvisionResponse struct {
DashboardUrl string `json:"dashboard_url,omitempty"`
}
type Service ¶
type Service struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Bindable bool `json:"bindable"` Plans []Plan `json:"plans"` Metadata ServiceMetadata `json:"metadata,omitempty"` Tags []string `json:"tags,omitempty"` DashboardClient DashboardClient `json:"dashboard_client"` }
type ServiceBroker ¶
type ServiceBroker interface { // Fetches the service catalog for the developer to select from the marketplace // http://docs.cloudfoundry.org/services/api.html#catalog-mgmt GetCatalog() []Service // Creates a new service resource for the developer // http://docs.cloudfoundry.org/services/api.html#provisioning Provision(instanceId string, params map[string]string) (string, error) // Creates a binding to a provisioned service instance for an application to use for connecting to the instance // http://docs.cloudfoundry.org/services/api.html#binding Bind(instanceId string, bindingId string) (interface{}, error) // Removes a service instance binding so applications can no longer bind to that instance // http://docs.cloudfoundry.org/services/api.html#unbinding Unbind(instanceId string, bindingId string) error // Deletes a provisioned service instance completely so users can no longer use it // http://docs.cloudfoundry.org/services/api.html#deprovisioning Deprovision(instanceId string) error }
Implements the Cloud Foundry Service Broker API http://docs.cloudfoundry.org/services/api.html#api-overview
type ServiceMetadata ¶
type ServiceMetadata struct { DisplayName string `json:"displayName"` LongDescription string `json:"longDescription"` DocumentationUrl string `json:"documentationUrl"` SupportUrl string `json:"supportUrl"` Listing ServiceMetadataListing `json:"listing"` Provider ServiceMetadataProvider `json:"provider"` }
type ServiceMetadataListing ¶
type ServiceMetadataProvider ¶
type ServiceMetadataProvider struct {
Name string `json:"name"`
}
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/codegangsta/inject
Package inject provides utilities for mapping and injecting dependencies in various ways.
|
Package inject provides utilities for mapping and injecting dependencies in various ways. |
_workspace/src/github.com/go-martini/martini
Package martini is a powerful package for quickly writing modular web applications/services in Golang.
|
Package martini is a powerful package for quickly writing modular web applications/services in Golang. |
_workspace/src/github.com/martini-contrib/binding
Package binding transforms a raw request into a struct ready to be used your application.
|
Package binding transforms a raw request into a struct ready to be used your application. |
_workspace/src/github.com/martini-contrib/render
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering.
|
Package render is a middleware for Martini that provides easy JSON serialization and HTML template rendering. |
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
|
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API. |
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
|
Ginkgo accepts a number of configuration options. |
_workspace/src/github.com/onsi/ginkgo/ginkgo
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
|
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use. |
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
|
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete. |
_workspace/src/github.com/onsi/ginkgo/reporters
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
|
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output. |
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
|
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library. |
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
|
Gomega's format package pretty-prints objects. |
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
|
Package gbytes provides a buffer that supports incrementally detecting input. |
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
|
Package gexec provides support for testing external processes. |
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
|
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers. |
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
|
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported. |
_workspace/src/github.com/oxtoacart/bpool
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels.
|
Package bpool implements leaky pools of byte arrays and Buffers as bounded channels. |
Click to show internal directories.
Click to hide internal directories.