Documentation ¶
Index ¶
- Constants
- func Api(cmd *Commandline)
- func Auth(cmd *Commandline)
- func CheckErr(err error, helpTexts ...string)
- func CleanTargetURI(uri string) string
- func CreateService(cmd *Commandline)
- func CreateServiceKey(cmd *Commandline)
- func DeleteService(cmd *Commandline)
- func DeleteServiceKey(cmd *Commandline)
- func FindService(cmd *Commandline)
- func GetHelpText(command string) string
- func GetUUID() string
- func Login(cmd *Commandline)
- func Logout(cmd *Commandline)
- func Marketplace(cmd *Commandline)
- func Service(cmd *Commandline)
- func ServiceKeys(cmd *Commandline)
- func Services(cmd *Commandline)
- func UpdateService(cmd *Commandline)
- type BindPayload
- type Catalog
- type CatalogService
- type Commandline
- type Config
- type ContextPaylod
- type Credential
- type Credentials
- type CustomPaylod
- type InstanceResource
- type Instances
- type LastState
- type Metadata
- type PreviousUpdateValues
- type ProvisonPayload
- type SBClient
- func (s *SBClient) Bind(data *BindPayload, instanceID string, bindID string) (string, error)
- func (s *SBClient) Catalog() (*Catalog, error)
- func (s *SBClient) Deprovision(data *BindPayload, instanceID string) error
- func (s *SBClient) Instance(instanceId string) (*InstanceResource, error)
- func (s *SBClient) Instances() (*Instances, error)
- func (s *SBClient) Provision(data *ProvisonPayload, instanceID string) error
- func (s *SBClient) SetCredentials(c Credentials)
- func (s *SBClient) TestConnection() error
- func (s *SBClient) UnBind(data *BindPayload, instanceID string, bindID string) error
- func (s *SBClient) UpdateService(data *UpdatePayload, instanceID string) error
- type SBCommand
- type SBError
- type SBFunction
- type ServicePlan
- type UpdatePayload
- type VMDetails
Constants ¶
View Source
const (
ConfigFile = ".sb"
)
View Source
const (
UsageText = "NAME:\n" +
" sb - A command line tool to interact with a9s Service Broker\n" +
"USAGE:\n" +
" sb [global options] command [arguments...] [command options]\n"
)
Variables ¶
This section is empty.
Functions ¶
func Api ¶
func Api(cmd *Commandline)
func Auth ¶
func Auth(cmd *Commandline)
func CleanTargetURI ¶
func CreateService ¶
func CreateService(cmd *Commandline)
func CreateServiceKey ¶
func CreateServiceKey(cmd *Commandline)
func DeleteService ¶
func DeleteService(cmd *Commandline)
func DeleteServiceKey ¶
func DeleteServiceKey(cmd *Commandline)
func FindService ¶
func FindService(cmd *Commandline)
func GetHelpText ¶
func Login ¶
func Login(cmd *Commandline)
func Logout ¶
func Logout(cmd *Commandline)
retreieves all service instances from the service broker
func Marketplace ¶
func Marketplace(cmd *Commandline)
retrieves the available service plans from the service broker
func Service ¶
func Service(cmd *Commandline)
func ServiceKeys ¶
func ServiceKeys(cmd *Commandline)
func Services ¶
func Services(cmd *Commandline)
retreieves all service instances from the service broker
func UpdateService ¶
func UpdateService(cmd *Commandline)
Types ¶
type BindPayload ¶
type Catalog ¶
type Catalog struct { Services []CatalogService `json:"services"` DashboardClient interface{} `json:"dashboard_client"` }
type CatalogService ¶
type CatalogService struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Bindable bool `json:"bindable"` Tags []string `json:"tags"` Plans []ServicePlan `json:"plans"` Metadata struct { } `json:"metadata"` Requires []interface{} `json:"requires"` PlanUpdateable bool `json:"plan_updateable"` }
type Commandline ¶
type Commandline struct { Executable string Command string Options []string NoOptions bool Force bool Plan string Tags string Custom string JSON bool NoFilter bool SkipSslValidation bool Api string Username string }
func NewCommandline ¶
func NewCommandline(options []string) *Commandline
func (*Commandline) Parse ¶
func (c *Commandline) Parse(options []string) (err error)
type ContextPaylod ¶
type Credential ¶
type Credentials ¶
type CustomPaylod ¶
type CustomPaylod struct {
Parameters interface{} `json:"parameters"`
}
type InstanceResource ¶
type InstanceResource struct { ID int `json:"id"` PlanGUID string `json:"plan_guid"` ServiceGUID string `json:"service_guid"` Metadata Metadata `json:"metadata"` DashboardURL interface{} `json:"dashboard_url"` DeploymentName interface{} `json:"deployment_name"` State string `json:"state"` GUIDAtTenant string `json:"guid_at_tenant"` TenantID string `json:"tenant_id"` ProvisionedAt string `json:"provisioned_at"` DeletedAt string `json:"deleted_at"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Credentials []Credential `json:"credentials"` VMDetails interface{} `json:"vm_details"` }
type Instances ¶
type Instances struct { TotalResults int `json:"total_results"` TotalPages int `json:"total_pages"` CurrentPage int `json:"current_page"` PrevURL interface{} `json:"prev_url"` NextURL interface{} `json:"next_url"` Resources []InstanceResource `json:"resources"` }
type PreviousUpdateValues ¶
type ProvisonPayload ¶
type ProvisonPayload struct { OrganizationGUID string `json:"organization_guid"` PlanID string `json:"plan_id"` ServiceID string `json:"service_id"` SpaceGUID string `json:"space_guid"` Parameters interface{} `json:"parameters"` Context ContextPaylod `json:"context"` }
type SBClient ¶
type SBClient struct {
Credentials
}
func NewSBClient ¶
func NewSBClient(cred ...*Credentials) *SBClient
creates the Servicebroker client, in later version the user credentials should be read out of a file
func (*SBClient) Deprovision ¶
func (s *SBClient) Deprovision(data *BindPayload, instanceID string) error
func (*SBClient) Instance ¶
func (s *SBClient) Instance(instanceId string) (*InstanceResource, error)
func (*SBClient) Provision ¶
func (s *SBClient) Provision(data *ProvisonPayload, instanceID string) error
func (*SBClient) SetCredentials ¶
func (s *SBClient) SetCredentials(c Credentials)
func (*SBClient) TestConnection ¶
func (*SBClient) UnBind ¶
func (s *SBClient) UnBind(data *BindPayload, instanceID string, bindID string) error
func (*SBClient) UpdateService ¶
func (s *SBClient) UpdateService(data *UpdatePayload, instanceID string) error
type SBCommand ¶
type SBCommand struct { Name string Shortcut string Helptext string Function SBFunction }
type SBFunction ¶
type SBFunction func(*Commandline)
type ServicePlan ¶
type UpdatePayload ¶
type UpdatePayload struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters interface{} `json:"parameters"` PreviousValues PreviousUpdateValues `json:"previous_values"` Context ContextPaylod `json:"context"` }
type VMDetails ¶
type VMDetails struct { VMIdentifier string `json:"vm_identifier"` CPU interface{} `json:"cpu"` EphemeralDisk interface{} `json:"ephemeral_disk"` PersistentDisk interface{} `json:"persistent_disk"` Memory interface{} `json:"memory"` InstanceType string `json:"instance_type"` Hostname string `json:"hostname"` Role interface{} `json:"role"` }
Click to show internal directories.
Click to hide internal directories.