Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOperationURL ¶
func BuildURL ¶
func BuildURL(baseURL string, q *Parameters) string
BuildURL builds the url with provided query parameters
func ExtractBindingID ¶
func ExtractInstanceID ¶
Types ¶
type Client ¶
type Client interface {
ListInstances(*Parameters) (*types.ServiceInstances, error)
GetInstanceByID(string, *Parameters) (*types.ServiceInstance, error)
UpdateInstance(id string, updatedInstance *types.ServiceInstance, serviceName string, planName string, q *Parameters) (*types.ServiceInstance, string, error)
Provision(*types.ServiceInstance, string, string, *Parameters) (string, string, error)
Deprovision(string, *Parameters) (string, error)
ListBindings(*Parameters) (*types.ServiceBindings, error)
GetBindingByID(string, *Parameters) (*types.ServiceBinding, error)
Bind(*types.ServiceBinding, *Parameters) (*types.ServiceBinding, string, error)
Unbind(string, *Parameters) (string, error)
ListOfferings(*Parameters) (*types.ServiceOfferings, error)
ListPlans(*Parameters) (*types.ServicePlans, error)
Status(string, *Parameters) (*types.Operation, error)
// Call makes HTTP request to the Service Manager server with authentication.
// It should be used only in case there is no already implemented method for such an operation
Call(method string, smpath string, body io.Reader, q *Parameters) (*http.Response, error)
}
Client should be implemented by SM clients
func NewClient ¶
func NewClient(ctx context.Context, config *ClientConfig, httpClient auth.HTTPClient) Client
NewClientWithAuth returns new SM Client configured with the provided configuration
type ClientConfig ¶
type ClientConfig struct {
URL string
TokenURL string
ClientID string
ClientSecret string
SSLDisabled bool
}
ClientConfig contains the configuration of the Service Manager client
type Parameters ¶
Parameters holds common query parameters
func (*Parameters) Encode ¶
func (p *Parameters) Encode() string
Encode encodes the parameters as URL query parameters
type ServiceManagerError ¶
func (*ServiceManagerError) Error ¶
func (e *ServiceManagerError) Error() string
Click to show internal directories.
Click to hide internal directories.