Documentation ¶
Index ¶
Constants ¶
const ( APIInternalBrokers = "%s" + web.BrokersURL APIVisibilities = "%s" + web.VisibilitiesURL APIPlans = "%s" + web.ServicePlansURL )
APIInternalBrokers is the SM API for obtaining the brokers for this proxy
Variables ¶
This section is empty.
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 Broker ¶
type Broker struct { ID string `json:"id"` BrokerURL string `json:"broker_url"` ServiceOfferings []types.ServiceOffering `json:"services"` Metadata map[string]json.RawMessage `json:"metadata,omitempty"` }
Broker type used for responses from the Service Manager client
type Brokers ¶
type Brokers struct {
Brokers []Broker `json:"service_brokers"`
}
Brokers type used for responses from the Service Manager client
type Client ¶
type Client interface { GetBrokers(ctx context.Context) ([]Broker, error) GetVisibilities(ctx context.Context) ([]*types.Visibility, error) GetPlans(ctx context.Context) ([]*types.ServicePlan, error) }
Client provides the logic for calling into the Service Manager
type ServiceManagerClient ¶ added in v0.1.1
type ServiceManagerClient struct {
// contains filtered or unexported fields
}
ServiceManagerClient allows consuming APIs from a Service Manager
func NewClient ¶
func NewClient(config *Settings) (*ServiceManagerClient, error)
NewClient builds a new Service Manager Client from the provided configuration
func (*ServiceManagerClient) GetBrokers ¶ added in v0.1.1
func (c *ServiceManagerClient) GetBrokers(ctx context.Context) ([]Broker, 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) GetVisibilities ¶ added in v0.2.0
func (c *ServiceManagerClient) GetVisibilities(ctx context.Context) ([]*types.Visibility, error)
GetVisibilities returns plan visibilities from Service Manager
type Settings ¶
type Settings struct { User string Password string URL string OSBAPIPath string `mapstructure:"osb_api_path"` RequestTimeout time.Duration `mapstructure:"request_timeout"` ResyncPeriod time.Duration `mapstructure:"resync_period"` SkipSSLValidation bool `mapstructure:"skip_ssl_validation"` 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
type SkipSSLTransport ¶
type SkipSSLTransport struct { SkipSslValidation bool Rt http.RoundTripper }
SkipSSLTransport implements http.RoundTripper and sets the SSL Validation to match the provided property