Documentation ¶
Index ¶
- func NewRouter(c *config.Config) *mux.Router
- type Broker
- func (b *Broker) BasicAuth(handler http.HandlerFunc) http.HandlerFunc
- func (b *Broker) Bind(rw http.ResponseWriter, req *http.Request)
- func (b *Broker) Catalog(rw http.ResponseWriter, req *http.Request)
- func (b *Broker) DeprovisionInstance(rw http.ResponseWriter, req *http.Request)
- func (b *Broker) Error(rw http.ResponseWriter, req *http.Request, code int, err, desc string)
- func (b *Broker) FetchBinding(rw http.ResponseWriter, req *http.Request)
- func (b *Broker) FetchInstance(rw http.ResponseWriter, req *http.Request)
- func (b *Broker) Health(rw http.ResponseWriter, req *http.Request)
- func (b *Broker) ProvisionInstance(rw http.ResponseWriter, req *http.Request)
- func (b *Broker) Unbind(rw http.ResponseWriter, req *http.Request)
- type Service
- type ServiceBinding
- type ServiceBindingResponse
- type ServiceBindingResponseCredentials
- type ServiceBindingResponseEndpoint
- type ServiceBindingResponseParameters
- type ServiceCatalog
- type ServiceInstanceFetchResponse
- type ServiceInstanceFetchResponseParameters
- type ServiceInstanceProvisioning
- type ServiceInstanceProvisioningResponse
- type ServicePlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct { Username string Password string API config.API Client *api.Client ServiceCatalog *ServiceCatalog }
func (*Broker) BasicAuth ¶
func (b *Broker) BasicAuth(handler http.HandlerFunc) http.HandlerFunc
func (*Broker) DeprovisionInstance ¶
func (b *Broker) DeprovisionInstance(rw http.ResponseWriter, req *http.Request)
func (*Broker) FetchBinding ¶
func (b *Broker) FetchBinding(rw http.ResponseWriter, req *http.Request)
func (*Broker) FetchInstance ¶
func (b *Broker) FetchInstance(rw http.ResponseWriter, req *http.Request)
func (*Broker) ProvisionInstance ¶
func (b *Broker) ProvisionInstance(rw http.ResponseWriter, req *http.Request)
type Service ¶
type Service struct { ID string `json:"id" yaml:"id"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Bindable bool `json:"bindable" yaml:"bindable"` InstancesRetrievable bool `json:"instances_retrievable"` BindingsRetrievable bool `json:"bindings_retrievable"` Tags []string `json:"tags" yaml:"tags"` Metadata struct { DisplayName string `json:"displayName" yaml:"displayName"` ImageURL string `json:"imageUrl" yaml:"imageUrl"` LongDescription string `json:"longDescription" yaml:"longDescription"` ProviderDisplayName string `json:"providerDisplayName" yaml:"providerDisplayName"` DocumentationURL string `json:"documentationUrl" yaml:"documentationUrl"` SupportURL string `json:"supportUrl" yaml:"supportUrl"` } `json:"metadata" yaml:"metadata"` Plans []ServicePlan `json:"plans" yaml:"plans"` }
type ServiceBinding ¶
type ServiceBindingResponse ¶
type ServiceBindingResponse struct { Credentials ServiceBindingResponseCredentials `json:"credentials"` Endpoints []ServiceBindingResponseEndpoint `json:"endpoints"` Parameters ServiceBindingResponseParameters `json:"parameters"` }
func ParseBinding ¶
func ParseBinding(instance *api.InstanceInfo) ServiceBindingResponse
type ServiceBindingResponseCredentials ¶
type ServiceBindingResponseCredentials struct { URI string `json:"uri"` URL string `json:"url"` DatabaseURI string `json:"database_uri"` APIKey string `json:"apikey"` Username string `json:"username"` Password string `json:"password"` Database string `json:"database"` Scheme string `json:"scheme"` Host string `json:"host"` Hostname string `json:"hostname"` Port int `json:"port"` }
type ServiceCatalog ¶
type ServiceCatalog struct {
Services []Service `json:"services" yaml:"services"`
}
func LoadServiceCatalog ¶
func LoadServiceCatalog(filename string) *ServiceCatalog
type ServiceInstanceFetchResponse ¶
type ServiceInstanceFetchResponse struct { ServiceID string `json:"service_id,omitempty"` PlanID string `json:"plan_id,omitempty"` DashboardURL string `json:"dashboard_url"` Parameters ServiceInstanceFetchResponseParameters `json:"parameters"` }
type ServiceInstanceProvisioningResponse ¶
type ServiceInstanceProvisioningResponse struct {
DashboardURL string `json:"dashboard_url"`
}
type ServicePlan ¶
type ServicePlan struct { ID string `json:"id" yaml:"id"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Free bool `json:"free" yaml:"free"` Bindable bool `json:"bindable" yaml:"bindable"` Metadata struct { DisplayName string `json:"displayName" yaml:"displayName"` ImageURL string `json:"imageUrl" yaml:"imageUrl"` Costs []struct { Amount struct { USDollar float64 `json:"usd" yaml:"usd"` } `json:"amount" yaml:"amount"` Unit string `json:"unit" yaml:"unit"` } `json:"costs" yaml:"costs"` Bullets []string `json:"bullets" yaml:"bullets"` DedicatedService bool `json:"dedicatedService" yaml:"dedicatedService"` HighAvailability bool `json:"highAvailability" yaml:"highAvailability"` } `json:"metadata" yaml:"metadata"` }
Click to show internal directories.
Click to hide internal directories.