package
0.0.0-20220301123542-b80afe73ff9e
Repository: https://github.com/couchbase/service-broker.git
Documentation: pkg.go.dev
# Functions
Assert asserts a condition holds, causing test failure if it doesn't.
CreateServiceInstanceQuery creates a query string for use with the service instance creation.
DefaultClient creates a HTTP client for use against the service broker.
DefaultRequest creates a HTTP request object for the requested method on a path.
DefaultRequestWithBody creates a HTTP request object for the requested method on a path.
Delete does a DELETE API call and expects a certain response.
DeleteAndError does a DELETE API call and expects a certain response with a valid JSON error.
DeleteServiceBindingQuery creates a query string for use with the service binding deletion API.
DeleteServiceInstanceQuery creates a query string for use with the service instance deletion API.
DoRequest performs a requests against the broker API with the provided client.
Get does a GET API call and expects a certain response.
GetAndError does a GET API call and expects a certain response with a valid JSON error.
MatchHeader checks if the header exists with the specified value.
MustBasicRequest creates a HTTP request object for the requested method on a path.
MustCreateServiceBinding wraps up service binding creation.
MustCreateServiceBrokerConfig creates the service broker configuration file with a user specified one.
MustCreateServiceInstance wraps up service instance creation.
MustCreateServiceInstanceSuccessfully wraps up service instance creation and polling.
MustDefaultClient creates a HTTP client for use against the service broker.
MustDefaultRequest creates a HTTP request object for the requested method on a path.
MustDefaultRequestWithBody creates a HTTP request object for the requested method on a path.
MustDelete does a DELETE API call and expects a certain response.
MustDeleteAndError does a DELETE API call and expects a certain response with a valid JSON error.
MustDeleteServiceBinding wraps up service binding deletion.
MustDeleteServiceBrokerConfig deletes the service broker configuration file.
MustDeleteServiceInstance wraps up service instance deletion.
MustDeleteServiceInstanceSuccessfully wraps up service instance deletion and polling.
MustDoRequest performs a requests against the broker API with the provided client.
MustGet does a GET API call and expects a certain response.
MustGetAndError does a GET API call and expects a certain response with a valid JSON error.
MustGetRegistryEntry returns the registry entry for a service instance.
MustHaveRegistryEntriesTLS checks that the requested entries corresponding to a certificate and key pair exist and they are valid.
MustHaveRegistryEntriesTLSAndVerify checks that the requested entries corresponding to a certificate and key pair exist and they are valid against a CA.
MustHaveRegistryEntryPassword checks a registry entry exists and is valid for a password.
MustHaveRegistryEntryWithValue checks a registry entry exists.
MustNotDoRequest performs a requests against the broker API with the provided client.
MustNotHaveRegistryEntry checks a registry entry doesn't exist.
MustPatch does a PATCH API call and expects a certain response.
MustPatchAndError does a PATCH API call and expects a certain response with a valid JSON error.
MustPollServiceInstanceForCompletion wraps up service instance poll.
MustPollServiceInstanceForDeletion wraps up polling for an aysnc deletion.
MustPut does a PUT API call and expects a certain response.
MustPutAndError does a PUT API call and expects a certain response with a valid JSON error.
MustReplaceBrokerConfig updates the service broker configuration and waits for the broker to acquire the write lock and update the configuration to make it live.
MustReplaceBrokerConfigWithInvalidCondition will updata the configuration and then ensure that the broker has registered it is invalid.
ResetDynamicClient deletes any objects created by template rendering.
MustUpdateBrokerConfig updates the service broker configuration with a typesafe callback.
MustUpdateServiceInstance wraps up service instance creation.
MustUpdateServiceInstanceSuccessfully wraps up service instance update and polling.
MustVerifyStatusCode verifies the HTTP status code is as expected.
MustWaitFor waits until a condition is nil.
NewClients creates a new set of fake clients for use by testing.
Patch does a PATCH API call and expects a certain response.
PatchAndError does a PATCH API call and expects a certain response with a valid JSON error.
PollServiceInstanceQuery creates a query string for use with the service instance polling API.
Put does a PUT API call and expects a certain response.
PutAndError does a PUT API call and expects a certain response with a valid JSON error.
ReadServiceInstanceQuery creates a query string for use with the service instance get API.
ResetClients resets clients back to a pristine state.
ServerRunning is a wait function that checks the server is accepting TCP traffic, and responding with a good status to the readiness check endpoint.
ServiceBindingURI generates a URI (path + query) to operate on a service binding.
ServiceInstancePollURI generates a URI (path + query) to operate on a service instance polling.
ServiceInstanceURI generates a URI (path + query) to operate on a service instance.
UpdateServiceInstanceQuery creates a query string for use with the service instance update.
VerifyStatusCode verifies the HTTP status code is as expected.
WaitFor waits until a condition is nil.
# Constants
CA is the CA for the server certificate.
Cert is a valid for "DNS:localhost" until 2022-05-26.
Key is the private key for cert.
Namespace is the default namespace, that isn't default.
QueryOperation is the operation ID identifier used in a query.
QueryPlanID is the plan ID identifier used in a query.
QueryServiceID is the service ID identifier used in a query.
Token is the default OAuth bearer token.
# Variables
DefaultBrokerConfig is a minimal service broker config to allow initialization.