helper

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBackup added in v0.15.0

func CreateBackup(client compose.Client, deploymentName string)

func DoRequest added in v0.6.0

func DoRequest(server http.Handler, req func() *http.Request, expectedCode int) *httptest.ResponseRecorder

func MongoConnection added in v0.8.0

func MongoConnection(uri, caBase64 string) (*mgo.Session, error)

func NewRequest

func NewRequest(method, path string, body []byte, username, password string, params ...UriParam) func() *http.Request

func NewUUID added in v0.6.0

func NewUUID() string

func PollForOperationCompletion added in v0.6.0

func PollForOperationCompletion(cfg *config.Config, brokerAPI http.Handler, instanceID, serviceID, planID, operation string) string

func ReadResponseBody

func ReadResponseBody(responseBody *bytes.Buffer) []byte

Types

type BindingData added in v0.6.0

type BindingData struct {
	ID          string
	AppID       string
	Credentials struct {
		Name                string   `json:"name"`
		Username            string   `json:"username"`
		Password            string   `json:"password"`
		URI                 string   `json:"uri"`
		URIs                []string `json:"uris"`
		CACertificateBase64 string   `json:"ca_certificate_base64"`
	} `json:"credentials"`
}

type ServiceHelper added in v0.6.0

type ServiceHelper struct {
	ServiceID      string
	PlanID         string
	Catalog        *catalog.Catalog
	Cfg            *config.Config
	Logger         lager.Logger
	BrokerInstance *broker.Broker
	BrokerAPI      http.Handler
	ComposeClient  compose.Client
	Provider       dbengine.Provider
}

func NewService added in v0.6.0

func NewService(serviceID string, planID string, whitelistedIPs []string) (s *ServiceHelper)

func (*ServiceHelper) Bind added in v0.6.0

func (s *ServiceHelper) Bind(instanceID, appID string) (binding *BindingData)

func (*ServiceHelper) Deprovision added in v0.6.0

func (s *ServiceHelper) Deprovision(instanceID string)

func (*ServiceHelper) Provision added in v0.6.0

func (s *ServiceHelper) Provision(params map[string]interface{}) string

func (*ServiceHelper) Unbind added in v0.6.0

func (s *ServiceHelper) Unbind(instanceID, bindingID string)

type UriParam

type UriParam struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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