Documentation ¶
Index ¶
- func IsActiveOperationInProgressError(err error) bool
- func IsAlreadyExistsError(err error) bool
- func IsNotFoundError(err error) bool
- func RunTLS(ctx context.Context, addr string, cert string, key string) error
- type BindInProgressResponseDTO
- type BindParametersDTO
- type BindSuccessResponseDTO
- type CatalogSuccessResponseDTO
- type DeprovisionSuccessResponseDTO
- type LastOperationSuccessResponseDTO
- type OSBContextMiddleware
- type OsbContext
- type ProvisionRequestDTO
- type ProvisionSuccessResponseDTO
- type RequireAsyncMiddleware
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsActiveOperationInProgressError ¶ added in v1.1.0
IsActiveOperationInProgressError checks if errors is BadRequest one.
func IsAlreadyExistsError ¶ added in v1.1.0
IsAlreadyExistsError checks if errors is BadRequest one.
func IsNotFoundError ¶
IsNotFoundError check if error is NotFound one.
Types ¶
type BindInProgressResponseDTO ¶ added in v1.1.0
type BindInProgressResponseDTO struct {
Operation *internal.OperationID `json:"operation,omitempty"`
}
BindInProgressResponseDTO represents response with operation for service binding in progress
type BindParametersDTO ¶
type BindParametersDTO struct { ServiceID internal.ServiceID `json:"service_id"` PlanID internal.ServicePlanID `json:"plan_id"` Parameters map[string]interface{} `json:"parameters,omitempty"` Context contextDTO `json:"context,omitempty"` }
BindParametersDTO contains parameters sent by Service Catalog in the body of bind request.
func (*BindParametersDTO) Validate ¶
func (params *BindParametersDTO) Validate() error
Validate checks if bind parameters aren't empty
type BindSuccessResponseDTO ¶
type BindSuccessResponseDTO struct { // Credentials is a free-form hash of credentials that can be used by // applications or users to access the service. Credentials map[string]interface{} `json:"credentials,omitempty"` }
BindSuccessResponseDTO represents response with credentials for service instance after successful binding
type CatalogSuccessResponseDTO ¶
type CatalogSuccessResponseDTO struct{}
CatalogSuccessResponseDTO represents info about successful catalog response TODO: implement me based on osb.CatalogResponse
type DeprovisionSuccessResponseDTO ¶
type DeprovisionSuccessResponseDTO struct {
Operation *internal.OperationID `json:"operation,omitempty"`
}
DeprovisionSuccessResponseDTO represents response after successful deprovisioning
type LastOperationSuccessResponseDTO ¶
type LastOperationSuccessResponseDTO struct { State internal.OperationState `json:"state"` Description *string `json:"description,omitempty"` }
LastOperationSuccessResponseDTO represents info response about last successful operation
type OSBContextMiddleware ¶
type OSBContextMiddleware struct{}
OSBContextMiddleware implements Handler interface
func (OSBContextMiddleware) ServeHTTP ¶
func (OSBContextMiddleware) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeHTTP adds content of Open Service Broker Api headers to the requests
type OsbContext ¶
type OsbContext struct { APIVersion string OriginatingIdentity string BrokerNamespace internal.Namespace }
OsbContext contains data sent in X-Broker-API-Version and X-Broker-API-Originating-Identity HTTP headers.
type ProvisionRequestDTO ¶
type ProvisionRequestDTO struct { ServiceID internal.ServiceID `json:"service_id"` PlanID internal.ServicePlanID `json:"plan_id"` OrganizationGUID string `json:"organization_guid"` SpaceGUID string `json:"space_guid"` Parameters map[string]interface{} `json:"parameters,omitempty"` Context contextDTO `json:"context,omitempty"` }
ProvisionRequestDTO represents provision request
func (*ProvisionRequestDTO) Validate ¶
func (params *ProvisionRequestDTO) Validate() error
Validate validates necessary provisioning parameters
type ProvisionSuccessResponseDTO ¶
type ProvisionSuccessResponseDTO struct { DashboardURL *string `json:"dashboard_url"` Operation *internal.OperationID `json:"operation,omitempty"` }
ProvisionSuccessResponseDTO represents response after successful provisioning
type RequireAsyncMiddleware ¶
type RequireAsyncMiddleware struct{}
RequireAsyncMiddleware asserts if request allows for asynchronous response
func (RequireAsyncMiddleware) ServeHTTP ¶
func (RequireAsyncMiddleware) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeHTTP handling asynchronous HTTP requests in Open Service Broker Api
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements HTTP server used to serve OSB API for helm broker.
func New ¶
func New(bs addonStorage, cs chartStorage, os operationStorage, bos bindOperationStorage, is instanceStorage, ibd instanceBindDataStorage, bindTmplRenderer bindTemplateRenderer, bindTmplResolver bindTemplateResolver, hc helmClient, log *logrus.Entry) *Server
New creates instance of broker.
func (*Server) Addr ¶
Addr returns address server is listening on. Its use is targeted for cases when address is not known, e.g. tests.
func (*Server) CreateHandler ¶
CreateHandler creates an http handler