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) LastOperationOnInstance(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)
- func (b *Broker) UpdateInstance(rw http.ResponseWriter, req *http.Request)
- type Service
- type ServiceBindingResponse
- type ServiceBindingResponseCredentials
- type ServiceBindingResponseEndpoint
- type ServiceBindingResponseParameters
- type ServiceCatalog
- type ServiceInstanceFetchResponse
- type ServiceInstanceFetchResponseParameters
- type ServiceInstanceOperationResponse
- type ServiceInstanceProvisioning
- type ServiceInstanceProvisioningResponse
- type ServiceInstanceUpdate
- type ServiceInstanceUpdateResponse
- type ServicePlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct { Username string Password string APIConfig 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) LastOperationOnInstance ¶
func (b *Broker) LastOperationOnInstance(rw http.ResponseWriter, req *http.Request)
func (*Broker) ProvisionInstance ¶
func (b *Broker) ProvisionInstance(rw http.ResponseWriter, req *http.Request)
func (*Broker) UpdateInstance ¶
func (b *Broker) UpdateInstance(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" yaml:"instances_retrievable"` BindingsRetrievable bool `json:"bindings_retrievable" yaml:"bindings_retrievable"` PlanUpdateable bool `json:"plan_updateable" yaml:"plan_updateable"` Tags []string `json:"tags" yaml:"tags"` Metadata struct { DisplayName string `json:"displayName" yaml:"displayName"` ImageURL string `json:"imageUrl,omitempty" yaml:"imageUrl,omitempty"` 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 ServiceBindingResponse ¶
type ServiceBindingResponse struct { Credentials ServiceBindingResponseCredentials `json:"credentials"` Endpoints []ServiceBindingResponseEndpoint `json:"endpoints"` Parameters ServiceBindingResponseParameters `json:"parameters"` }
type ServiceBindingResponseCredentials ¶
type ServiceBindingResponseCredentials struct { Direct []string `json:"direct"` CLI interface{} `json:"cli,omitempty"` Maps interface{} `json:"maps,omitempty"` SSH interface{} `json:"ssh,omitempty"` Health interface{} `json:"health,omitempty"` Admin interface{} `json:"admin,omitempty"` URI string `json:"uri,omitempty"` URL string `json:"url,omitempty"` DatabaseURI string `json:"database_uri,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Database string `json:"database,omitempty"` Scheme string `json:"scheme,omitempty"` Host string `json:"host,omitempty"` Hostname string `json:"hostname,omitempty"` Port int `json:"port,omitempty"` CACertificate string `json:"ca_certificate,omitempty"` }
type ServiceBindingResponseParameters ¶
type ServiceBindingResponseParameters struct { Deployment api.Deployment `json:"deployment"` Scaling api.Scaling `json:"scaling,omitempty"` }
type ServiceCatalog ¶
type ServiceCatalog struct {
Services []Service `json:"services" yaml:"services"`
}
func LoadServiceCatalog ¶
func LoadServiceCatalog(filename string) *ServiceCatalog
type ServiceInstanceFetchResponse ¶
type ServiceInstanceFetchResponse struct { DashboardURL string `json:"dashboard_url"` Parameters ServiceInstanceFetchResponseParameters `json:"parameters"` }
type ServiceInstanceFetchResponseParameters ¶
type ServiceInstanceFetchResponseParameters struct { Deployment api.Deployment `json:"deployment"` Scaling api.Scaling `json:"scaling"` }
type ServiceInstanceProvisioning ¶
type ServiceInstanceProvisioning struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters struct { AccountID string `json:"account_id"` Datacenter string `json:"datacenter"` Version string `json:"version"` Units int `json:"units"` CacheMode bool `json:"cache_mode"` } `json:"parameters"` }
type ServiceInstanceProvisioningResponse ¶
type ServiceInstanceProvisioningResponse struct {
DashboardURL string `json:"dashboard_url"`
}
type ServiceInstanceUpdate ¶
type ServiceInstanceUpdateResponse ¶
type ServiceInstanceUpdateResponse 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,omitempty" yaml:"imageUrl,omitempty"` 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"` HighAvailability bool `json:"highAvailability" yaml:"highAvailability"` Units int `json:"units" yaml:"units"` CacheMode bool `json:"cache_mode,omitempty" yaml:"cache_mode,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` Datacenter string `json:"datacenter,omitempty" yaml:"datacenter,omitempty"` } `json:"metadata" yaml:"metadata"` }
Click to show internal directories.
Click to hide internal directories.