Documentation ¶
Index ¶
- Constants
- Variables
- type BindParams
- type Client
- func (c *Client) Bind(instanceID, serviceID, bindingID string, acceptsIncomplete bool, ...) (string, error)
- func (c *Client) Deprovision(instanceID string, acceptsIncomplete bool) (string, error)
- func (c *Client) GetBinding(instanceID, bindingID string) (*osb.GetBindingResponse, error)
- func (c *Client) Init(repoURL string) error
- func (c *Client) LastBindingOperationState(instanceID, bindingID string) (*osb.LastOperationResponse, error)
- func (c *Client) LastOperationState(instanceID string, operationKey *osb.OperationKey) (*osb.LastOperationResponse, error)
- func (c *Client) ListServices() ([]osb.Service, error)
- func (c *Client) Provision(instanceID, serviceID, planID, namespace string, acceptsIncomplete bool, ...) (string, error)
- func (c *Client) Unbind(instanceID, bindingID string) error
- type MariadbProvider
- type MongodbProvider
- type MySQLProvider
- type Object
- func (o Object) Dig(key string) (interface{}, bool)
- func (o Object) DigString(key string) (string, error)
- func (o Object) DigStringAlt(altKeys []string) (string, error)
- func (o Object) DigStringAltOr(altKeys []string, defaultValue string) (string, error)
- func (o Object) DigStringOr(key string, defaultValue string) (string, error)
- type PostgresProvider
- type Provider
- type ProvisionParams
- type RabbitmqProvider
- type RedisProvider
Constants ¶
const ( InstanceLabel = "minibroker.instance" ServiceKey = "service-id" PlanKey = "plan-id" ProvisionParamsKey = "provision-params" ReleaseNamespaceKey = "release-namespace" HeritageLabel = "heritage" ReleaseLabel = "release" )
const ( OperationNameKey = "last-operation-name" OperationStateKey = "last-operation-state" OperationDescriptionKey = "last-operation-description" )
ConfigMap keys for tracking the last operation
const ( ConcurrencyErrorMessage = "ConcurrencyError" ConcurrencyErrorDescription = "Concurrent modification not supported" )
Error code constants missing from go-open-service-broker-client See https://github.com/pmorie/go-open-service-broker-client/pull/136
const ( OperationPrefixProvision = "provision-" OperationPrefixDeprovision = "deprovision-" OperationPrefixBind = "bind-" )
Last operation name prefixes for various operations
const ( BindingKeyPrefix = "binding-" BindingStateKeyPrefix = "binding-state-" )
Variables ¶
var ( // ErrDigNotFound is the error for a key not found in the Object. ErrDigNotFound = fmt.Errorf("key not found") // ErrDigNotString is the error for a key that is not a string. ErrDigNotString = fmt.Errorf("key is not a string") )
Functions ¶
This section is empty.
Types ¶
type BindParams ¶ added in v1.0.0
type BindParams struct {
Object
}
BindParams is a specialization of Object for binding parameters, ensuring type checking.
func NewBindParams ¶ added in v1.0.0
func NewBindParams(m map[string]interface{}) *BindParams
NewBindParams constructs a new BindParams.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Bind ¶
func (c *Client) Bind(instanceID, serviceID, bindingID string, acceptsIncomplete bool, bindParams *BindParams) (string, error)
Bind the given service instance (of the given service) asynchronously; the binding operation key is returned.
func (*Client) Deprovision ¶
func (*Client) GetBinding ¶ added in v1.0.0
func (c *Client) GetBinding(instanceID, bindingID string) (*osb.GetBindingResponse, error)
func (*Client) LastBindingOperationState ¶ added in v1.0.0
func (c *Client) LastBindingOperationState(instanceID, bindingID string) (*osb.LastOperationResponse, error)
func (*Client) LastOperationState ¶ added in v1.0.0
func (c *Client) LastOperationState(instanceID string, operationKey *osb.OperationKey) (*osb.LastOperationResponse, error)
LastOperationState returns the status of the last asynchronous operation. TODO(f0rmiga): This deserves some polimorphism.
type MariadbProvider ¶
type MariadbProvider struct {
// contains filtered or unexported fields
}
func (MariadbProvider) Bind ¶
func (p MariadbProvider) Bind( services []corev1.Service, _ *BindParams, provisionParams *ProvisionParams, chartSecrets Object, ) (Object, error)
type MongodbProvider ¶
type MongodbProvider struct {
// contains filtered or unexported fields
}
func (MongodbProvider) Bind ¶
func (p MongodbProvider) Bind( services []corev1.Service, _ *BindParams, provisionParams *ProvisionParams, chartSecrets Object, ) (Object, error)
type MySQLProvider ¶
type MySQLProvider struct {
// contains filtered or unexported fields
}
func (MySQLProvider) Bind ¶
func (p MySQLProvider) Bind( services []corev1.Service, _ *BindParams, provisionParams *ProvisionParams, chartSecrets Object, ) (Object, error)
type Object ¶ added in v1.0.0
type Object map[string]interface{}
Object is a wrapper around map[string]interface{} that implements methods for helping with digging and type asserting.
func (Object) Dig ¶ added in v1.0.0
Dig digs the Object based on the provided key. key must be in the format "foo.bar.baz". Each segment represents a level in the Object.
func (Object) DigString ¶ added in v1.0.0
DigString wraps Object.Dig and type-asserts the found key.
func (Object) DigStringAlt ¶ added in v1.0.0
DigStringAlt digs for any of the given keys, returning the first found. It returns an error if none of the alternative keys are found.
func (Object) DigStringAltOr ¶ added in v1.0.0
DigStringAltOr wraps Object.DigStringAlt and returns defaultValue if none of the alternative keys are found.
type PostgresProvider ¶
type PostgresProvider struct {
// contains filtered or unexported fields
}
func (PostgresProvider) Bind ¶
func (p PostgresProvider) Bind( services []corev1.Service, _ *BindParams, provisionParams *ProvisionParams, chartSecrets Object, ) (Object, error)
type Provider ¶
type Provider interface { Bind( service []corev1.Service, bindParams *BindParams, provisionParams *ProvisionParams, chartSecrets Object, ) (Object, error) }
Provider is the interface for the Service Provider. Its methods wrap service-specific logic.
type ProvisionParams ¶ added in v1.0.0
type ProvisionParams struct {
Object
}
ProvisionParams is a specialization of Object for provisioning parameters, ensuring type checking.
func NewProvisionParams ¶ added in v1.0.0
func NewProvisionParams(m map[string]interface{}) *ProvisionParams
NewProvisionParams constructs a new ProvisionParams.
type RabbitmqProvider ¶ added in v1.0.0
type RabbitmqProvider struct {
// contains filtered or unexported fields
}
func (RabbitmqProvider) Bind ¶ added in v1.0.0
func (p RabbitmqProvider) Bind( services []corev1.Service, _ *BindParams, provisionParams *ProvisionParams, chartSecrets Object, ) (Object, error)
type RedisProvider ¶ added in v0.1.1
type RedisProvider struct {
// contains filtered or unexported fields
}
func (RedisProvider) Bind ¶ added in v0.1.1
func (p RedisProvider) Bind( services []corev1.Service, _ *BindParams, _ *ProvisionParams, chartSecrets Object, ) (Object, error)