Documentation
¶
Index ¶
- Constants
- Variables
- func NumberToInt(number json.Number, defaultValue int) int
- type App
- type AppEntity
- type AppFields
- type AppRequest
- type AppResource
- type AppState
- type AppStats
- type AppSummaryFields
- type Apps
- type Filter
- func (f Filter) Build() (string, error)
- func (f Filter) Eq(target string) Filter
- func (f Filter) Ge(target string) Filter
- func (f Filter) Gt(target string) Filter
- func (f Filter) In(targets ...string) Filter
- func (f Filter) Le(target string) Filter
- func (f Filter) Lt(target string) Filter
- func (f Filter) Name(name string) Filter
- type GenericPaginatedResourcesHandler
- type LastOperationFields
- type MccpServiceAPI
- type Metadata
- type OrgCreateRequest
- type OrgEntity
- type OrgQuota
- type OrgQuotaEntity
- type OrgQuotaFields
- type OrgQuotaMetadata
- type OrgQuotaResource
- type OrgQuotas
- type OrgRegionInformation
- type OrgResource
- type OrgRole
- type OrgRoleEntity
- type OrgRoleResource
- type OrgUpdateRequest
- type Organization
- type OrganizationFields
- type Organizations
- type PrivateDomain
- type PrivateDomainEntity
- type PrivateDomainFields
- type PrivateDomainMetadata
- type PrivateDomainRequest
- type PrivateDomainResource
- type PrivateDomains
- type RegionRepository
- type Resource
- type Route
- type RouteEntity
- type RouteFields
- type RouteFilter
- type RouteMetadata
- type RouteRequest
- type RouteResource
- type RouteUpdateRequest
- type Routes
- type ServiceBinding
- type ServiceBindingEntity
- type ServiceBindingFields
- type ServiceBindingMetadata
- type ServiceBindingRequest
- type ServiceBindingResource
- type ServiceBindings
- type ServiceInstance
- type ServiceInstanceCreateRequest
- type ServiceInstanceEntity
- type ServiceInstanceFields
- type ServiceInstanceMetadata
- type ServiceInstanceResource
- type ServiceInstanceUpdateRequest
- type ServiceInstances
- type ServiceKey
- type ServiceKeyEntity
- type ServiceKeyFields
- type ServiceKeyMetadata
- type ServiceKeyRequest
- type ServiceKeyResource
- type ServiceKeys
- type ServiceOffering
- type ServiceOfferingEntity
- type ServiceOfferingFields
- type ServiceOfferingMetadata
- type ServiceOfferingResource
- type ServiceOfferings
- type ServicePlan
- type ServicePlanEntity
- type ServicePlanFields
- type ServicePlanMetadata
- type ServicePlanResource
- type ServicePlans
- type SharedDomain
- type SharedDomainEntity
- type SharedDomainFields
- type SharedDomainMetadata
- type SharedDomainRequest
- type SharedDomainResource
- type SharedDomains
- type Space
- type SpaceCreateRequest
- type SpaceEntity
- type SpaceFields
- type SpaceMetadata
- type SpaceQuota
- type SpaceQuotaCreateRequest
- type SpaceQuotaEntity
- type SpaceQuotaFields
- type SpaceQuotaMetadata
- type SpaceQuotaResource
- type SpaceQuotaUpdateRequest
- type SpaceQuotas
- type SpaceResource
- type SpaceRole
- type SpaceRoleEntity
- type SpaceRoleResource
- type SpaceUpdateRequest
- type Spaces
- type UploadBitFields
- type UploadBitsEntity
Constants ¶
const ( //ErrCodeAppDoesnotExist ... ErrCodeAppDoesnotExist = "AppADoesnotExist" //AppRunningState ... AppRunningState = "RUNNING" //AppStartedState ... AppStartedState = "STARTED" //AppStagedState ... AppStagedState = "STAGED" //AppPendingState ... AppPendingState = "PENDING" //AppStoppedState ... AppStoppedState = "STOPPED" //AppFailedState ... AppFailedState = "FAILED" //AppUnKnownState ... AppUnKnownState = "UNKNOWN" //DefaultRetryDelayForStatusCheck ... DefaultRetryDelayForStatusCheck = 10 * time.Second )
const ErrCodeAPICreation = "APICreationError"
ErrCodeAPICreation ...
const ErrCodeOrgQuotaDoesnotExist = "OrgQuotaDoesnotExist"
ErrCodeOrgQuotaDoesnotExist ...
const ErrCodeServiceDoesnotExist = "ServiceDoesnotExist"
ErrCodeServiceDoesnotExist ...
const ErrCodeServiceKeyDoesNotExist = "erviceKeyDoesNotExist"
ErrCodeServiceKeyDoesNotExist ...
const ErrCodeServicePlanDoesNotExist = "ServicePlanDoesNotExist"
ErrCodeServicePlanDoesNotExist ...
const ErrCodeSpaceDoesnotExist = "SpaceDoesnotExist"
ErrCodeSpaceDoesnotExist ...
const ErrCodeSpaceQuotaDoesnotExist = "SpaceQuotaDoesnotExist"
ErrCodeSpaceQuotaDoesnotExist ...
Variables ¶
var ( //ErrFilterNameMissing ... ErrFilterNameMissing = errors.New("Filter must have a name") //ErrFilterMissingOp .. ErrFilterMissingOp = errors.New("Filter must have an operator") )
var ErrCodeOrgDoesnotExist = "OrgDoesnotExist"
ErrCodeOrgDoesnotExist ...
var ErrCodePrivateDomainDoesnotExist = "PrivateDomainDoesnotExist"
ErrCodePrivateDomainDoesnotExist ...
var ErrCodeRouteDoesnotExist = "RouteDoesnotExist"
ErrCodeRouteDoesnotExist ...
ErrCodeSharedDomainDoesnotExist ...
Functions ¶
Types ¶
type App ¶
type App struct {
Name string
SpaceGUID string
GUID string
StackGUID string
State string
PackageState string
Memory int
Instances int
DiskQuota int
Version string
BuildPack *string
Command *string
Console bool
Debug *string
StagingTaskID string
HealthCheckType string
HealthCheckTimeout *int
HealthCheckHTTPEndpoint string
Diego bool
DockerImage *string
EnableSSH bool
Ports []int
DockerCredentialsJSON map[string]interface{}
EnvironmentJSON map[string]interface{}
}
App model
type AppEntity ¶
type AppEntity struct {
Name string `json:"name"`
SpaceGUID string `json:"space_guid"`
StackGUID string `json:"stack_guid"`
State string `json:"state"`
PackageState string `json:"package_state"`
Memory int `json:"memory"`
Instances int `json:"instances"`
DiskQuota int `json:"disk_quota"`
Version string `json:"version"`
BuildPack *string `json:"buildpack"`
Command *string `json:"command"`
Console bool `json:"console"`
Debug *string `json:"debug"`
StagingTaskID string `json:"staging_task_id"`
HealthCheckType string `json:"health_check_type"`
HealthCheckTimeout *int `json:"health_check_timeout"`
HealthCheckHTTPEndpoint string `json:"health_check_http_endpoint"`
StagingFailedReason string `json:"staging_failed_reason"`
StagingFailedDescription string `json:"staging_failed_description"`
Diego bool `json:"diego"`
DockerImage *string `json:"docker_image"`
EnableSSH bool `json:"enable_ssh"`
Ports []int `json:"ports"`
DockerCredentialsJSON map[string]interface{} `json:"docker_credentials_json"`
EnvironmentJSON map[string]interface{} `json:"environment_json"`
}
AppEntity ...
type AppRequest ¶
type AppRequest struct {
Name *string `json:"name,omitempty"`
Memory int `json:"memory,omitempty"`
Instances int `json:"instances,omitempty"`
DiskQuota int `json:"disk_quota,omitempty"`
SpaceGUID *string `json:"space_guid,omitempty"`
StackGUID *string `json:"stack_guid,omitempty"`
State *string `json:"state,omitempty"`
DetectedStartCommand *string `json:"detected_start_command,omitempty"`
Command *string `json:"command,omitempty"`
BuildPack *string `json:"buildpack,omitempty"`
HealthCheckType *string `json:"health_check_type,omitempty"`
HealthCheckTimeout int `json:"health_check_timeout,omitempty"`
HealthCheckHTTPEndpoint *string `json:"health_check_http_endpoint,omitempty"`
Diego bool `json:"diego,omitempty"`
EnableSSH bool `json:"enable_ssh,omitempty"`
DockerImage *string `json:"docker_image,omitempty"`
StagingFailedReason *string `json:"staging_failed_reason,omitempty"`
StagingFailedDescription *string `json:"staging_failed_description,omitempty"`
Ports []int `json:"ports,omitempty"`
DockerCredentialsJSON *map[string]interface{} `json:"docker_credentials_json,omitempty"`
EnvironmentJSON *map[string]interface{} `json:"environment_json,omitempty"`
}
AppRequest ...
type AppResource ¶
AppResource ...
type AppSummaryFields ¶
type AppSummaryFields struct {
GUID string `json:"guid"`
Name string `json:"name"`
State string `json:"state"`
PackageState string `json:"package_state"`
RunningInstances int `json:"running_instances"`
}
AppSummaryFields ...
type Apps ¶
type Apps interface {
Create(appPayload AppRequest, opts ...bool) (*AppFields, error)
List() ([]App, error)
Get(appGUID string) (*AppFields, error)
Update(appGUID string, appPayload AppRequest, opts ...bool) (*AppFields, error)
Delete(appGUID string, opts ...bool) error
FindByName(spaceGUID, name string) (*App, error)
Start(appGUID string, timeout time.Duration) (*AppState, error)
Upload(path string, name string, opts ...bool) (*UploadBitFields, error)
Summary(appGUID string) (*AppSummaryFields, error)
Stat(appGUID string) (map[string]AppStats, error)
WaitForAppStatus(waitForThisState, appGUID string, timeout time.Duration) (string, error)
WaitForInstanceStatus(waitForThisState, appGUID string, timeout time.Duration) (string, error)
Instances(appGUID string) (map[string]AppStats, error)
Restage(appGUID string, timeout time.Duration) (*AppState, error)
WaitForStatus(appGUID string, maxWaitTime time.Duration) (*AppState, error)
//Routes related
BindRoute(appGUID, routeGUID string) (*AppFields, error)
ListRoutes(appGUID string) ([]Route, error)
UnBindRoute(appGUID, routeGUID string) error
//Service bindings
ListServiceBindings(appGUID string) ([]ServiceBinding, error)
DeleteServiceBindings(appGUID string, bindingGUIDs ...string) error
}
Apps ...
type GenericPaginatedResourcesHandler ¶
type GenericPaginatedResourcesHandler struct {
// contains filtered or unexported fields
}
func NewCCPaginatedResources ¶
func NewCCPaginatedResources(resource interface{}) GenericPaginatedResourcesHandler
type LastOperationFields ¶
type LastOperationFields struct {
Type string `json:"type"`
State string `json:"state"`
Description string `json:"description"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
LastOperationFields ...
type MccpServiceAPI ¶
type MccpServiceAPI interface {
Organizations() Organizations
Spaces() Spaces
ServiceInstances() ServiceInstances
ServiceKeys() ServiceKeys
ServicePlans() ServicePlans
ServiceOfferings() ServiceOfferings
SpaceQuotas() SpaceQuotas
OrgQuotas() OrgQuotas
Apps() Apps
Routes() Routes
PrivateDomains() PrivateDomains
ServiceBindings() ServiceBindings
Regions() RegionRepository
}
MccpServiceAPI is the mccpv2 client ...
type OrgCreateRequest ¶
type OrgCreateRequest struct {
Name string `json:"name"`
OrgQuotaDefinitionGUID string `json:"quota_definition_guid,omitempty"`
Status string `json:"status,omitempty"`
}
OrgCreateRequest ...
type OrgEntity ¶
type OrgEntity struct {
Name string `json:"name"`
Region string `json:"region"`
BillingEnabled bool `json:"billing_enabled"`
Status string `json:"status"`
OrgQuotaDefinitionGUID string `json:"quota_definition_guid"`
}
OrgEntity ...
type OrgQuota ¶
type OrgQuota struct {
GUID string
Name string
NonBasicServicesAllowed bool
ServicesLimit int
RoutesLimit int
MemoryLimitInMB int64
InstanceMemoryLimitInMB int64
TrialDBAllowed bool
AppInstanceLimit int
PrivateDomainsLimit int
AppTasksLimit int
ServiceKeysLimit int
RoutePortsLimit int
}
OrgQuota ...
type OrgQuotaEntity ¶
type OrgQuotaEntity struct {
Name string `json:"name"`
NonBasicServicesAllowed bool `json:"non_basic_services_allowed"`
ServicesLimit int `json:"total_services"`
RoutesLimit int `json:"total_routes"`
MemoryLimitInMB int64 `json:"memory_limit"`
InstanceMemoryLimitInMB int64 `json:"instance_memory_limit"`
TrialDBAllowed bool `json:"trial_db_allowed"`
AppInstanceLimit json.Number `json:"app_instance_limit"`
PrivateDomainsLimit json.Number `json:"total_private_domains"`
AppTasksLimit json.Number `json:"app_tasks_limit"`
ServiceKeysLimit json.Number `json:"total_service_keys"`
RoutePortsLimit int `json:"total_reserved_route_ports"`
}
OrgQuotaEntity ...
type OrgQuotaFields ¶
type OrgQuotaFields struct {
Metadata OrgQuotaMetadata
Entity OrgQuotaEntity
}
OrgQuotaFields ...
type OrgQuotaMetadata ¶
OrgQuotaMetadata ...
type OrgQuotaResource ¶
type OrgQuotaResource struct {
Resource
Entity OrgQuotaEntity
}
OrgQuotaResource ...
func (OrgQuotaResource) ToFields ¶
func (resource OrgQuotaResource) ToFields() OrgQuota
ToFields ...
type OrgQuotas ¶
type OrgQuotas interface {
FindByName(name string) (*OrgQuota, error)
Get(orgQuotaGUID string) (*OrgQuotaFields, error)
List() ([]OrgQuota, error)
}
OrgQuotas ...
type OrgRegionInformation ¶
type OrgRegionInformation struct {
ID string `json:"id"`
Domain string `json:"domain"`
Name string `json:"name"`
Region string `json:"region"`
DisplayName string `json:"display_name"`
Customer struct {
Name string `json:"name"`
DisplayName string `json:"display_name"`
} `json:"customer"`
Deployment struct {
Name string `json:"name"`
DisplayName string `json:"display_name"`
} `json:"deployment"`
Geo struct {
Name string `json:"name"`
DisplayName string `json:"display_name"`
} `json:"geo"`
Account struct {
GUID string `json:"guid"`
OwnerGUIDs []string `json:"owner_guids"`
} `json:"account"`
PublicRegionsByProximity []string `json:"public_regions_by_proximity"`
ConsoleURL string `json:"console_url"`
CFAPI string `json:"cf_api"`
MCCPAPI string `json:"mccp_api"`
Type string `json:"type"`
Home bool `json:"home"`
Stealth string `json:"stealth"`
Aliases []string `json:"aliases"`
Settings struct {
Devops struct {
Enabled bool `json:"enabled"`
} `json:"devops"`
EnhancedAutoFix bool `json:"enhancedAutofix"`
} `json:"settings"`
OrgName string `json:"org_name"`
OrgGUID string `json:"org_guid"`
}
OrgRegionInformation is the region information associated with an org
type OrgResource ¶
OrgResource ...
type OrgRoleEntity ¶
type OrgRoleEntity struct {
UserGUID string `json:"guid"`
Admin bool `json:"bool"`
UserName string `json:"username"`
}
OrgRoleEntity ...
type OrgRoleResource ¶
type OrgRoleResource struct {
Resource
Entity OrgRoleEntity
}
OrgRoleResource ...
type OrgUpdateRequest ¶
type OrgUpdateRequest struct {
Name *string `json:"name,omitempty"`
OrgQuotaDefinitionGUID string `json:"quota_definition_guid,omitempty"`
}
OrgUpdateRequest ...
type Organization ¶
type Organization struct {
GUID string
Name string
Region string
BillingEnabled bool
Status string
OrgQuotaDefinitionGUID string
}
Organization model
type OrganizationFields ¶
OrganizationFields ...
type Organizations ¶
type Organizations interface {
Create(req OrgCreateRequest, opts ...bool) (*OrganizationFields, error)
Get(orgGUID string) (*OrganizationFields, error)
List(region string) ([]Organization, error)
FindByName(orgName, region string) (*Organization, error)
DeleteByRegion(guid string, region string, opts ...bool) error
Delete(guid string, opts ...bool) error
Update(guid string, req OrgUpdateRequest, opts ...bool) (*OrganizationFields, error)
GetRegionInformation(orgGUID string) ([]OrgRegionInformation, error)
AssociateBillingManager(orgGUID string, userMail string) (*OrganizationFields, error)
AssociateAuditor(orgGUID string, userMail string) (*OrganizationFields, error)
AssociateManager(orgGUID string, userMail string) (*OrganizationFields, error)
AssociateUser(orgGUID string, userMail string) (*OrganizationFields, error)
ListBillingManager(orgGUID string, filters ...string) ([]OrgRole, error)
ListAuditors(orgGUID string, filters ...string) ([]OrgRole, error)
ListManager(orgGUID string, filters ...string) ([]OrgRole, error)
ListUsers(orgGUID string, filters ...string) ([]OrgRole, error)
DisassociateBillingManager(orgGUID string, userMail string) error
DisassociateManager(orgGUID string, userMail string) error
DisassociateAuditor(orgGUID string, userMail string) error
DisassociateUser(orgGUID string, userMail string) error
}
Organizations ...
type PrivateDomain ¶
type PrivateDomain struct {
GUID string
Name string
OwningOrganizationGUID string
OwningOrganizationURL string
}
PrivateDomain model
type PrivateDomainEntity ¶
type PrivateDomainEntity struct {
Name string `json:"name"`
OwningOrganizationGUID string `json:"owning_organization_guid"`
OwningOrganizationURL string `json:"owning_organization_url"`
}
PrivateDomainEntity ...
type PrivateDomainFields ¶
type PrivateDomainFields struct {
Metadata PrivateDomainMetadata
Entity PrivateDomainEntity
}
PrivateDomainFields ...
type PrivateDomainMetadata ¶
PrivateDomaineMetadata ...
type PrivateDomainRequest ¶
type PrivateDomainRequest struct {
Name string `json:"name,omitempty"`
OrgGUID string `json:"owning_organization_guid,omitempty"`
}
PrivateDomainRequest ...
type PrivateDomainResource ¶
type PrivateDomainResource struct {
Resource
Entity PrivateDomainEntity
}
PrivateDomainResource ...
func (PrivateDomainResource) ToFields ¶
func (resource PrivateDomainResource) ToFields() PrivateDomain
ToFields ..
type PrivateDomains ¶
type PrivateDomains interface {
FindByNameInOrg(orgGUID, domainName string) (*PrivateDomain, error)
FindByName(domainName string) (*PrivateDomain, error)
Create(req PrivateDomainRequest, opts ...bool) (*PrivateDomainFields, error)
Get(privateDomainGUID string) (*PrivateDomainFields, error)
Delete(privateDomainGUID string, opts ...bool) error
}
PrivateDomains ...
type RegionRepository ¶
type Route ¶
type Route struct {
GUID string
Host string
Path string
DomainGUID string
SpaceGUID string
ServiceInstanceGUID string
Port *int
DomainURL string
SpaceURL string
AppsURL string
RouteMappingURL string
}
Route model
type RouteEntity ¶
type RouteEntity struct {
Host string `json:"host"`
Path string `json:"path"`
DomainGUID string `json:"domain_guid"`
SpaceGUID string `json:"space_guid"`
ServiceInstanceGUID string `json:"service_instance_guid"`
Port *int `json:"port"`
DomainURL string `json:"domain_url"`
SpaceURL string `json:"space_url"`
AppsURL string `json:"apps_url"`
RouteMappingURL string `json:"route_mapping_url"`
}
RouteEntity ...
type RouteFields ¶
type RouteFields struct {
Metadata RouteMetadata
Entity RouteEntity
}
RouteFields ...
type RouteFilter ¶
RouteFilter ...
type RouteMetadata ¶
RouteMetadata ...
type RouteRequest ¶
type RouteRequest struct {
Host string `json:"host,omitempty"`
SpaceGUID string `json:"space_guid"`
DomainGUID string `json:"domain_guid,omitempty"`
Path string `json:"path,omitempty"`
Port *int `json:"port,omitempty"`
}
RouteRequest ...
type RouteUpdateRequest ¶
type RouteUpdateRequest struct {
Host *string `json:"host,omitempty"`
Path *string `json:"path,omitempty"`
Port *int `json:"port,omitempty"`
}
RouteUpdateRequest ...
type Routes ¶
type Routes interface {
Find(hostname, domainGUID string) ([]Route, error)
Create(req RouteRequest, opts ...bool) (*RouteFields, error)
Get(routeGUID string) (*RouteFields, error)
Update(routeGUID string, req RouteUpdateRequest, opts ...bool) (*RouteFields, error)
Delete(routeGUID string, opts ...bool) error
}
Routes ...
type ServiceBinding ¶
type ServiceBinding struct {
GUID string
ServiceInstanceGUID string
AppGUID string
Credentials map[string]interface{}
}
ServiceBinding model
type ServiceBindingEntity ¶
type ServiceBindingEntity struct {
ServiceInstanceGUID string `json:"service_instance_guid"`
AppGUID string `json:"app_guid"`
Credentials map[string]interface{} `json:"credentials"`
}
ServiceBindingEntity ...
type ServiceBindingFields ¶
type ServiceBindingFields struct {
Metadata ServiceBindingMetadata
Entity ServiceBindingEntity
}
ServiceBindingFields ...
type ServiceBindingMetadata ¶
ServiceBindingMetadata ...
type ServiceBindingRequest ¶
type ServiceBindingRequest struct {
ServiceInstanceGUID string `json:"service_instance_guid"`
AppGUID string `json:"app_guid"`
Parameters string `json:"parameters,omitempty"`
}
ServiceBindingRequest ...
type ServiceBindingResource ¶
type ServiceBindingResource struct {
Resource
Entity ServiceBindingEntity
}
ServiceBindingResource ...
func (ServiceBindingResource) ToFields ¶
func (resource ServiceBindingResource) ToFields() ServiceBinding
ToFields ..
type ServiceBindings ¶
type ServiceBindings interface {
Create(req ServiceBindingRequest) (*ServiceBindingFields, error)
Get(guid string) (*ServiceBindingFields, error)
Delete(guid string, opts ...bool) error
List(filters ...string) ([]ServiceBinding, error)
}
ServiceBindings ...
type ServiceInstance ¶
type ServiceInstance struct {
GUID string
Name string `json:"name"`
Credentials map[string]interface{} `json:"credentials"`
ServicePlanGUID string `json:"service_plan_guid"`
SpaceGUID string `json:"space_guid"`
GatewayData string `json:"gateway_data"`
Type string `json:"type"`
DashboardURL string `json:"dashboard_url"`
LastOperation LastOperationFields `json:"last_operation"`
RouteServiceURL string `json:"routes_url"`
Tags []string `json:"tags"`
SpaceURL string `json:"space_url"`
ServicePlanURL string `json:"service_plan_url"`
ServiceBindingURL string `json:"service_bindings_url"`
ServiceKeysURL string `json:"service_keys_url"`
ServiceKeys []ServiceKeyFields `json:"service_keys"`
ServicePlan ServicePlanFields `json:"service_plan"`
}
ServiceInstance ...
type ServiceInstanceCreateRequest ¶
type ServiceInstanceCreateRequest struct {
Name string `json:"name"`
SpaceGUID string `json:"space_guid"`
PlanGUID string `json:"service_plan_guid"`
Params map[string]interface{} `json:"parameters,omitempty"`
Tags []string `json:"tags,omitempty"`
}
ServiceInstanceCreateRequest ...
type ServiceInstanceEntity ¶
type ServiceInstanceEntity struct {
Name string `json:"name"`
Credentials map[string]interface{} `json:"credentials"`
ServicePlanGUID string `json:"service_plan_guid"`
SpaceGUID string `json:"space_guid"`
GatewayData string `json:"gateway_data"`
Type string `json:"type"`
DashboardURL string `json:"dashboard_url"`
LastOperation LastOperationFields `json:"last_operation"`
RouteServiceURL string `json:"routes_url"`
Tags []string `json:"tags"`
SpaceURL string `json:"space_url"`
ServicePlanURL string `json:"service_plan_url"`
ServiceBindingURL string `json:"service_bindings_url"`
ServiceKeysURL string `json:"service_keys_url"`
ServiceKeys []ServiceKeyFields `json:"service_keys"`
ServicePlan ServicePlanFields `json:"service_plan"`
}
ServiceInstanceEntity ...
type ServiceInstanceFields ¶
type ServiceInstanceFields struct {
Metadata ServiceInstanceMetadata
Entity ServiceInstance
}
ServiceInstanceFields ...
type ServiceInstanceMetadata ¶
ServiceInstanceMetadata ...
type ServiceInstanceResource ¶
type ServiceInstanceResource struct {
Resource
Entity ServiceInstanceEntity
}
ServiceInstanceResource ...
func (ServiceInstanceResource) ToModel ¶
func (resource ServiceInstanceResource) ToModel() ServiceInstance
ToModel ...
type ServiceInstanceUpdateRequest ¶
type ServiceInstanceUpdateRequest struct {
Name *string `json:"name,omitempty"`
PlanGUID *string `json:"service_plan_guid,omitempty"`
Params map[string]interface{} `json:"parameters,omitempty"`
Tags []string `json:"tags,omitempty"`
}
ServiceInstanceUpdateRequest ...
type ServiceInstances ¶
type ServiceInstances interface {
Create(req ServiceInstanceCreateRequest) (*ServiceInstanceFields, error)
Update(instanceGUID string, req ServiceInstanceUpdateRequest) (*ServiceInstanceFields, error)
Delete(instanceGUID string, opts ...bool) error
FindByName(instanceName string) (*ServiceInstance, error)
FindByNameInSpace(spaceGUID string, instanceName string) (*ServiceInstance, error)
Get(instanceGUID string, depth ...int) (*ServiceInstanceFields, error)
ListServiceBindings(instanceGUID string) ([]ServiceBinding, error)
}
ServiceInstances ...
type ServiceKey ¶
type ServiceKey struct {
GUID string
Name string `json:"name"`
ServiceInstanceGUID string `json:"service_instance_guid"`
ServiceInstanceURL string `json:"service_instance_url"`
Credentials map[string]interface{} `json:"credentials"`
}
ServiceKey model...
type ServiceKeyEntity ¶
type ServiceKeyEntity struct {
Name string `json:"name"`
ServiceInstanceGUID string `json:"service_instance_guid"`
ServiceInstanceURL string `json:"service_instance_url"`
Credentials map[string]interface{} `json:"credentials"`
}
ServiceKeyEntity ...
type ServiceKeyFields ¶
type ServiceKeyFields struct {
Metadata ServiceKeyMetadata
Entity ServiceKey
}
ServiceKeyFields ...
type ServiceKeyMetadata ¶
type ServiceKeyMetadata struct {
GUID string `json:"guid"`
URL string `json:"url"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
ServiceKeyMetadata ...
type ServiceKeyRequest ¶
type ServiceKeyRequest struct {
Name string `json:"name"`
ServiceInstanceGUID string `json:"service_instance_guid"`
Params map[string]interface{} `json:"parameters,omitempty"`
}
ServiceKeyRequest ...
type ServiceKeyResource ¶
type ServiceKeyResource struct {
Resource
Entity ServiceKeyEntity
}
ServiceKeyResource ...
func (ServiceKeyResource) ToModel ¶
func (resource ServiceKeyResource) ToModel() ServiceKey
ToModel ...
type ServiceKeys ¶
type ServiceKeys interface {
Create(serviceInstanceGUID string, keyName string, params map[string]interface{}) (*ServiceKeyFields, error)
FindByName(serviceInstanceGUID string, keyName string) (*ServiceKey, error)
Get(serviceKeyGUID string) (*ServiceKeyFields, error)
Delete(serviceKeyGUID string) error
List(filters ...string) ([]ServiceKey, error)
}
ServiceKeys ...
type ServiceOffering ¶
type ServiceOffering struct {
GUID string
Label string `json:"label"`
Provider string `json:"provider"`
Description string `json:"description"`
LongDescription string `json:"long_description"`
Version string `json:"version"`
URL string `json:"url"`
InfoURL string `json:"info_url"`
DocumentURL string `json:"documentation_url"`
Timeout string `json:"timeout"`
UniqueID string `json:"unique_id"`
ServiceBrokerGUID string `json:"service_broker_guid"`
ServicePlansURL string `json:"service_plans_url"`
Tags []string `json:"tags"`
Requires []string `json:"requires"`
IsActive bool `json:"active"`
IsBindable bool `json:"bindable"`
IsPlanUpdateable bool `json:"plan_updateable"`
}
ServiceOffering model
type ServiceOfferingEntity ¶
type ServiceOfferingEntity struct {
Label string `json:"label"`
Provider string `json:"provider"`
Description string `json:"description"`
LongDescription string `json:"long_description"`
Version string `json:"version"`
URL string `json:"url"`
InfoURL string `json:"info_url"`
DocumentURL string `json:"documentation_url"`
Timeout string `json:"timeout"`
UniqueID string `json:"unique_id"`
ServiceBrokerGUID string `json:"service_broker_guid"`
ServicePlansURL string `json:"service_plans_url"`
Tags []string `json:"tags"`
Requires []string `json:"requires"`
IsActive bool `json:"active"`
IsBindable bool `json:"bindable"`
IsPlanUpdateable bool `json:"plan_updateable"`
}
ServiceOfferingEntity ...
type ServiceOfferingFields ¶
type ServiceOfferingFields struct {
Metadata ServiceOfferingMetadata
Entity ServiceOffering
}
ServiceOfferingFields ...
type ServiceOfferingMetadata ¶
ServiceOfferingMetadata ...
type ServiceOfferingResource ¶
type ServiceOfferingResource struct {
Resource
Entity ServiceOfferingEntity
}
ServiceOfferingResource ...
func (ServiceOfferingResource) ToFields ¶
func (resource ServiceOfferingResource) ToFields() ServiceOffering
ToFields ...
type ServiceOfferings ¶
type ServiceOfferings interface {
FindByLabel(serviceName string) (*ServiceOffering, error)
Get(svcOfferingGUID string) (*ServiceOfferingFields, error)
}
ServiceOfferings ...
type ServicePlan ¶
type ServicePlan struct {
GUID string
Name string `json:"name"`
Description string `json:"description"`
IsFree bool `json:"free"`
IsPublic bool `json:"public"`
IsActive bool `json:"active"`
ServiceGUID string `json:"service_guid"`
UniqueID string `json:"unique_id"`
ServiceInstancesURL string `json:"service_instances_url"`
}
ServicePlan ...
type ServicePlanEntity ¶
type ServicePlanEntity struct {
Name string `json:"name"`
Description string `json:"description"`
IsFree bool `json:"free"`
IsPublic bool `json:"public"`
IsActive bool `json:"active"`
ServiceGUID string `json:"service_guid"`
UniqueID string `json:"unique_id"`
ServiceInstancesURL string `json:"service_instances_url"`
}
ServicePlanEntity ...
type ServicePlanFields ¶
type ServicePlanFields struct {
Metadata ServicePlanMetadata
Entity ServicePlan
}
ServicePlanFields ...
type ServicePlanMetadata ¶
ServicePlanMetadata ...
type ServicePlanResource ¶
type ServicePlanResource struct {
Resource
Entity ServicePlanEntity
}
ServicePlanResource ...
func (ServicePlanResource) ToFields ¶
func (resource ServicePlanResource) ToFields() ServicePlan
ToFields ...
type ServicePlans ¶
type ServicePlans interface {
FindPlanInServiceOffering(serviceOfferingGUID string, planType string) (*ServicePlan, error)
Get(planGUID string) (*ServicePlanFields, error)
}
ServicePlans ...
type SharedDomainResource ¶
type SharedDomainResource struct {
}
SharedDomainResource ...
func (SharedDomainResource) ToFields ¶
func (resource SharedDomainResource) ToFields() SharedDomain
ToFields ..
type SpaceCreateRequest ¶
type SpaceCreateRequest struct {
Name string `json:"name"`
OrgGUID string `json:"organization_guid"`
SpaceQuotaGUID string `json:"space_quota_definition_guid,omitempty"`
}
SpaceCreateRequest ...
type SpaceEntity ¶
type SpaceEntity struct {
Name string `json:"name"`
OrgGUID string `json:"organization_guid"`
SpaceQuotaGUID string `json:"space_quota_definition_guid"`
AllowSSH bool `json:"allow_ssh"`
}
SpaceEntity ...
type SpaceFields ¶
type SpaceFields struct {
Metadata SpaceMetadata
Entity SpaceEntity
}
SpaceFields ...
type SpaceMetadata ¶
SpaceMetadata ...
type SpaceQuota ¶
type SpaceQuotaCreateRequest ¶
type SpaceQuotaCreateRequest struct {
Name string `json:"name"`
OrgGUID string `json:"organization_guid"`
MemoryLimitInMB int64 `json:"memory_limit,omitempty"`
InstanceMemoryLimitInMB int64 `json:"instance_memory_limit,omitempty"`
RoutesLimit int `json:"total_routes,omitempty"`
ServicesLimit int `json:"total_services,omitempty"`
NonBasicServicesAllowed bool `json:"non_basic_services_allowed"`
}
SpaceQuotaCreateRequest ...
type SpaceQuotaEntity ¶
type SpaceQuotaEntity struct {
Name string `json:"name"`
NonBasicServicesAllowed bool `json:"non_basic_services_allowed"`
ServicesLimit int `json:"total_services"`
RoutesLimit int `json:"total_routes"`
MemoryLimitInMB int64 `json:"memory_limit"`
InstanceMemoryLimitInMB int64 `json:"instance_memory_limit"`
TrialDBAllowed bool `json:"trial_db_allowed"`
AppInstanceLimit json.Number `json:"app_instance_limit"`
PrivateDomainsLimit json.Number `json:"total_private_domains"`
AppTaskLimit json.Number `json:"app_task_limit"`
}
type SpaceQuotaFields ¶
type SpaceQuotaFields struct {
Metadata SpaceQuotaMetadata
Entity SpaceQuotaEntity
}
SpaceQuotaFields ...
type SpaceQuotaMetadata ¶
SpaceQuotaMetadata ...
type SpaceQuotaResource ¶
type SpaceQuotaResource struct {
Resource
Entity SpaceQuotaEntity
}
func (SpaceQuotaResource) ToFields ¶
func (resource SpaceQuotaResource) ToFields() SpaceQuota
type SpaceQuotaUpdateRequest ¶
type SpaceQuotaUpdateRequest struct {
Name string `json:"name"`
OrgGUID string `json:"organization_guid,omitempty"`
MemoryLimitInMB int64 `json:"memory_limit,omitempty"`
InstanceMemoryLimitInMB int64 `json:"instance_memory_limit,omitempty"`
RoutesLimit int `json:"total_routes,omitempty"`
ServicesLimit int `json:"total_services,omitempty"`
NonBasicServicesAllowed bool `json:"non_basic_services_allowed"`
}
SpaceQuotaUpdateRequest ...
type SpaceQuotas ¶
type SpaceQuotas interface {
FindByName(name, orgGUID string) (*SpaceQuota, error)
Create(createRequest SpaceQuotaCreateRequest) (*SpaceQuotaFields, error)
Update(updateRequest SpaceQuotaUpdateRequest, spaceQuotaGUID string) (*SpaceQuotaFields, error)
Delete(spaceQuotaGUID string, opts ...bool) error
Get(spaceQuotaGUID string) (*SpaceQuotaFields, error)
}
SpaceQuotas ...
type SpaceRoleEntity ¶
type SpaceRoleEntity struct {
UserGUID string `json:"guid"`
Admin bool `json:"bool"`
UserName string `json:"username"`
}
SpaceRoleEntity ...
type SpaceRoleResource ¶
type SpaceRoleResource struct {
Resource
Entity SpaceRoleEntity
}
SpaceRoleResource ...
func (*SpaceRoleResource) ToFields ¶
func (resource *SpaceRoleResource) ToFields() SpaceRole
ToFields ...
type SpaceUpdateRequest ¶
type SpaceUpdateRequest struct {
Name *string `json:"name,omitempty"`
}
SpaceUpdateRequest ...
type Spaces ¶
type Spaces interface {
ListSpacesInOrg(orgGUID, region string) ([]Space, error)
FindByNameInOrg(orgGUID, name, region string) (*Space, error)
Create(req SpaceCreateRequest, opts ...bool) (*SpaceFields, error)
Update(spaceGUID string, req SpaceUpdateRequest, opts ...bool) (*SpaceFields, error)
Delete(spaceGUID string, opts ...bool) error
Get(spaceGUID string) (*SpaceFields, error)
ListRoutes(spaceGUID string, req RouteFilter) ([]Route, error)
AssociateAuditor(spaceGUID, userMail string) (*SpaceFields, error)
AssociateDeveloper(spaceGUID, userMail string) (*SpaceFields, error)
AssociateManager(spaceGUID, userMail string) (*SpaceFields, error)
DisassociateAuditor(spaceGUID, userMail string) error
DisassociateDeveloper(spaceGUID, userMail string) error
DisassociateManager(spaceGUID, userMail string) error
ListAuditors(spaceGUID string, filters ...string) ([]SpaceRole, error)
ListDevelopers(spaceGUID string, filters ...string) ([]SpaceRole, error)
ListManagers(spaceGUID string, filters ...string) ([]SpaceRole, error)
}
Spaces ...
type UploadBitFields ¶
type UploadBitFields struct {
Metadata Metadata
Entity UploadBitsEntity
}
UploadBitFields ...
type UploadBitsEntity ¶
UploadBitsEntity ...