Documentation ¶
Index ¶
- Variables
- type APIHelper
- func (api *APIHelper) CheckApp(mapp App, rservices IServices, spaceguid string, create bool) (ImportedApp, error)
- func (api *APIHelper) CheckOrg(name string, create bool) (ImportedOrg, error)
- func (api *APIHelper) CheckServiceInstance(service Service, spaceguid string, create bool) (ImportedService, error)
- func (api *APIHelper) CheckSpace(name string, orgguid string, create bool) (ImportedSpace, error)
- func (api *APIHelper) GetBlob(orgname string, spacename string, blobURL string, filename string, ...)
- func (api *APIHelper) GetDomainGuid(name string) (string, error)
- func (api *APIHelper) GetOrg(name string) (Organization, error)
- func (api *APIHelper) GetOrgQuota() (Quotas, error)
- func (api *APIHelper) GetOrgSpaces(spacesURL string) (Spaces, error)
- func (api *APIHelper) GetOrgs() (Orgs, error)
- func (api *APIHelper) GetQuotaMemoryLimit(quotaURL string) (float64, error)
- func (api *APIHelper) GetSecurityGroups() (map[string]SecurityGroup, error)
- func (api *APIHelper) GetServiceInstanceGuid(name string, stype string, spaceguid string) (string, error)
- func (api *APIHelper) GetSpaceAppsAndServices(space Space) (Apps, Services, SecurityGroups, SecurityGroups, error)
- func (api *APIHelper) PutBlob(blobURL string, filename string, swg *sizedwaitgroup.SizedWaitGroup)
- func (api *APIHelper) StartApp(appguid string) error
- type App
- type Apps
- type CFAPIHelper
- type IApps
- type IOrgs
- type IServices
- type ISpaces
- type ImportedApp
- type ImportedOrg
- type ImportedService
- type ImportedSpace
- type Organization
- type Orgs
- type Quota
- type Quotas
- type Rule
- type Rules
- type SecurityGroup
- type SecurityGroups
- type Service
- type Services
- type Space
- type Spaces
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrManagedServiceNotFound = errors.New("managed service not found")
)
View Source
var (
ErrManagedServicePlanNotFound = errors.New("managed service plan not found")
)
View Source
var (
ErrOrgNotFound = errors.New("organization not found")
)
View Source
var (
)Functions ¶
This section is empty.
Types ¶
type APIHelper ¶
type APIHelper struct {
// contains filtered or unexported fields
}
APIHelper implementation
func (*APIHelper) CheckOrg ¶
func (api *APIHelper) CheckOrg(name string, create bool) (ImportedOrg, error)
func (*APIHelper) CheckServiceInstance ¶
func (*APIHelper) CheckSpace ¶
func (*APIHelper) GetBlob ¶
func (api *APIHelper) GetBlob(orgname string, spacename string, blobURL string, filename string, swg *sizedwaitgroup.SizedWaitGroup)
Download file
func (*APIHelper) GetDomainGuid ¶
GetDomainGuid returns a shared domain guid
func (*APIHelper) GetOrg ¶
func (api *APIHelper) GetOrg(name string) (Organization, error)
GetOrg returns a struct that represents critical fields in the JSON
func (*APIHelper) GetOrgQuota ¶
GetOrgQuota returns Quotas
func (*APIHelper) GetOrgSpaces ¶
GetOrgSpaces returns the spaces in an org.
func (*APIHelper) GetQuotaMemoryLimit ¶
GetQuotaMemoryLimit retruns the amount of memory (in MB) that the org is allowed
func (*APIHelper) GetSecurityGroups ¶
func (api *APIHelper) GetSecurityGroups() (map[string]SecurityGroup, error)
GetSecurityGroups returns SecurityGroups
func (*APIHelper) GetServiceInstanceGuid ¶
func (api *APIHelper) GetServiceInstanceGuid(name string, stype string, spaceguid string) (string, error)
GetServiceInstanceGuid returns a service instance guid
func (*APIHelper) GetSpaceAppsAndServices ¶
func (api *APIHelper) GetSpaceAppsAndServices(space Space) (Apps, Services, SecurityGroups, SecurityGroups, error)
GetSpaceAppsAndServices returns the apps and the services in a space
func (*APIHelper) PutBlob ¶
func (api *APIHelper) PutBlob(blobURL string, filename string, swg *sizedwaitgroup.SizedWaitGroup)
Upload file
type App ¶
type App struct { Guid string Name string Memory float64 Instances float64 DiskQuota float64 State string Command string HealthCheckType string HealthCheckTimeout float64 HealthCheckHttpEndpoint string Diego bool EnableSsh bool EnviornmentVar map[string]interface{} ServiceNames []interface{} URLs []interface{} }
App representation
type CFAPIHelper ¶
type CFAPIHelper interface { GetOrgs() (Orgs, error) GetOrg(string) (Organization, error) GetDomainGuid(name string) (string, error) GetServiceInstanceGuid(name string, stype string, spaceguid string) (string, error) GetOrgQuota() (Quotas, error) GetSecurityGroups() (map[string]SecurityGroup, error) GetQuotaMemoryLimit(string) (float64, error) GetOrgSpaces(string) (Spaces, error) GetSpaceAppsAndServices(space Space) (Apps, Services, SecurityGroups, SecurityGroups, error) GetBlob(orgname string, spacename string, blobURL string, filename string, swg *sizedwaitgroup.SizedWaitGroup) PutBlob(blobURL string, filename string, swg *sizedwaitgroup.SizedWaitGroup) CheckOrg(name string, create bool) (ImportedOrg, error) CheckSpace(name string, orgguid string, create bool) (ImportedSpace, error) CheckApp(mapp App, rservices IServices, spaceguid string, create bool) (ImportedApp, error) StartApp(appguid string) error CheckServiceInstance(service Service, spaceguid string, create bool) (ImportedService, error) }
CFAPIHelper to wrap cf curl results
func New ¶
func New(cli plugin.CliConnection) CFAPIHelper
type IApps ¶
type IApps []ImportedApp
type IOrgs ¶
type IOrgs []ImportedOrg
type IServices ¶
type IServices []ImportedService
type ISpaces ¶
type ISpaces []ImportedSpace
type ImportedApp ¶
type ImportedOrg ¶
type ImportedService ¶
type ImportedSpace ¶
type Organization ¶
Organization representation
type Orgs ¶
type Orgs []Organization
type Quota ¶
type Quota struct { Name string NonBasicServicesAllowed bool TotalServices float64 TotalRoutes float64 TotalPrivateDomain float64 MemoryLimit float64 TrialDBAllowed bool InstanceMemoryLimit float64 AppInstanceLimit float64 AppTaskLimit float64 TotalServiceKeys float64 TotalReservedRoutePorts float64 }
type SecurityGroup ¶
type SecurityGroups ¶
type SecurityGroups []SecurityGroup
func GetSecurityGroups ¶
func GetSecurityGroups(api *APIHelper, securityGroupURL string) (SecurityGroups, error)
type Service ¶
type Service struct { InstanceName string Label string ServicePlan string Type string Credentials map[string]interface{} SyslogDrain string }
Service representation
Click to show internal directories.
Click to hide internal directories.