Documentation ¶
Index ¶
- Constants
- Variables
- type BasicAuthTransport
- type Client
- type SSLTransport
- type ServiceManagerClient
- func (c *ServiceManagerClient) ActivateCredentials(ctx context.Context, credentialsID string) error
- func (c *ServiceManagerClient) GetBrokers(ctx context.Context) ([]*types.ServiceBroker, error)
- func (c *ServiceManagerClient) GetPlans(ctx context.Context) ([]*types.ServicePlan, error)
- func (c *ServiceManagerClient) GetServiceOfferings(ctx context.Context) ([]*types.ServiceOffering, error)
- func (c *ServiceManagerClient) GetVisibilities(ctx context.Context, planIDs []string) ([]*types.Visibility, error)
- func (c *ServiceManagerClient) PutCredentials(ctx context.Context, credentials *types.BrokerPlatformCredential, force bool) (*types.BrokerPlatformCredential, error)
- type Settings
Constants ¶
const READY_TRUE_FIELD_QUERY = "ready eq true"
Variables ¶
var ErrBrokerPlatformCredentialsNotFound = errors.New("credentials not found")
ErrBrokerPlatformCredentialsNotFound error returned from SM when the given broker platform credentials id does not exist
var ErrConflictingBrokerPlatformCredentials = errors.New("conflicting broker platform credentials")
ErrConflictingBrokerPlatformCredentials error returned from SM when broker platform credentials already exist
Functions ¶
This section is empty.
Types ¶
type BasicAuthTransport ¶
type BasicAuthTransport struct { Username string Password string Rt http.RoundTripper }
BasicAuthTransport implements http.RoundTripper interface and intercepts that request that is being sent, adding basic authorization and delegates back to the original transport.
type Client ¶
type Client interface { GetBrokers(ctx context.Context) ([]*types.ServiceBroker, error) GetVisibilities(ctx context.Context, planIDs []string) ([]*types.Visibility, error) GetPlans(ctx context.Context) ([]*types.ServicePlan, error) GetServiceOfferings(ctx context.Context) ([]*types.ServiceOffering, error) PutCredentials(ctx context.Context, credentials *types.BrokerPlatformCredential, force bool) (*types.BrokerPlatformCredential, error) ActivateCredentials(ctx context.Context, credentialsID string) error }
Client provides the logic for calling into the Service Manager
type SSLTransport ¶ added in v0.11.3
type SSLTransport struct { SkipSslValidation bool TLSCertificates []tls.Certificate Rt http.RoundTripper }
SSLTransport implements http.RoundTripper and sets the SSL transport
type ServiceManagerClient ¶ added in v0.1.1
type ServiceManagerClient struct {
// contains filtered or unexported fields
}
ServiceManagerClient allows consuming Service Manager APIs
func NewClient ¶
func NewClient(config *Settings) (*ServiceManagerClient, error)
NewClient builds a new Service Manager Client from the provided configuration
func (*ServiceManagerClient) ActivateCredentials ¶ added in v0.11.3
func (c *ServiceManagerClient) ActivateCredentials(ctx context.Context, credentialsID string) error
ActivateCredentials notifies Service Manager that the new broker credentials are valid and verified
func (*ServiceManagerClient) GetBrokers ¶ added in v0.1.1
func (c *ServiceManagerClient) GetBrokers(ctx context.Context) ([]*types.ServiceBroker, error)
GetBrokers calls the Service Manager in order to obtain all brokers that need to be registered in the service broker proxy
func (*ServiceManagerClient) GetPlans ¶ added in v0.2.0
func (c *ServiceManagerClient) GetPlans(ctx context.Context) ([]*types.ServicePlan, error)
GetPlans returns plans from Service Manager
func (*ServiceManagerClient) GetServiceOfferings ¶ added in v0.9.1
func (c *ServiceManagerClient) GetServiceOfferings(ctx context.Context) ([]*types.ServiceOffering, error)
GetServiceOfferings returns service offerings from Service Manager
func (*ServiceManagerClient) GetVisibilities ¶ added in v0.2.0
func (c *ServiceManagerClient) GetVisibilities(ctx context.Context, planIDs []string) ([]*types.Visibility, error)
GetVisibilities returns plan visibilities from Service Manager
func (*ServiceManagerClient) PutCredentials ¶ added in v0.9.0
func (c *ServiceManagerClient) PutCredentials(ctx context.Context, credentials *types.BrokerPlatformCredential, force bool) (*types.BrokerPlatformCredential, error)
PutCredentials sends new broker platform credentials to Service Manager
type Settings ¶
type Settings struct { User string Password string URL string OSBAPIPath string `mapstructure:"osb_api_path"` NotificationsAPIPath string `mapstructure:"notifications_api_path"` RequestTimeout time.Duration `mapstructure:"request_timeout"` SkipSSLValidation bool `mapstructure:"skip_ssl_validation"` VisibilitiesPageSize int `mapstructure:"visibilities_page_size"` TLSClientKey string `mapstructure:"tls_client_id"` TLSClientCertificate string `mapstructure:"tls_client_certificate"` Transport http.RoundTripper }
Settings type holds SM Client config properties
func DefaultSettings ¶
func DefaultSettings() *Settings
DefaultSettings builds a default Service Manager Settings
func NewSettings ¶
func NewSettings(env env.Environment) (*Settings, error)
NewSettings builds a Service Manager Settings from the provided Environment
func (*Settings) GetCertificates ¶ added in v0.11.3
func (c *Settings) GetCertificates() ([]tls.Certificate, error)
GetCertificates returns the client TLS certificates if configured