smclient

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildURL added in v1.10.0

func BuildURL(baseURL string, q *query.Parameters) string

BuildURL builds the url with provided query parameters

Types

type Client

type Client interface {
	GetInfo(*query.Parameters) (*types.Info, error)

	RegisterPlatform(*types.Platform, *query.Parameters) (*types.Platform, error)
	ListPlatforms(*query.Parameters) (*types.Platforms, error)
	UpdatePlatform(string, *types.Platform, *query.Parameters) (*types.Platform, error)
	DeletePlatforms(*query.Parameters) error
	DeletePlatform(id string, q *query.Parameters) (string, error)

	RegisterBroker(*types.Broker, *query.Parameters) (*types.Broker, string, error)
	GetBrokerByID(string, *query.Parameters) (*types.Broker, error)
	ListBrokers(*query.Parameters) (*types.Brokers, error)
	UpdateBroker(string, *types.Broker, *query.Parameters) (*types.Broker, string, error)
	DeleteBroker(string, *query.Parameters) (string, error)

	RegisterVisibility(*types.Visibility, *query.Parameters) (*types.Visibility, error)
	ListVisibilities(*query.Parameters) (*types.Visibilities, error)
	UpdateVisibility(string, *types.Visibility, *query.Parameters) (*types.Visibility, error)
	DeleteVisibilities(*query.Parameters) error

	ListOfferings(*query.Parameters) (*types.ServiceOfferings, error)
	ListPlans(*query.Parameters) (*types.ServicePlans, error)
	GetPlanByID(string, *query.Parameters) (*types.ServicePlan, error)
	ListInstances(*query.Parameters) (*types.ServiceInstances, error)
	GetInstanceByID(string, *query.Parameters) (*types.ServiceInstance, error)
	GetInstanceParameters(string, *query.Parameters) (map[string]interface{}, error)
	UpdateInstance(string, *types.ServiceInstance, *query.Parameters) (*types.ServiceInstance, string, error)
	Provision(*types.ServiceInstance, *query.Parameters) (*types.ServiceInstance, string, error)
	Deprovision(string, *query.Parameters) (string, error)

	ListBindings(*query.Parameters) (*types.ServiceBindings, error)
	GetBindingByID(string, *query.Parameters) (*types.ServiceBinding, error)
	GetBindingParameters(string, *query.Parameters) (map[string]interface{}, error)
	Bind(*types.ServiceBinding, *query.Parameters) (*types.ServiceBinding, string, error)
	Unbind(string, *query.Parameters) (string, error)

	Label(string, string, *types.LabelChanges, *query.Parameters) error

	Status(string, *query.Parameters) (*types.Operation, error)

	Marketplace(*query.Parameters) (*types.Marketplace, 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 *query.Parameters) (*http.Response, error)
}

Client should be implemented by SM clients

func NewClient

func NewClient(ctx context.Context, httpClient auth.Client, URL string) Client

NewClient returns new SM client which will use the http client provided to make calls

func NewClientWithAuth added in v1.5.0

func NewClientWithAuth(httpClient auth.Client, config *ClientConfig) (Client, error)

NewClientWithAuth returns new SM Client configured with the provided configuration

type ClientConfig

type ClientConfig struct {
	URL string

	User         string
	Password     string
	ClientID     string
	ClientSecret string

	SSLDisabled bool
}

ClientConfig contains the configuration of the Service Manager client

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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