Documentation
¶
Index ¶
- type PlatformClient
- func (pc *PlatformClient) Broker() platform.BrokerClient
- func (pc *PlatformClient) CatalogFetcher() platform.CatalogFetcher
- func (pc *PlatformClient) CreateBroker(ctx context.Context, r *platform.CreateServiceBrokerRequest) (*platform.ServiceBroker, error)
- func (pc *PlatformClient) DeleteBroker(ctx context.Context, r *platform.DeleteServiceBrokerRequest) error
- func (pc *PlatformClient) DisableAccessForPlan(ctx context.Context, request *platform.ModifyPlanAccessRequest) error
- func (pc *PlatformClient) EnableAccessForPlan(ctx context.Context, request *platform.ModifyPlanAccessRequest) error
- func (pc *PlatformClient) Fetch(ctx context.Context, r *platform.UpdateServiceBrokerRequest) error
- func (pc *PlatformClient) GetBrokerByName(ctx context.Context, name string) (*platform.ServiceBroker, error)
- func (pc *PlatformClient) GetBrokerPlatformName(name string) string
- func (pc *PlatformClient) GetBrokers(ctx context.Context) ([]*platform.ServiceBroker, error)
- func (pc *PlatformClient) GetVisibilitiesByBrokers(ctx context.Context, brokers []string) ([]*platform.Visibility, error)
- func (pc *PlatformClient) UpdateBroker(ctx context.Context, r *platform.UpdateServiceBrokerRequest) (*platform.ServiceBroker, error)
- func (pc *PlatformClient) Visibility() platform.VisibilityClient
- func (pc *PlatformClient) VisibilityScopeLabelKey() string
- type ServiceCatalogAPI
- func (sca *ServiceCatalogAPI) CreateClusterServiceBroker(broker *v1beta1.ClusterServiceBroker) (*v1beta1.ClusterServiceBroker, error)
- func (sca *ServiceCatalogAPI) CreateNamespaceServiceBroker(broker *v1beta1.ServiceBroker, namespace string) (*v1beta1.ServiceBroker, error)
- func (sca *ServiceCatalogAPI) CreateSecret(secret *v1core.Secret) (*v1core.Secret, error)
- func (sca *ServiceCatalogAPI) DeleteClusterServiceBroker(name string, options *v1.DeleteOptions) error
- func (sca *ServiceCatalogAPI) DeleteNamespaceServiceBroker(name string, namespace string, options *v1.DeleteOptions) error
- func (sca *ServiceCatalogAPI) DeleteSecret(namespace, name string) error
- func (sca *ServiceCatalogAPI) RetrieveClusterServiceBrokerByName(name string) (*v1beta1.ClusterServiceBroker, error)
- func (sca *ServiceCatalogAPI) RetrieveClusterServiceBrokers() (*v1beta1.ClusterServiceBrokerList, error)
- func (sca *ServiceCatalogAPI) RetrieveNamespaceServiceBrokerByName(name, namespace string) (*v1beta1.ServiceBroker, error)
- func (sca *ServiceCatalogAPI) RetrieveNamespaceServiceBrokers(namespace string) (*v1beta1.ServiceBrokerList, error)
- func (sca *ServiceCatalogAPI) SyncClusterServiceBroker(name string, retries int) error
- func (sca *ServiceCatalogAPI) SyncNamespaceServiceBroker(name, namespace string, retries int) error
- func (sca *ServiceCatalogAPI) UpdateClusterServiceBroker(broker *v1beta1.ClusterServiceBroker) (*v1beta1.ClusterServiceBroker, error)
- func (sca *ServiceCatalogAPI) UpdateNamespaceServiceBroker(broker *v1beta1.ServiceBroker, namespace string) (*v1beta1.ServiceBroker, error)
- func (sca *ServiceCatalogAPI) UpdateServiceBrokerCredentials(secret *v1core.Secret) (*v1core.Secret, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlatformClient ¶
type PlatformClient struct {
// contains filtered or unexported fields
}
PlatformClient implements all broker, visibility and catalog specific operations for kubernetes
func NewClient ¶
func NewClient(settings *config.Settings) (*PlatformClient, error)
NewClient create a client to communicate with the kubernetes service-catalog.
func (*PlatformClient) Broker ¶
func (pc *PlatformClient) Broker() platform.BrokerClient
Broker returns the platform client which handles broker operations
func (*PlatformClient) CatalogFetcher ¶
func (pc *PlatformClient) CatalogFetcher() platform.CatalogFetcher
CatalogFetcher returns the platform client which handles catalog fetch operations
func (*PlatformClient) CreateBroker ¶
func (pc *PlatformClient) CreateBroker(ctx context.Context, r *platform.CreateServiceBrokerRequest) (*platform.ServiceBroker, error)
CreateBroker registers a new broker in kubernetes service-catalog.
func (*PlatformClient) DeleteBroker ¶
func (pc *PlatformClient) DeleteBroker(ctx context.Context, r *platform.DeleteServiceBrokerRequest) error
DeleteBroker deletes an existing broker in from kubernetes service-catalog.
func (*PlatformClient) DisableAccessForPlan ¶
func (pc *PlatformClient) DisableAccessForPlan(ctx context.Context, request *platform.ModifyPlanAccessRequest) error
DisableAccessForPlan disables the access for the specified plan
func (*PlatformClient) EnableAccessForPlan ¶
func (pc *PlatformClient) EnableAccessForPlan(ctx context.Context, request *platform.ModifyPlanAccessRequest) error
EnableAccessForPlan enables the access for the specified plan
func (*PlatformClient) Fetch ¶
func (pc *PlatformClient) Fetch(ctx context.Context, r *platform.UpdateServiceBrokerRequest) error
Fetch the new catalog information from reach service-broker registered in kubernetes, so that it is visible in the kubernetes service-catalog.
func (*PlatformClient) GetBrokerByName ¶
func (pc *PlatformClient) GetBrokerByName(ctx context.Context, name string) (*platform.ServiceBroker, error)
GetBrokerByName returns the service-broker with the specified name currently registered in kubernetes service-catalog with.
func (*PlatformClient) GetBrokerPlatformName ¶ added in v0.8.10
func (pc *PlatformClient) GetBrokerPlatformName(name string) string
GetBrokerPlatformName enforces broker names to be as k8s requires. Name will be later prefixed an suffixed by allowed strings, so we only make sure lowercase and replace underscore with hyphen.
func (*PlatformClient) GetBrokers ¶
func (pc *PlatformClient) GetBrokers(ctx context.Context) ([]*platform.ServiceBroker, error)
GetBrokers returns all service-brokers currently registered in kubernetes service-catalog.
func (*PlatformClient) GetVisibilitiesByBrokers ¶
func (pc *PlatformClient) GetVisibilitiesByBrokers(ctx context.Context, brokers []string) ([]*platform.Visibility, error)
GetVisibilitiesByBrokers get currently available visibilities in the platform for specific broker names
func (*PlatformClient) UpdateBroker ¶
func (pc *PlatformClient) UpdateBroker(ctx context.Context, r *platform.UpdateServiceBrokerRequest) (*platform.ServiceBroker, error)
UpdateBroker updates a service broker in the kubernetes service-catalog.
func (*PlatformClient) Visibility ¶
func (pc *PlatformClient) Visibility() platform.VisibilityClient
Visibility returns the platform client which handles visibility operations
func (*PlatformClient) VisibilityScopeLabelKey ¶
func (pc *PlatformClient) VisibilityScopeLabelKey() string
VisibilityScopeLabelKey returns a specific label key which should be used when converting SM visibilities to platform.Visibilities
type ServiceCatalogAPI ¶
type ServiceCatalogAPI struct { *servicecatalog.SDK // contains filtered or unexported fields }
ServiceCatalogAPI uses service catalog SDK to interact with the kubernetes resources
func NewDefaultKubernetesAPI ¶
func NewDefaultKubernetesAPI(cli *servicecatalog.SDK) *ServiceCatalogAPI
NewDefaultKubernetesAPI returns default kubernetes api interface
func (*ServiceCatalogAPI) CreateClusterServiceBroker ¶
func (sca *ServiceCatalogAPI) CreateClusterServiceBroker(broker *v1beta1.ClusterServiceBroker) (*v1beta1.ClusterServiceBroker, error)
CreateClusterServiceBroker creates a cluster service broker
func (*ServiceCatalogAPI) CreateNamespaceServiceBroker ¶ added in v0.8.6
func (sca *ServiceCatalogAPI) CreateNamespaceServiceBroker(broker *v1beta1.ServiceBroker, namespace string) (*v1beta1.ServiceBroker, error)
CreateNamespaceServiceBroker creates namespace service broker
func (*ServiceCatalogAPI) CreateSecret ¶ added in v0.8.0
CreateSecret creates a secret for broker's credentials
func (*ServiceCatalogAPI) DeleteClusterServiceBroker ¶
func (sca *ServiceCatalogAPI) DeleteClusterServiceBroker(name string, options *v1.DeleteOptions) error
DeleteClusterServiceBroker deletes a cluster service broker
func (*ServiceCatalogAPI) DeleteNamespaceServiceBroker ¶ added in v0.8.6
func (sca *ServiceCatalogAPI) DeleteNamespaceServiceBroker(name string, namespace string, options *v1.DeleteOptions) error
DeleteNamespaceServiceBroker deletes a service broker in a namespace
func (*ServiceCatalogAPI) DeleteSecret ¶ added in v0.8.0
func (sca *ServiceCatalogAPI) DeleteSecret(namespace, name string) error
DeleteSecret deletes broker credentials secret
func (*ServiceCatalogAPI) RetrieveClusterServiceBrokerByName ¶
func (sca *ServiceCatalogAPI) RetrieveClusterServiceBrokerByName(name string) (*v1beta1.ClusterServiceBroker, error)
RetrieveClusterServiceBrokerByName returns a cluster service broker by name
func (*ServiceCatalogAPI) RetrieveClusterServiceBrokers ¶
func (sca *ServiceCatalogAPI) RetrieveClusterServiceBrokers() (*v1beta1.ClusterServiceBrokerList, error)
RetrieveClusterServiceBrokers returns all cluster service brokers
func (*ServiceCatalogAPI) RetrieveNamespaceServiceBrokerByName ¶ added in v0.8.6
func (sca *ServiceCatalogAPI) RetrieveNamespaceServiceBrokerByName(name, namespace string) (*v1beta1.ServiceBroker, error)
RetrieveNamespaceServiceBrokerByName gets a service broker in a namespace
func (*ServiceCatalogAPI) RetrieveNamespaceServiceBrokers ¶ added in v0.8.6
func (sca *ServiceCatalogAPI) RetrieveNamespaceServiceBrokers(namespace string) (*v1beta1.ServiceBrokerList, error)
RetrieveNamespaceServiceBrokers gets all service brokers in a namespace
func (*ServiceCatalogAPI) SyncClusterServiceBroker ¶
func (sca *ServiceCatalogAPI) SyncClusterServiceBroker(name string, retries int) error
SyncClusterServiceBroker synchronizes a cluster service broker including its catalog
func (*ServiceCatalogAPI) SyncNamespaceServiceBroker ¶ added in v0.8.6
func (sca *ServiceCatalogAPI) SyncNamespaceServiceBroker(name, namespace string, retries int) error
SyncNamespaceServiceBroker synchronize a service broker in a namespace
func (*ServiceCatalogAPI) UpdateClusterServiceBroker ¶
func (sca *ServiceCatalogAPI) UpdateClusterServiceBroker(broker *v1beta1.ClusterServiceBroker) (*v1beta1.ClusterServiceBroker, error)
UpdateClusterServiceBroker updates a cluster service broker
func (*ServiceCatalogAPI) UpdateNamespaceServiceBroker ¶ added in v0.8.6
func (sca *ServiceCatalogAPI) UpdateNamespaceServiceBroker(broker *v1beta1.ServiceBroker, namespace string) (*v1beta1.ServiceBroker, error)
UpdateNamespaceServiceBroker updates a service broker in a namespace
func (*ServiceCatalogAPI) UpdateServiceBrokerCredentials ¶ added in v0.8.6
func (sca *ServiceCatalogAPI) UpdateServiceBrokerCredentials(secret *v1core.Secret) (*v1core.Secret, error)
UpdateServiceBrokerCredentials updates broker's credentials secret