Documentation ¶
Index ¶
- func IsForbiddenError(err error) bool
- func IsNotFoundError(err error) bool
- func RunTLS(ctx context.Context, addr string, cert string, key string) error
- type BindParametersDTO
- type BindSuccessResponseDTO
- type DeprovisionService
- type DeprovisionSuccessResponseDTO
- type ForbiddenError
- type LastOperationSuccessResponseDTO
- type NsBrokerService
- type OSBContextMiddleware
- type ProvisionRequestDTO
- type ProvisionService
- type ProvisionSuccessResponseDTO
- type RequireAsyncMiddleware
- type Server
- type ServiceInstanceFacade
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsForbiddenError ¶
IsForbiddenError checks if error represent Forbidden one.
func IsNotFoundError ¶
IsNotFoundError check if error is NotFound one.
Types ¶
type BindParametersDTO ¶
type BindParametersDTO struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` }
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 DeprovisionService ¶
type DeprovisionService struct {
// contains filtered or unexported fields
}
DeprovisionService performs deprovision action
func NewDeprovisioner ¶
func NewDeprovisioner(instStorage instanceStorage, instanceStateGetter instanceStateGetter, operationInserter operationInserter, operationUpdater operationUpdater, opIDProvider func() (internal.OperationID, error), log logrus.FieldLogger) *DeprovisionService
NewDeprovisioner creates new Deprovisioner
func (*DeprovisionService) Deprovision ¶
func (svc *DeprovisionService) Deprovision(ctx context.Context, osbCtx osbContext, req *v2.DeprovisionRequest) (*v2.DeprovisionResponse, error)
Deprovision action
type DeprovisionSuccessResponseDTO ¶
type DeprovisionSuccessResponseDTO struct {
Operation *internal.OperationID `json:"operation,omitempty"`
}
DeprovisionSuccessResponseDTO represents response after successful deprovisioning
type ForbiddenError ¶
type ForbiddenError struct { }
ForbiddenError represents situation when operation is forbidden
func (*ForbiddenError) Error ¶
func (fe *ForbiddenError) Error() string
func (*ForbiddenError) Forbidden ¶
func (fe *ForbiddenError) Forbidden() bool
Forbidden is a marker method, used in IsForbiddenError method
type LastOperationSuccessResponseDTO ¶
type LastOperationSuccessResponseDTO struct { State internal.OperationState `json:"state"` Description *string `json:"description,omitempty"` }
LastOperationSuccessResponseDTO represents info response about last successful operation
type NsBrokerService ¶
type NsBrokerService struct {
// contains filtered or unexported fields
}
NsBrokerService provides information about AB brokers
func NewNsBrokerService ¶
func NewNsBrokerService() (*NsBrokerService, error)
NewNsBrokerService creates NsBrokerService from configuration
func (*NsBrokerService) GetNsFromBrokerURL ¶
func (bf *NsBrokerService) GetNsFromBrokerURL(url string) (string, error)
GetNsFromBrokerURL extracts namespace from broker URL
func (*NsBrokerService) GetServiceNameForNsBroker ¶
func (bf *NsBrokerService) GetServiceNameForNsBroker(ns string) string
GetServiceNameForNsBroker returns service name for namespaced broker
type OSBContextMiddleware ¶
type OSBContextMiddleware struct {
// contains filtered or unexported fields
}
OSBContextMiddleware implements Handler interface
func NewOsbContextMiddleware ¶
func NewOsbContextMiddleware(brokerService brokerService, log logrus.FieldLogger) *OSBContextMiddleware
NewOsbContextMiddleware created OsbContext middleware
func (*OSBContextMiddleware) ServeHTTP ¶
func (m *OSBContextMiddleware) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeHTTP adds content of Open Service Broker Api headers to the requests
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
type ProvisionService ¶
type ProvisionService struct {
// contains filtered or unexported fields
}
ProvisionService performs provisioning action
func NewProvisioner ¶
func NewProvisioner(instanceInserter instanceInserter, instanceStateGetter instanceStateGetter, operationInserter operationInserter, operationUpdater operationUpdater, accessChecker access.ProvisionChecker, appSvcFinder appSvcFinder, serviceInstanceGetter serviceInstanceGetter, eaClient v1client.ApplicationconnectorV1alpha1Interface, iStateUpdater instanceStateUpdater, operationIDProvider func() (internal.OperationID, error), log logrus.FieldLogger) *ProvisionService
NewProvisioner creates provisioner
func (*ProvisionService) Provision ¶
func (svc *ProvisionService) Provision(ctx context.Context, osbCtx osbContext, req *osb.ProvisionRequest) (*osb.ProvisionResponse, error)
Provision action
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 application broker.
func New ¶
func New(applicationFinder appFinder, instStorage instanceStorage, opStorage operationStorage, accessChecker access.ProvisionChecker, eaClient v1alpha1.ApplicationconnectorV1alpha1Interface, serviceInstanceGetter serviceInstanceGetter, emLister listers.ApplicationMappingLister, brokerService *NsBrokerService, log *logrus.Entry) *Server
New creates instance of broker server.
type ServiceInstanceFacade ¶
type ServiceInstanceFacade struct {
// contains filtered or unexported fields
}
ServiceInstanceFacade expose operations on ServiceInstance objects
func NewServiceInstanceFacade ¶
func NewServiceInstanceFacade(informer cache.SharedIndexInformer) *ServiceInstanceFacade
NewServiceInstanceFacade creates ServiceInstanceFacade
func (*ServiceInstanceFacade) GetByNamespaceAndExternalID ¶
func (f *ServiceInstanceFacade) GetByNamespaceAndExternalID(namespace string, extID string) (*v1beta1.ServiceInstance, error)
GetByNamespaceAndExternalID returns service instance