client

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

CreateBroker registers a new broker in kubernetes service-catalog.

func (*PlatformClient) DeleteBroker

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

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

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

func (sca *ServiceCatalogAPI) CreateSecret(secret *v1core.Secret) (*v1core.Secret, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL