Documentation ¶
Index ¶
- func ProjectRoot() string
- func RunCommand(bin string, args ...string)
- type AnsibleBroker
- func (a AnsibleBroker) Bind(instanceUUID uuid.UUID, bindingUUID uuid.UUID, req *BindRequest) (*BindResponse, error)
- func (a AnsibleBroker) Bootstrap() (*BootstrapResponse, error)
- func (a AnsibleBroker) Catalog() (*CatalogResponse, error)
- func (a AnsibleBroker) Deprovision(instanceUUID uuid.UUID) (*DeprovisionResponse, error)
- func (a AnsibleBroker) Provision(instanceUUID uuid.UUID, req *ProvisionRequest) (*ProvisionResponse, error)
- func (a AnsibleBroker) Unbind(instanceUUID uuid.UUID, bindingUUID uuid.UUID) error
- func (a AnsibleBroker) Update(instanceUUID uuid.UUID, req *UpdateRequest) (*UpdateResponse, error)
- type BindRequest
- type BindResponse
- type BootstrapResponse
- type Broker
- type CatalogResponse
- type DashboardClient
- type DeprovisionResponse
- type ErrorResponse
- type LastOperationRequest
- type LastOperationResponse
- type LastOperationState
- type Plan
- type ProvisionRequest
- type ProvisionResponse
- type Service
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProjectRoot ¶
func ProjectRoot() string
func RunCommand ¶
Types ¶
type AnsibleBroker ¶
type AnsibleBroker struct {
// contains filtered or unexported fields
}
func NewAnsibleBroker ¶
func NewAnsibleBroker( dao *dao.Dao, log *logging.Logger, clusterConfig ansibleapp.ClusterConfig, registry ansibleapp.Registry, ) (*AnsibleBroker, error)
func (AnsibleBroker) Bind ¶
func (a AnsibleBroker) Bind(instanceUUID uuid.UUID, bindingUUID uuid.UUID, req *BindRequest) (*BindResponse, error)
func (AnsibleBroker) Bootstrap ¶
func (a AnsibleBroker) Bootstrap() (*BootstrapResponse, error)
Loads all known specs from a registry into local storage for reference Potentially a large download; on the order of 10s of thousands TODO: Response here? Async? TODO: How do we handle a large amount of data on this side as well? Pagination?
func (AnsibleBroker) Catalog ¶
func (a AnsibleBroker) Catalog() (*CatalogResponse, error)
func (AnsibleBroker) Deprovision ¶
func (a AnsibleBroker) Deprovision(instanceUUID uuid.UUID) (*DeprovisionResponse, error)
func (AnsibleBroker) Provision ¶
func (a AnsibleBroker) Provision(instanceUUID uuid.UUID, req *ProvisionRequest) (*ProvisionResponse, error)
func (AnsibleBroker) Update ¶
func (a AnsibleBroker) Update(instanceUUID uuid.UUID, req *UpdateRequest) (*UpdateResponse, error)
type BindRequest ¶
type BindRequest struct { ServiceID uuid.UUID `json:"service_id"` PlanID uuid.UUID `json:"plan_id"` AppID uuid.UUID `json:"app_guid,omitempty"` BindResource struct { AppID uuid.UUID `json:"app_guid,omitempty"` Route string `json:"route,omitempty"` } `json:"bind_resource,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` }
type BindResponse ¶
type BootstrapResponse ¶
type BootstrapResponse struct {
SpecCount int
}
TODO: What belongs on this thing?
type Broker ¶
type Broker interface { Bootstrap() (*BootstrapResponse, error) Catalog() (*CatalogResponse, error) Provision(uuid.UUID, *ProvisionRequest) (*ProvisionResponse, error) Update(uuid.UUID, *UpdateRequest) (*UpdateResponse, error) Deprovision(uuid.UUID) (*DeprovisionResponse, error) Bind(uuid.UUID, uuid.UUID, *BindRequest) (*BindResponse, error) Unbind(uuid.UUID, uuid.UUID) error }
type CatalogResponse ¶
type CatalogResponse struct {
Services []Service `json:"services"`
}
type DashboardClient ¶
type DeprovisionResponse ¶
type DeprovisionResponse struct {
Operation string `json:"operation,omitempty"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Description string `json:"description"`
}
type LastOperationRequest ¶
type LastOperationResponse ¶
type LastOperationResponse struct { State LastOperationState `json:"state"` Description string `json:"description,omitempty"` }
type LastOperationState ¶
type LastOperationState string
const ( LastOperationStateInProgress LastOperationState = "in progress" LastOperationStateSucceeded LastOperationState = "succeeded" LastOperationStateFailed LastOperationState = "failed" )
type ProvisionRequest ¶
type ProvisionRequest struct { OrganizationID uuid.UUID `json:"organization_guid"` PlanID uuid.UUID `json:"plan_id"` ServiceID uuid.UUID `json:"service_id"` SpaceID uuid.UUID `json:"space_guid"` Parameters map[string]string `json:"parameters,omitempty"` AcceptsIncomplete bool `json:"accepts_incomplete,omitempty"` }
type ProvisionResponse ¶
type Service ¶
type Service struct { Name string `json:"name"` ID uuid.UUID `json:"id"` Description string `json:"description"` Tags []string `json:"tags,omitempty"` Requires []string `json:"requires,omitempty"` Bindable bool `json:"bindable"` Metadata map[string]interface{} `json:"metadata,omitempty"` DashboardClient *DashboardClient `json:"dashboard_client,omitempty"` PlanUpdatable bool `json:"plan_updateable,omitempty"` Plans []Plan `json:"plans"` }
func SpecToService ¶
func SpecToService(spec *ansibleapp.Spec) Service
TODO: This is going to have to be expanded much more to support things like parameters (will need to get passed through as metadata
type UpdateRequest ¶
type UpdateRequest struct { ServiceID uuid.UUID `json:"service_id"` PlanID uuid.UUID `json:"plan_id,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` PreviousValues struct { PlanID uuid.UUID `json:"plan_id,omitempty"` ServiceID uuid.UUID `json:"service_id,omitempty"` OrganizationID uuid.UUID `json:"organization_id,omitempty"` SpaceID uuid.UUID `json:"space_id,omitempty"` } `json:"previous_values,omitempty"` AcceptsIncomplete bool `json:"accepts_incomplete,omitempty"` }
type UpdateResponse ¶
type UpdateResponse struct {
Operation string `json:"operation,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.