Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AsyncOperation
- type BasicAuth
- type Catalog
- type CatalogApiService
- type CatalogGetOpts
- type Configuration
- type DashboardClient
- type Error
- type GenericOpenAPIError
- type LastOperationResource
- type MaintenanceInfo
- type Plan
- type SchemaParameters
- type SchemasObject
- type Service
- type ServiceBindingBindingOpts
- type ServiceBindingGetOpts
- type ServiceBindingLastOperationGetOpts
- type ServiceBindingRequest
- type ServiceBindingResource
- type ServiceBindingResourceObject
- type ServiceBindingResponse
- type ServiceBindingSchemaObject
- type ServiceBindingUnbindingOpts
- type ServiceBindingVolumeMount
- type ServiceBindingVolumeMountDevice
- type ServiceBindingsApiService
- func (a *ServiceBindingsApiService) ServiceBindingBinding(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (ServiceBindingResponse, *http.Response, error)
- func (a *ServiceBindingsApiService) ServiceBindingGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (ServiceBindingResource, *http.Response, error)
- func (a *ServiceBindingsApiService) ServiceBindingLastOperationGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (LastOperationResource, *http.Response, error)
- func (a *ServiceBindingsApiService) ServiceBindingUnbinding(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (map[string]interface{}, *http.Response, error)
- type ServiceInstanceAsyncOperation
- type ServiceInstanceDeprovisionOpts
- type ServiceInstanceGetOpts
- type ServiceInstanceLastOperationGetOpts
- type ServiceInstancePreviousValues
- type ServiceInstanceProvisionOpts
- type ServiceInstanceProvisionRequest
- type ServiceInstanceProvisionResponse
- type ServiceInstanceResource
- type ServiceInstanceSchemaObject
- type ServiceInstanceUpdateOpts
- type ServiceInstanceUpdateRequest
- type ServiceInstancesApiService
- func (a *ServiceInstancesApiService) ServiceInstanceDeprovision(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (map[string]interface{}, *http.Response, error)
- func (a *ServiceInstancesApiService) ServiceInstanceGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (ServiceInstanceResource, *http.Response, error)
- func (a *ServiceInstancesApiService) ServiceInstanceLastOperationGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (LastOperationResource, *http.Response, error)
- func (a *ServiceInstancesApiService) ServiceInstanceProvision(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (ServiceInstanceProvisionResponse, *http.Response, error)
- func (a *ServiceInstancesApiService) ServiceInstanceUpdate(ctx context.Context, xBrokerAPIVersion string, instanceId string, ...) (map[string]interface{}, *http.Response, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { CatalogApi *CatalogApiService ServiceBindingsApi *ServiceBindingsApiService ServiceInstancesApi *ServiceInstancesApiService // contains filtered or unexported fields }
APIClient manages communication with the Open Service Broker API API vmaster - might contain changes that are not yet released In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AsyncOperation ¶
type AsyncOperation struct {
Operation string `json:"operation,omitempty"`
}
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type CatalogApiService ¶
type CatalogApiService service
func (*CatalogApiService) CatalogGet ¶
func (a *CatalogApiService) CatalogGet(ctx context.Context, xBrokerAPIVersion string, localVarOptionals *CatalogGetOpts) (Catalog, *http.Response, error)
type CatalogGetOpts ¶
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type DashboardClient ¶
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type LastOperationResource ¶
type MaintenanceInfo ¶
type Plan ¶
type Plan struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` // See [Service Metadata Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#service-metadata) for more details. Metadata map[string]interface{} `json:"metadata,omitempty"` Free bool `json:"free,omitempty"` Bindable bool `json:"bindable,omitempty"` PlanUpdateable bool `json:"plan_updateable,omitempty"` Schemas SchemasObject `json:"schemas,omitempty"` MaximumPollingDuration int32 `json:"maximum_polling_duration,omitempty"` MaintenanceInfo MaintenanceInfo `json:"maintenance_info,omitempty"` }
type SchemaParameters ¶
type SchemaParameters struct {
Parameters map[string]interface{} `json:"parameters,omitempty"`
}
type SchemasObject ¶
type SchemasObject struct { ServiceInstance ServiceInstanceSchemaObject `json:"service_instance,omitempty"` ServiceBinding ServiceBindingSchemaObject `json:"service_binding,omitempty"` }
type Service ¶
type Service struct { Name string `json:"name"` Id string `json:"id"` Description string `json:"description"` Tags []string `json:"tags,omitempty"` Requires []string `json:"requires,omitempty"` Bindable bool `json:"bindable"` InstancesRetrievable bool `json:"instances_retrievable,omitempty"` BindingsRetrievable bool `json:"bindings_retrievable,omitempty"` AllowContextUpdates bool `json:"allow_context_updates,omitempty"` // See [Service Metadata Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#service-metadata) for more details. Metadata map[string]interface{} `json:"metadata,omitempty"` DashboardClient DashboardClient `json:"dashboard_client,omitempty"` PlanUpdateable bool `json:"plan_updateable,omitempty"` Plans []Plan `json:"plans"` }
type ServiceBindingGetOpts ¶
type ServiceBindingRequest ¶
type ServiceBindingRequest struct { // See [Context Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#context-object) for more details. Context map[string]interface{} `json:"context,omitempty"` ServiceId string `json:"service_id"` PlanId string `json:"plan_id"` AppGuid string `json:"app_guid,omitempty"` BindResource ServiceBindingResourceObject `json:"bind_resource,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` }
type ServiceBindingResource ¶
type ServiceBindingResource struct { Credentials map[string]interface{} `json:"credentials,omitempty"` SyslogDrainUrl string `json:"syslog_drain_url,omitempty"` RouteServiceUrl string `json:"route_service_url,omitempty"` VolumeMounts []ServiceBindingVolumeMount `json:"volume_mounts,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` }
type ServiceBindingResponse ¶
type ServiceBindingResponse struct { Credentials map[string]interface{} `json:"credentials,omitempty"` SyslogDrainUrl string `json:"syslog_drain_url,omitempty"` RouteServiceUrl string `json:"route_service_url,omitempty"` VolumeMounts []ServiceBindingVolumeMount `json:"volume_mounts,omitempty"` }
type ServiceBindingSchemaObject ¶
type ServiceBindingSchemaObject struct {
Create SchemaParameters `json:"create,omitempty"`
}
type ServiceBindingVolumeMount ¶
type ServiceBindingVolumeMount struct { Driver string `json:"driver"` ContainerDir string `json:"container_dir"` Mode string `json:"mode"` DeviceType string `json:"device_type"` Device ServiceBindingVolumeMountDevice `json:"device"` }
type ServiceBindingsApiService ¶
type ServiceBindingsApiService service
func (*ServiceBindingsApiService) ServiceBindingBinding ¶
func (a *ServiceBindingsApiService) ServiceBindingBinding(ctx context.Context, xBrokerAPIVersion string, instanceId string, bindingId string, body ServiceBindingRequest, localVarOptionals *ServiceBindingBindingOpts) (ServiceBindingResponse, *http.Response, error)
func (*ServiceBindingsApiService) ServiceBindingGet ¶
func (a *ServiceBindingsApiService) ServiceBindingGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, bindingId string, localVarOptionals *ServiceBindingGetOpts) (ServiceBindingResource, *http.Response, error)
func (*ServiceBindingsApiService) ServiceBindingLastOperationGet ¶
func (a *ServiceBindingsApiService) ServiceBindingLastOperationGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, bindingId string, localVarOptionals *ServiceBindingLastOperationGetOpts) (LastOperationResource, *http.Response, error)
func (*ServiceBindingsApiService) ServiceBindingUnbinding ¶
type ServiceInstanceGetOpts ¶
type ServiceInstancePreviousValues ¶
type ServiceInstancePreviousValues struct { ServiceId string `json:"service_id,omitempty"` PlanId string `json:"plan_id,omitempty"` OrganizationId string `json:"organization_id,omitempty"` SpaceId string `json:"space_id,omitempty"` MaintenanceInfo MaintenanceInfo `json:"maintenance_info,omitempty"` }
type ServiceInstanceProvisionRequest ¶
type ServiceInstanceProvisionRequest struct { ServiceId string `json:"service_id"` PlanId string `json:"plan_id"` // See [Context Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#context-object) for more details. Context map[string]interface{} `json:"context,omitempty"` OrganizationGuid string `json:"organization_guid"` SpaceGuid string `json:"space_guid"` Parameters map[string]interface{} `json:"parameters,omitempty"` MaintenanceInfo MaintenanceInfo `json:"maintenance_info,omitempty"` }
type ServiceInstanceProvisionResponse ¶
type ServiceInstanceProvisionResponse struct {
DashboardUrl string `json:"dashboard_url,omitempty"`
}
type ServiceInstanceResource ¶
type ServiceInstanceSchemaObject ¶
type ServiceInstanceSchemaObject struct { Create SchemaParameters `json:"create,omitempty"` Update SchemaParameters `json:"update,omitempty"` }
type ServiceInstanceUpdateRequest ¶
type ServiceInstanceUpdateRequest struct { // See [Context Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#context-object) for more details. Context map[string]interface{} `json:"context,omitempty"` ServiceId string `json:"service_id"` PlanId string `json:"plan_id,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` PreviousValues ServiceInstancePreviousValues `json:"previous_values,omitempty"` MaintenanceInfo MaintenanceInfo `json:"maintenance_info,omitempty"` }
type ServiceInstancesApiService ¶
type ServiceInstancesApiService service
func (*ServiceInstancesApiService) ServiceInstanceDeprovision ¶
func (*ServiceInstancesApiService) ServiceInstanceGet ¶
func (a *ServiceInstancesApiService) ServiceInstanceGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, localVarOptionals *ServiceInstanceGetOpts) (ServiceInstanceResource, *http.Response, error)
func (*ServiceInstancesApiService) ServiceInstanceLastOperationGet ¶
func (a *ServiceInstancesApiService) ServiceInstanceLastOperationGet(ctx context.Context, xBrokerAPIVersion string, instanceId string, localVarOptionals *ServiceInstanceLastOperationGetOpts) (LastOperationResource, *http.Response, error)
func (*ServiceInstancesApiService) ServiceInstanceProvision ¶
func (a *ServiceInstancesApiService) ServiceInstanceProvision(ctx context.Context, xBrokerAPIVersion string, instanceId string, body ServiceInstanceProvisionRequest, localVarOptionals *ServiceInstanceProvisionOpts) (ServiceInstanceProvisionResponse, *http.Response, error)
func (*ServiceInstancesApiService) ServiceInstanceUpdate ¶
func (a *ServiceInstancesApiService) ServiceInstanceUpdate(ctx context.Context, xBrokerAPIVersion string, instanceId string, body ServiceInstanceUpdateRequest, localVarOptionals *ServiceInstanceUpdateOpts) (map[string]interface{}, *http.Response, error)
Source Files ¶
- api_catalog.go
- api_service_bindings.go
- api_service_instances.go
- client.go
- configuration.go
- model_async_operation.go
- model_catalog.go
- model_dashboard_client.go
- model_error.go
- model_last_operation_resource.go
- model_maintenance_info.go
- model_plan.go
- model_schema_parameters.go
- model_schemas_object.go
- model_service.go
- model_service_binding_request.go
- model_service_binding_resource.go
- model_service_binding_resource_object.go
- model_service_binding_response.go
- model_service_binding_schema_object.go
- model_service_binding_volume_mount.go
- model_service_binding_volume_mount_device.go
- model_service_instance_async_operation.go
- model_service_instance_previous_values.go
- model_service_instance_provision_request.go
- model_service_instance_provision_response.go
- model_service_instance_resource.go
- model_service_instance_schema_object.go
- model_service_instance_update_request.go
- response.go