Documentation ¶
Index ¶
- Constants
- func DirExists(path string) bool
- func FileExists(path string) bool
- func ValidInstanceID(id string) error
- func ValidInstancePrefix(s string) error
- type Catalog
- type Config
- type Core
- func (c *Core) API() *route.Router
- func (c *Core) Bind(id, bid string) (string, error)
- func (c *Core) Count(plan *Plan) int
- func (c *Core) Deprovision(id string) (string, bool, error)
- func (c *Core) KeepErrors(n int)
- func (c *Core) OSB() http.Handler
- func (c *Core) OSBBroker() brokerapi.ServiceBroker
- func (c *Core) Provision(inst *Instance) (string, error)
- func (c *Core) Scan() error
- func (c *Core) SetupInfrastructures() error
- func (c *Core) SetupVault() error
- func (c *Core) Unbind(id, bid string) (string, error)
- func (c *Core) UpdateCatalogNumbers()
- func (c *Core) ValidateCatalog() error
- func (c *Core) WaitForVault()
- type Errors
- type Exec
- type File
- type Infrastructure
- type Instance
- func (i *Instance) Bind(id string) (*task, error)
- func (i *Instance) CredentialOverrides() string
- func (i *Instance) Deprovision() (*task, error)
- func (i *Instance) Files() ([]File, error)
- func (i Instance) IsBusy() bool
- func (i Instance) IsGone() bool
- func (i Instance) IsQuiet() bool
- func (i *Instance) Log() string
- func (i *Instance) LookupBinding(id string) error
- func (i *Instance) LookupBindings() error
- func (i *Instance) Provision() (*task, error)
- func (i *Instance) Purge() error
- func (i *Instance) Unbind(id string) (*task, error)
- func (i *Instance) Viable() error
- type MalformedParameterSpec
- type Parameter
- type ParameterValueOutOfRange
- type Plan
- type Service
- type WrongParameterValueType
Constants ¶
View Source
const ( // don't forget to update the api/responses.go copies as well! QuietState = "quiet" ProvisioningState = "provisioning" DeprovisioningState = "deprovisioning" GoneState = "gone" BindingState = "binding" UnbindingState = "unbinding" )
View Source
const ( TextParameter = "text" BytesParameter = "bytes" NumericParameter = "number" DurationParameter = "duration" )
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func ValidInstanceID ¶
func ValidInstancePrefix ¶
Types ¶
type Config ¶
type Config struct { Vault struct { Prefix string `json:"prefix"` URL string `json:"url"` Token string `json:"token"` } `json:"vault"` Prefix string `json:"prefix"` Infrastructures map[string]Infrastructure `json:"infrastructures"` Catalog Catalog `json:"catalog"` }
func ParseConfig ¶
func ReadConfig ¶
type Core ¶
type Core struct { Root string HTTPAuthUsername string HTTPAuthPassword string HTTPAuthRealm string Config Config // contains filtered or unexported fields }
func (*Core) KeepErrors ¶
func (*Core) OSBBroker ¶
func (c *Core) OSBBroker() brokerapi.ServiceBroker
func (*Core) SetupInfrastructures ¶
func (*Core) SetupVault ¶
func (*Core) UpdateCatalogNumbers ¶
func (c *Core) UpdateCatalogNumbers()
func (*Core) ValidateCatalog ¶
func (*Core) WaitForVault ¶
func (c *Core) WaitForVault()
type Infrastructure ¶
type Infrastructure struct { Type string `json:"type"` URL string `json:"url"` ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` CACertificate string `json:"ca_certificate"` KubeConfig string `json:"kubeconfig"` }
func (Infrastructure) Render ¶
func (infra Infrastructure) Render() (string, error)
func (Infrastructure) Valid ¶
func (infra Infrastructure) Valid() error
type Instance ¶
type Instance struct { ID string Plan *Plan State string Root string Prefix string VaultPrefix string UserParameters map[string]interface{} Bindings map[string]map[string]interface{} Tasks []*task }
func (*Instance) CredentialOverrides ¶
func (*Instance) Deprovision ¶
func (*Instance) LookupBinding ¶
func (*Instance) LookupBindings ¶
type MalformedParameterSpec ¶
type MalformedParameterSpec struct {
// contains filtered or unexported fields
}
func (MalformedParameterSpec) Error ¶
func (e MalformedParameterSpec) Error() string
type Parameter ¶
type Parameter struct { Type string `json:"type"` Minimum string `json:"minimum"` Maximum string `json:"maximum"` }
func (Parameter) Wellformed ¶
type ParameterValueOutOfRange ¶
type ParameterValueOutOfRange struct {
// contains filtered or unexported fields
}
func (ParameterValueOutOfRange) Error ¶
func (e ParameterValueOutOfRange) Error() string
type Plan ¶
type Plan struct { Name string `json:"name"` ID string `json:"id"` Description string `json:"description"` Metadata map[string]interface{} `json:"metadata"` Free bool `json:"free"` Bindable bool `json:"bindable"` PlanUpdateable bool `json:"plan_updateable"` MaintenanceInfo struct { Version string `json:"version"` Description string `json:"description"` } `json:"maintenance_info"` Service *Service `json:"-"` Tweed struct { Infrastructure string `json:"infrastructure"` Stencil string `json:"stencil"` Credentials map[string]interface{} `json:"credentials"` // populated by Tweed, to convey actual instance // count information to catalog consumers. Provisioned int `json:"provisioned"` Limit int `json:"limit"` Config map[string]interface{} `json:"config"` Params map[string]Parameter `json:"params"` // populated by Tweed, to make scripting // with the API / CLI --json mode easier. Reference string `json:"reference"` } `json:"tweed"` }
type Service ¶
type Service struct { Name string `json:"name"` ID string `json:"id"` Description string `json:"description"` Tags []string `json:"tags"` Bindable bool `json:"bindable"` InstancesRetrievable bool `json:"instances_retrievable"` BindingsRetrievable bool `json:"bindings_retrievable"` AllowContextUpdates bool `json:"allow_context_updates"` PlanUpdateable bool `json:"plan_updateable"` Metadata map[string]interface{} `json:"metadata"` Plans []*Plan `json:"plans"` }
type WrongParameterValueType ¶
type WrongParameterValueType struct {
// contains filtered or unexported fields
}
func (WrongParameterValueType) Error ¶
func (e WrongParameterValueType) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.