Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertStructToMap(st interface{}) map[string]interface{}
- type App
- type AppEnv
- type AppEventEntity
- type AppEventQuery
- type AppEventResource
- type AppEventResponse
- type AppInstance
- type AppResource
- type AppResponse
- type AppStats
- type AppSummary
- type Buildpack
- type BuildpackResource
- type BuildpackResponse
- type Client
- func (c *Client) AppByGuid(guid string) (App, error)
- func (c *Client) AppByName(appName, spaceGuid, orgGuid string) (app App, err error)
- func (c *Client) AssignDropletToApp(appGUID, dropletGUID string) (V3DockerAppResponse, error)
- func (c *Client) AssociateOrgAuditor(orgGUID, userGUID string) (Org, error)
- func (c *Client) AssociateOrgAuditorByUsername(orgGUID, name string) (Org, error)
- func (c *Client) AssociateOrgManager(orgGUID, userGUID string) (Org, error)
- func (c *Client) AssociateOrgManagerByUsername(orgGUID, name string) (Org, error)
- func (c *Client) AssociateOrgUser(orgGUID, userGUID string) (Org, error)
- func (c *Client) AssociateOrgUserByUsername(orgGUID, name string) (Org, error)
- func (c *Client) AssociateSpaceAuditorByUsername(spaceGUID, name string) (Space, error)
- func (c *Client) AssociateSpaceDeveloperByUsername(spaceGUID, name string) (Space, error)
- func (c *Client) BindRunningSecGroup(secGUID string) error
- func (c *Client) BindSecGroup(secGUID, spaceGUID string) error
- func (c *Client) BindStagingSecGroup(secGUID string) error
- func (c *Client) CreateDomain(name, orgGuid string) (*Domain, error)
- func (c *Client) CreateHttpRoute(routeRequest RouteRequest) (RoutesResource, error)
- func (c *Client) CreateIsolationSegment(name string) (*IsolationSegment, error)
- func (c *Client) CreateOrg(req OrgRequest) (Org, error)
- func (c *Client) CreateSecGroup(name string, rules []SecGroupRule, spaceGuids []string) (*SecGroup, error)
- func (c *Client) CreateServicePlanVisibility(servicePlanGuid string, organizationGuid string) (ServicePlanVisibility, error)
- func (c *Client) CreateSpace(req SpaceRequest) (Space, error)
- func (c *Client) CreateTask(tr TaskRequest) (task Task, err error)
- func (c *Client) CreateTcpRoute(routeRequest RouteRequest) (Route, error)
- func (c *Client) CreateUser(req UserRequest) (User, error)
- func (c *Client) CreateV3DockerApp(appName, spaceGuid string) (app V3DockerAppResponse, err error)
- func (c *Client) CreateV3DockerAppWithEnv(appName, spaceGuid string, vars map[string]string) (app V3DockerAppResponse, err error)
- func (c *Client) CreateV3DockerBuild(pkgGUID string) (bld V3DockerBuildResponse, err error)
- func (c *Client) CreateV3DockerPackage(appGUID, image string) (pkg V3DockerPackageResponse, err error)
- func (c *Client) DeleteDomain(guid string) error
- func (c *Client) DeleteIsolationSegmentByGUID(guid string) error
- func (c *Client) DeleteOrg(guid string, recursive bool) error
- func (c *Client) DeleteSecGroup(guid string) error
- func (c *Client) DeleteUser(userGuid string) error
- func (c *Client) DoRequest(r *request) (*http.Response, error)
- func (c *Client) GetAppByGuid(guid string) (App, error)
- func (c *Client) GetAppEnv(guid string) (AppEnv, error)
- func (c *Client) GetAppInstances(guid string) (map[string]AppInstance, error)
- func (c *Client) GetAppRoutes(guid string) ([]Route, error)
- func (c *Client) GetAppStats(guid string) (map[string]AppStats, error)
- func (c *Client) GetDomainByName(name string) (Domain, error)
- func (c *Client) GetIsolationSegmentByGUID(guid string) (*IsolationSegment, error)
- func (c *Client) GetOrgByGuid(guid string) (Org, error)
- func (c *Client) GetOrgByName(name string) (Org, error)
- func (c *Client) GetOrgQuotaByName(name string) (OrgQuota, error)
- func (c *Client) GetSecGroup(guid string) (*SecGroup, error)
- func (c *Client) GetSecGroupByName(name string) (secGroup SecGroup, err error)
- func (c *Client) GetServiceBindingByGuid(guid string) (ServiceBinding, error)
- func (c *Client) GetServiceInstanceByGuid(guid string) (ServiceInstance, error)
- func (c *Client) GetServiceKeyByInstanceGuid(guid string) (ServiceKey, error)
- func (c *Client) GetServiceKeyByName(name string) (ServiceKey, error)
- func (c *Client) GetSharedDomainByName(name string) (SharedDomain, error)
- func (c *Client) GetSpaceByGuid(spaceGUID string) (Space, error)
- func (c *Client) GetSpaceByName(spaceName string, orgGuid string) (space Space, err error)
- func (c *Client) GetSpaceQuotaByName(name string) (SpaceQuota, error)
- func (c *Client) GetTaskByGuid(guid string) (task Task, err error)
- func (c *Client) GetToken() (string, error)
- func (c *Client) GetUserProvidedServiceInstanceByGuid(guid string) (UserProvidedServiceInstance, error)
- func (c *Client) GetV3BuildInfo(bldGUID string) (bld V3DockerBuildResponse, err error)
- func (c *Client) KillAppInstance(guid string, index string) error
- func (c *Client) ListAppEvents(eventType string) ([]AppEventEntity, error)
- func (c *Client) ListAppEventsByQuery(eventType string, queries []AppEventQuery) ([]AppEventEntity, error)
- func (c *Client) ListApps() ([]App, error)
- func (c *Client) ListAppsByQuery(query url.Values) ([]App, error)
- func (c *Client) ListAppsByQueryWithLimits(query url.Values, totalPages int) ([]App, error)
- func (c *Client) ListAppsByRoute(routeGuid string) ([]App, error)
- func (c *Client) ListBuildpacks() ([]Buildpack, error)
- func (c *Client) ListDomains() ([]Domain, error)
- func (c *Client) ListDomainsByQuery(query url.Values) ([]Domain, error)
- func (c *Client) ListIsolationSegments() ([]IsolationSegment, error)
- func (c *Client) ListOrgQuotas() ([]OrgQuota, error)
- func (c *Client) ListOrgQuotasByQuery(query url.Values) ([]OrgQuota, error)
- func (c *Client) ListOrgs() ([]Org, error)
- func (c *Client) ListOrgsByQuery(query url.Values) ([]Org, error)
- func (c *Client) ListRoutes() ([]Route, error)
- func (c *Client) ListRoutesByQuery(query url.Values) ([]Route, error)
- func (c *Client) ListSecGroups() (secGroups []SecGroup, err error)
- func (c *Client) ListServiceBindings() ([]ServiceBinding, error)
- func (c *Client) ListServiceBindingsByQuery(query url.Values) ([]ServiceBinding, error)
- func (c *Client) ListServiceInstances() ([]ServiceInstance, error)
- func (c *Client) ListServiceInstancesByQuery(query url.Values) ([]ServiceInstance, error)
- func (c *Client) ListServiceKeys() ([]ServiceKey, error)
- func (c *Client) ListServiceKeysByQuery(query url.Values) ([]ServiceKey, error)
- func (c *Client) ListServicePlanVisibilities() ([]ServicePlanVisibility, error)
- func (c *Client) ListServicePlanVisibilitiesByQuery(query url.Values) ([]ServicePlanVisibility, error)
- func (c *Client) ListServicePlans() ([]ServicePlan, error)
- func (c *Client) ListServicePlansByQuery(query url.Values) ([]ServicePlan, error)
- func (c *Client) ListServices() ([]Service, error)
- func (c *Client) ListServicesByQuery(query url.Values) ([]Service, error)
- func (c *Client) ListSharedDomains() ([]SharedDomain, error)
- func (c *Client) ListSharedDomainsByQuery(query url.Values) ([]SharedDomain, error)
- func (c *Client) ListSpaceQuotas() ([]SpaceQuota, error)
- func (c *Client) ListSpaceQuotasByQuery(query url.Values) ([]SpaceQuota, error)
- func (c *Client) ListSpaces() ([]Space, error)
- func (c *Client) ListSpacesByQuery(query url.Values) ([]Space, error)
- func (c *Client) ListStacks() ([]Stack, error)
- func (c *Client) ListStacksByQuery(query url.Values) ([]Stack, error)
- func (c *Client) ListTasks() ([]Task, error)
- func (c *Client) ListTasksByQuery(query url.Values) ([]Task, error)
- func (c *Client) ListUserAuditedOrgs(userGuid string) ([]Org, error)
- func (c *Client) ListUserAuditedSpaces(userGuid string) ([]Space, error)
- func (c *Client) ListUserBillingManagedOrgs(userGuid string) ([]Org, error)
- func (c *Client) ListUserManagedOrgs(userGuid string) ([]Org, error)
- func (c *Client) ListUserManagedSpaces(userGuid string) ([]Space, error)
- func (c *Client) ListUserOrgs(userGuid string) ([]Org, error)
- func (c *Client) ListUserProvidedServiceInstances() ([]UserProvidedServiceInstance, error)
- func (c *Client) ListUserProvidedServiceInstancesByQuery(query url.Values) ([]UserProvidedServiceInstance, error)
- func (c *Client) ListUserSpaces(userGuid string) ([]Space, error)
- func (c *Client) ListUsers() (Users, error)
- func (c *Client) ListUsersByQuery(query url.Values) (Users, error)
- func (c *Client) MapRoute(routeMap RouteMap) (mr MappedRoute, err error)
- func (c *Client) NewRequest(method, path string) *request
- func (c *Client) NewRequestWithBody(method, path string, body io.Reader) *request
- func (c *Client) OrgSpaces(guid string) ([]Space, error)
- func (c *Client) RemoveOrgAuditor(orgGUID, userGUID string) error
- func (c *Client) RemoveOrgAuditorByUsername(orgGUID, name string) error
- func (c *Client) RemoveOrgManager(orgGUID, userGUID string) error
- func (c *Client) RemoveOrgManagerByUsername(orgGUID, name string) error
- func (c *Client) RemoveOrgUser(orgGUID, userGUID string) error
- func (c *Client) RemoveOrgUserByUsername(orgGUID, name string) error
- func (c *Client) RemoveSpaceAuditorByUsername(spaceGUID, name string) error
- func (c *Client) RemoveSpaceDeveloperByUsername(spaceGUID, name string) error
- func (c *Client) ServiceBindingByGuid(guid string) (ServiceBinding, error)
- func (c *Client) ServiceInstanceByGuid(guid string) (ServiceInstance, error)
- func (c *Client) StartApp(appGUID string) (app V3DockerAppResponse, err error)
- func (c *Client) TaskByGuid(guid string) (task Task, err error)
- func (c *Client) TasksByApp(guid string) ([]Task, error)
- func (c *Client) TasksByAppByQuery(guid string, query url.Values) ([]Task, error)
- func (c *Client) TerminateTask(guid string) error
- func (c *Client) UnbindSecGroup(secGUID, spaceGUID string) error
- func (c *Client) UpdateSecGroup(guid, name string, rules []SecGroupRule, spaceGuids []string) (*SecGroup, error)
- func (c *Client) UserProvidedServiceInstanceByGuid(guid string) (UserProvidedServiceInstance, error)
- type CloudFoundryError
- type CloudFoundryErrors
- type Config
- type Domain
- type DomainResource
- type DomainsResponse
- type DropletRequest
- type Endpoint
- type IsolationSegementResponse
- type IsolationSegment
- type LastOperation
- type ListIsolationSegmentsResponse
- type MappedRoute
- type Meta
- type Org
- func (o *Org) AssociateAuditor(userGUID string) (Org, error)
- func (o *Org) AssociateAuditorByUsername(name string) (Org, error)
- func (o *Org) AssociateManager(userGUID string) (Org, error)
- func (o *Org) AssociateManagerByUsername(name string) (Org, error)
- func (o *Org) AssociateUser(userGUID string) (Org, error)
- func (o *Org) AssociateUserByUsername(name string) (Org, error)
- func (o *Org) Quota() (*OrgQuota, error)
- func (o *Org) RemoveAuditor(userGUID string) error
- func (o *Org) RemoveAuditorByUsername(name string) error
- func (o *Org) RemoveManager(userGUID string) error
- func (o *Org) RemoveManagerByUsername(name string) error
- func (o *Org) RemoveUser(userGUID string) error
- func (o *Org) RemoveUserByUsername(name string) error
- func (o *Org) Summary() (OrgSummary, error)
- type OrgQuota
- type OrgQuotasResource
- type OrgQuotasResponse
- type OrgRequest
- type OrgResource
- type OrgResponse
- type OrgSummary
- type OrgSummarySpaces
- type Pagination
- type Route
- type RouteMap
- type RouteRequest
- type RoutesResource
- type RoutesResponse
- type SecGroup
- type SecGroupCreateResponse
- type SecGroupResource
- type SecGroupResponse
- type SecGroupRule
- type Service
- type ServiceBinding
- type ServiceBindingResource
- type ServiceBindingsResponse
- type ServiceInstance
- type ServiceInstanceResource
- type ServiceInstancesResponse
- type ServiceKey
- type ServiceKeyResource
- type ServiceKeysResponse
- type ServicePlan
- type ServicePlanResource
- type ServicePlanVisibilitiesResponse
- type ServicePlanVisibility
- type ServicePlanVisibilityResource
- type ServicePlansResponse
- type ServiceSummary
- type ServicesResource
- type ServicesResponse
- type SharedDomain
- type SharedDomainResource
- type SharedDomainsResponse
- type Space
- func (s *Space) AssociateAuditorByUsername(name string) (Space, error)
- func (s *Space) AssociateDeveloperByUsername(name string) (Space, error)
- func (s *Space) Org() (Org, error)
- func (s *Space) Quota() (*SpaceQuota, error)
- func (s *Space) RemoveAuditorByUsername(name string) error
- func (s *Space) RemoveDeveloperByUsername(name string) error
- func (s *Space) Roles() ([]SpaceRole, error)
- func (s *Space) Summary() (SpaceSummary, error)
- type SpaceQuota
- type SpaceQuotasResource
- type SpaceQuotasResponse
- type SpaceRequest
- type SpaceResource
- type SpaceResponse
- type SpaceRole
- type SpaceRoleResource
- type SpaceRoleResponse
- type SpaceSummary
- type Stack
- type StacksResource
- type StacksResponse
- type Task
- type TaskListResponse
- type TaskRequest
- type User
- type UserProvidedServiceInstance
- type UserProvidedServiceInstanceResource
- type UserProvidedServiceInstancesResponse
- type UserRequest
- type UserResource
- type UserResponse
- type Users
- type V3DockerApp
- type V3DockerAppResponse
- type V3DockerBuild
- type V3DockerBuildResponse
- type V3DockerPackage
- type V3DockerPackageResponse
Constants ¶
const ( //AppCrash app.crash event const AppCrash = "app.crash" //AppStart audit.app.start event const AppStart = "audit.app.start" //AppStop audit.app.stop event const AppStop = "audit.app.stop" //AppUpdate audit.app.update event const AppUpdate = "audit.app.update" //AppCreate audit.app.create event const AppCreate = "audit.app.create" //AppDelete audit.app.delete-request event const AppDelete = "audit.app.delete-request" //AppSSHAuth audit.app.ssh-authorized event const AppSSHAuth = "audit.app.ssh-authorized" //AppSSHUnauth audit.app.ssh-unauthorized event const AppSSHUnauth = "audit.app.ssh-unauthorized" //AppRestage audit.app.restage event const AppRestage = "audit.app.restage" //AppMapRoute audit.app.map-route event const AppMapRoute = "audit.app.map-route" //AppUnmapRoute audit.app.unmap-route event const AppUnmapRoute = "audit.app.unmap-route" //FilterTimestamp const for query filter timestamp FilterTimestamp = "timestamp" //FilterActee const for query filter actee FilterActee = "actee" )
Variables ¶
var ValidOperators = []string{":", ">=", "<=", "<", ">", "IN"}
ValidOperators const for all valid operators in a query
Functions ¶
func ConvertStructToMap ¶
func ConvertStructToMap(st interface{}) map[string]interface{}
Types ¶
type App ¶
type App struct { Guid string `json:"guid"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Name string `json:"name"` Memory int `json:"memory"` Instances int `json:"instances"` DiskQuota int `json:"disk_quota"` SpaceGuid string `json:"space_guid"` StackGuid string `json:"stack_guid"` State string `json:"state"` PackageState string `json:"package_state"` Command string `json:"command"` Buildpack string `json:"buildpack"` DetectedBuildpack string `json:"detected_buildpack"` DetectedBuildpackGuid string `json:"detected_buildpack_guid"` HealthCheckHttpEndpoint string `json:"health_check_http_endpoint"` HealthCheckType string `json:"health_check_type"` HealthCheckTimeout int `json:"health_check_timeout"` Diego bool `json:"diego"` EnableSSH bool `json:"enable_ssh"` DetectedStartCommand string `json:"detected_start_command"` DockerImage string `json:"docker_image"` DockerCredentials map[string]interface{} `json:"docker_credentials_json"` Environment map[string]interface{} `json:"environment_json"` StagingFailedReason string `json:"staging_failed_reason"` StagingFailedDescription string `json:"staging_failed_description"` Ports []int `json:"ports"` SpaceURL string `json:"space_url"` SpaceData SpaceResource `json:"space"` PackageUpdatedAt string `json:"package_updated_at"` // contains filtered or unexported fields }
type AppEnv ¶
type AppEnv struct { // These can have arbitrary JSON so need to map to interface{} Environment map[string]interface{} `json:"environment_json"` StagingEnv map[string]interface{} `json:"staging_env_json"` RunningEnv map[string]interface{} `json:"running_env_json"` SystemEnv map[string]interface{} `json:"system_env_json"` ApplicationEnv map[string]interface{} `json:"application_env_json"` }
type AppEventEntity ¶
type AppEventEntity struct { //EventTypes are app.crash, audit.app.start, audit.app.stop, audit.app.update, audit.app.create, audit.app.delete-request EventType string `json:"type"` //The GUID of the actor. Actor string `json:"actor"` //The actor type, user or app ActorType string `json:"actor_type"` //The name of the actor. ActorName string `json:"actor_name"` //The GUID of the actee. Actee string `json:"actee"` //The actee type, space, app or v3-app ActeeType string `json:"actee_type"` //The name of the actee. ActeeName string `json:"actee_name"` //Timestamp format "2016-02-26T13:29:44Z". The event creation time. Timestamp time.Time `json:"timestamp"` MetaData struct { //app.crash event fields ExitDescription string `json:"exit_description,omitempty"` ExitReason string `json:"reason,omitempty"` ExitStatus string `json:"exit_status,omitempty"` Request struct { Name string `json:"name,omitempty"` Instances float64 `json:"instances,omitempty"` State string `json:"state,omitempty"` Memory float64 `json:"memory,omitempty"` EnvironmentVars string `json:"environment_json,omitempty"` DockerCredentials string `json:"docker_credentials_json,omitempty"` //audit.app.create event fields Console bool `json:"console,omitempty"` Buildpack string `json:"buildpack,omitempty"` Space string `json:"space_guid,omitempty"` HealthcheckType string `json:"health_check_type,omitempty"` HealthcheckTimeout float64 `json:"health_check_timeout,omitempty"` Production bool `json:"production,omitempty"` //app.crash event fields Index float64 `json:"index,omitempty"` } `json:"request"` } `json:"metadata"` }
The AppEventEntity the actual app event body
type AppEventQuery ¶
AppEventQuery a struct for defining queries like 'q=filter>value' or 'q=filter IN a,b,c'
type AppEventResource ¶
type AppEventResource struct { Meta Meta `json:"metadata"` Entity AppEventEntity `json:"entity"` }
AppEventResource the event resources
type AppEventResponse ¶
type AppEventResponse struct { Results int `json:"total_results"` Pages int `json:"total_pages"` PrevURL string `json:"prev_url"` NextURL string `json:"next_url"` Resources []AppEventResource `json:"resources"` }
AppEventResponse the entire response
type AppInstance ¶
type AppInstance struct { State string `json:"state"` Since sinceTime `json:"since"` }
type AppResource ¶
type AppResponse ¶
type AppResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []AppResource `json:"resources"` }
type AppStats ¶
type AppStats struct { State string `json:"state"` Stats struct { Name string `json:"name"` Uris []string `json:"uris"` Host string `json:"host"` Port int `json:"port"` Uptime int `json:"uptime"` MemQuota int `json:"mem_quota"` DiskQuota int `json:"disk_quota"` FdsQuota int `json:"fds_quota"` Usage struct { Time statTime `json:"time"` CPU float64 `json:"cpu"` Mem int `json:"mem"` Disk int `json:"disk"` } `json:"usage"` } `json:"stats"` }
type AppSummary ¶
type AppSummary struct { Guid string `json:"guid"` Name string `json:"name"` ServiceCount int `json:"service_count"` RunningInstances int `json:"running_instances"` SpaceGuid string `json:"space_guid"` StackGuid string `json:"stack_guid"` Buildpack string `json:"buildpack"` DetectedBuildpack string `json:"detected_buildpack"` Environment map[string]interface{} `json:"environment_json"` Memory int `json:"memory"` Instances int `json:"instances"` DiskQuota int `json:"disk_quota"` State string `json:"state"` Command string `json:"command"` PackageState string `json:"package_state"` HealthCheckType string `json:"health_check_type"` HealthCheckTimeout int `json:"health_check_timeout"` StagingFailedReason string `json:"staging_failed_reason"` StagingFailedDescription string `json:"staging_failed_description"` Diego bool `json:"diego"` DockerImage string `json:"docker_image"` DetectedStartCommand string `json:"detected_start_command"` EnableSSH bool `json:"enable_ssh"` DockerCredentials map[string]interface{} `json:"docker_credentials_json"` }
type BuildpackResource ¶
type BuildpackResponse ¶
type BuildpackResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []BuildpackResource `json:"resources"` }
type Client ¶
Client used to communicate with Cloud Foundry
func (*Client) AppByName ¶
AppByName takes an appName, and GUIDs for a space and org, and performs the API lookup with those query parameters set to return you the desired App object.
func (*Client) AssignDropletToApp ¶
func (c *Client) AssignDropletToApp(appGUID, dropletGUID string) (V3DockerAppResponse, error)
func (*Client) AssociateOrgAuditor ¶
func (*Client) AssociateOrgAuditorByUsername ¶
func (*Client) AssociateOrgManager ¶
func (*Client) AssociateOrgManagerByUsername ¶
func (*Client) AssociateOrgUser ¶
func (*Client) AssociateOrgUserByUsername ¶
func (*Client) AssociateSpaceAuditorByUsername ¶
func (*Client) AssociateSpaceDeveloperByUsername ¶
func (*Client) BindRunningSecGroup ¶
BindRunningSecGroup contacts the CF endpoint to associate a security group secGUID: identifies the security group to add a space to
func (*Client) BindSecGroup ¶
BindSecGroup contacts the CF endpoint to associate a space with a security group secGUID: identifies the security group to add a space to spaceGUID: identifies the space to associate
func (*Client) BindStagingSecGroup ¶
BindStagingSecGroup contacts the CF endpoint to associate a space with a security group secGUID: identifies the security group to add a space to
func (*Client) CreateHttpRoute ¶
func (c *Client) CreateHttpRoute(routeRequest RouteRequest) (RoutesResource, error)
func (*Client) CreateIsolationSegment ¶
func (c *Client) CreateIsolationSegment(name string) (*IsolationSegment, error)
func (*Client) CreateSecGroup ¶
func (c *Client) CreateSecGroup(name string, rules []SecGroupRule, spaceGuids []string) (*SecGroup, error)
CreateSecGroup contacts the CF endpoint for creating a new security group. name: the name to give to the created security group rules: A slice of rule objects that describe the rules that this security group enforces.
This can technically be nil or an empty slice - we won't judge you
spaceGuids: The security group will be associated with the spaces specified by the contents of this slice.
If nil, the security group will not be associated with any spaces initially.
func (*Client) CreateServicePlanVisibility ¶
func (c *Client) CreateServicePlanVisibility(servicePlanGuid string, organizationGuid string) (ServicePlanVisibility, error)
func (*Client) CreateSpace ¶
func (c *Client) CreateSpace(req SpaceRequest) (Space, error)
func (*Client) CreateTask ¶
func (c *Client) CreateTask(tr TaskRequest) (task Task, err error)
CreateTask creates a new task in CF system and returns its structure.
func (*Client) CreateTcpRoute ¶
func (c *Client) CreateTcpRoute(routeRequest RouteRequest) (Route, error)
func (*Client) CreateUser ¶
func (c *Client) CreateUser(req UserRequest) (User, error)
func (*Client) CreateV3DockerApp ¶
func (c *Client) CreateV3DockerApp(appName, spaceGuid string) (app V3DockerAppResponse, err error)
CreateV3DockerApp takes an appname, and a GUID for space. It will then create the app object and return the GUID.
func (*Client) CreateV3DockerAppWithEnv ¶
func (c *Client) CreateV3DockerAppWithEnv(appName, spaceGuid string, vars map[string]string) (app V3DockerAppResponse, err error)
CreateV3DockerAppWithEnv takes an appname, a guid for the space and a map of strings for the environment vars. It will then create the app object
func (*Client) CreateV3DockerBuild ¶
func (c *Client) CreateV3DockerBuild(pkgGUID string) (bld V3DockerBuildResponse, err error)
CreateV3DockerBuild creates a build to stage the docker image. Needs to be associated with an existing package
func (*Client) CreateV3DockerPackage ¶
func (c *Client) CreateV3DockerPackage(appGUID, image string) (pkg V3DockerPackageResponse, err error)
CreateV3DockerPackage creates the required package for an application object It then needs a build associated.
func (*Client) DeleteDomain ¶
func (*Client) DeleteIsolationSegmentByGUID ¶
func (*Client) DeleteSecGroup ¶
DeleteSecGroup contacts the CF endpoint to delete an existing security group. guid: Indentifies the security group to be deleted.
func (*Client) DeleteUser ¶
func (*Client) GetAppInstances ¶
func (c *Client) GetAppInstances(guid string) (map[string]AppInstance, error)
func (*Client) GetIsolationSegmentByGUID ¶
func (c *Client) GetIsolationSegmentByGUID(guid string) (*IsolationSegment, error)
func (*Client) GetOrgQuotaByName ¶
func (*Client) GetSecGroup ¶
GetSecGroup contacts the CF endpoint for fetching the info for a particular security group. guid: Identifies the security group to fetch information from
func (*Client) GetSecGroupByName ¶
func (*Client) GetServiceBindingByGuid ¶
func (c *Client) GetServiceBindingByGuid(guid string) (ServiceBinding, error)
func (*Client) GetServiceInstanceByGuid ¶
func (c *Client) GetServiceInstanceByGuid(guid string) (ServiceInstance, error)
func (*Client) GetServiceKeyByInstanceGuid ¶
func (c *Client) GetServiceKeyByInstanceGuid(guid string) (ServiceKey, error)
func (*Client) GetServiceKeyByName ¶
func (c *Client) GetServiceKeyByName(name string) (ServiceKey, error)
func (*Client) GetSharedDomainByName ¶
func (c *Client) GetSharedDomainByName(name string) (SharedDomain, error)
func (*Client) GetSpaceByName ¶
func (*Client) GetSpaceQuotaByName ¶
func (c *Client) GetSpaceQuotaByName(name string) (SpaceQuota, error)
func (*Client) GetTaskByGuid ¶
TaskByGuid returns a task structure by requesting it with the tasks GUID.
func (*Client) GetUserProvidedServiceInstanceByGuid ¶
func (c *Client) GetUserProvidedServiceInstanceByGuid(guid string) (UserProvidedServiceInstance, error)
func (*Client) GetV3BuildInfo ¶
func (c *Client) GetV3BuildInfo(bldGUID string) (bld V3DockerBuildResponse, err error)
GetV3DockerBuild checks to see if a given build has successfulyl staged, so it can get the droplet guid, and apply it to the application
func (*Client) ListAppEvents ¶
func (c *Client) ListAppEvents(eventType string) ([]AppEventEntity, error)
ListAppEvents returns all app events based on eventType
func (*Client) ListAppEventsByQuery ¶
func (c *Client) ListAppEventsByQuery(eventType string, queries []AppEventQuery) ([]AppEventEntity, error)
ListAppEventsByQuery returns all app events based on eventType and queries
func (*Client) ListAppsByQueryWithLimits ¶
ListAppsByQueryWithLimits queries totalPages app info. When totalPages is less and equal than 0, it queries all app info When there are no more than totalPages apps on server side, all apps info will be returned
func (*Client) ListBuildpacks ¶
func (*Client) ListDomains ¶
func (*Client) ListDomainsByQuery ¶
func (*Client) ListIsolationSegments ¶
func (c *Client) ListIsolationSegments() ([]IsolationSegment, error)
func (*Client) ListOrgQuotas ¶
func (*Client) ListOrgQuotasByQuery ¶
func (*Client) ListRoutes ¶
func (*Client) ListRoutesByQuery ¶
func (*Client) ListSecGroups ¶
func (*Client) ListServiceBindings ¶
func (c *Client) ListServiceBindings() ([]ServiceBinding, error)
func (*Client) ListServiceBindingsByQuery ¶
func (c *Client) ListServiceBindingsByQuery(query url.Values) ([]ServiceBinding, error)
func (*Client) ListServiceInstances ¶
func (c *Client) ListServiceInstances() ([]ServiceInstance, error)
func (*Client) ListServiceInstancesByQuery ¶
func (c *Client) ListServiceInstancesByQuery(query url.Values) ([]ServiceInstance, error)
func (*Client) ListServiceKeys ¶
func (c *Client) ListServiceKeys() ([]ServiceKey, error)
func (*Client) ListServiceKeysByQuery ¶
func (c *Client) ListServiceKeysByQuery(query url.Values) ([]ServiceKey, error)
func (*Client) ListServicePlanVisibilities ¶
func (c *Client) ListServicePlanVisibilities() ([]ServicePlanVisibility, error)
func (*Client) ListServicePlanVisibilitiesByQuery ¶
func (c *Client) ListServicePlanVisibilitiesByQuery(query url.Values) ([]ServicePlanVisibility, error)
func (*Client) ListServicePlans ¶
func (c *Client) ListServicePlans() ([]ServicePlan, error)
func (*Client) ListServicePlansByQuery ¶
func (c *Client) ListServicePlansByQuery(query url.Values) ([]ServicePlan, error)
func (*Client) ListServices ¶
func (*Client) ListServicesByQuery ¶
func (*Client) ListSharedDomains ¶
func (c *Client) ListSharedDomains() ([]SharedDomain, error)
func (*Client) ListSharedDomainsByQuery ¶
func (c *Client) ListSharedDomainsByQuery(query url.Values) ([]SharedDomain, error)
func (*Client) ListSpaceQuotas ¶
func (c *Client) ListSpaceQuotas() ([]SpaceQuota, error)
func (*Client) ListSpaceQuotasByQuery ¶
func (c *Client) ListSpaceQuotasByQuery(query url.Values) ([]SpaceQuota, error)
func (*Client) ListSpaces ¶
func (*Client) ListSpacesByQuery ¶
func (*Client) ListStacks ¶
func (*Client) ListStacksByQuery ¶
func (*Client) ListTasks ¶
ListTasks returns all tasks the user has access to. See http://v3-apidocs.cloudfoundry.org/version/3.12.0/index.html#list-tasks
func (*Client) ListTasksByQuery ¶
ListTasksByQuery returns all tasks the user has access to, with query parameters. See http://v3-apidocs.cloudfoundry.org/version/3.12.0/index.html#list-tasks
func (*Client) ListUserAuditedOrgs ¶
func (*Client) ListUserAuditedSpaces ¶
func (*Client) ListUserBillingManagedOrgs ¶
func (*Client) ListUserManagedOrgs ¶
func (*Client) ListUserManagedSpaces ¶
func (*Client) ListUserProvidedServiceInstances ¶
func (c *Client) ListUserProvidedServiceInstances() ([]UserProvidedServiceInstance, error)
func (*Client) ListUserProvidedServiceInstancesByQuery ¶
func (c *Client) ListUserProvidedServiceInstancesByQuery(query url.Values) ([]UserProvidedServiceInstance, error)
func (*Client) ListUsersByQuery ¶
func (*Client) NewRequest ¶
NewRequest is used to create a new request
func (*Client) NewRequestWithBody ¶
NewRequestWithBody is used to create a new request with arbigtrary body io.Reader.
func (*Client) RemoveOrgAuditor ¶
func (*Client) RemoveOrgAuditorByUsername ¶
func (*Client) RemoveOrgManager ¶
func (*Client) RemoveOrgManagerByUsername ¶
func (*Client) RemoveOrgUser ¶
func (*Client) RemoveOrgUserByUsername ¶
func (*Client) RemoveSpaceAuditorByUsername ¶
func (*Client) RemoveSpaceDeveloperByUsername ¶
func (*Client) ServiceBindingByGuid ¶
func (c *Client) ServiceBindingByGuid(guid string) (ServiceBinding, error)
func (*Client) ServiceInstanceByGuid ¶
func (c *Client) ServiceInstanceByGuid(guid string) (ServiceInstance, error)
func (*Client) StartApp ¶
func (c *Client) StartApp(appGUID string) (app V3DockerAppResponse, err error)
func (*Client) TasksByApp ¶
TasksByApp returns task structures which aligned to an app identified by the given guid. See: http://v3-apidocs.cloudfoundry.org/version/3.12.0/index.html#list-tasks-for-an-app
func (*Client) TasksByAppByQuery ¶
TasksByAppByQuery returns task structures which aligned to an app identified by the given guid and filtered by the given query parameters. See: http://v3-apidocs.cloudfoundry.org/version/3.12.0/index.html#list-tasks-for-an-app
func (*Client) TerminateTask ¶
TerminateTask cancels a task identified by its GUID.
func (*Client) UnbindSecGroup ¶
UnbindSecGroup contacts the CF endpoint to dissociate a space from a security group secGUID: identifies the security group to remove a space from spaceGUID: identifies the space to dissociate from the security group
func (*Client) UpdateSecGroup ¶
func (c *Client) UpdateSecGroup(guid, name string, rules []SecGroupRule, spaceGuids []string) (*SecGroup, error)
UpdateSecGroup contacts the CF endpoint to update an existing security group. guid: identifies the security group that you would like to update. name: the new name to give to the security group rules: A slice of rule objects that describe the rules that this security group enforces.
If this is left nil, the rules will not be changed.
spaceGuids: The security group will be associated with the spaces specified by the contents of this slice.
If nil, the space associations will not be changed.
func (*Client) UserProvidedServiceInstanceByGuid ¶
func (c *Client) UserProvidedServiceInstanceByGuid(guid string) (UserProvidedServiceInstance, error)
type CloudFoundryError ¶
type CloudFoundryError struct { Code int `json:"code"` ErrorCode string `json:"error_code"` Description string `json:"description"` }
func (CloudFoundryError) Error ¶
func (cfErr CloudFoundryError) Error() string
type CloudFoundryErrors ¶
type CloudFoundryErrors struct {
Errors []CloudFoundryError `json:"errors"`
}
func (CloudFoundryErrors) Error ¶
func (cfErrs CloudFoundryErrors) Error() string
type Config ¶
type Config struct { ApiAddress string `json:"api_url"` Username string `json:"user"` Password string `json:"password"` ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` SkipSslValidation bool `json:"skip_ssl_validation"` HttpClient *http.Client Token string `json:"auth_token"` TokenSource oauth2.TokenSource UserAgent string `json:"user_agent"` }
Config is used to configure the creation of a client
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig configuration for client Keep LoginAdress for backward compatibility Need to be remove in close future
type DomainResource ¶
type DomainsResponse ¶
type DomainsResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []DomainResource `json:"resources"` }
type DropletRequest ¶
type DropletRequest struct { Data struct { GUID string `json:"guid,omitempty"` } `json:"data,omitempty"` }
type Endpoint ¶
type Endpoint struct { DopplerEndpoint string `json:"doppler_logging_endpoint"` LoggingEndpoint string `json:"logging_endpoint"` AuthEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` }
func DefaultEndpoint ¶
func DefaultEndpoint() *Endpoint
type IsolationSegementResponse ¶
type IsolationSegementResponse struct { GUID string `json:"guid"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` Spaces struct { Href string `json:"href"` } `json:"spaces"` Organizations struct { Href string `json:"href"` } `json:"organizations"` } `json:"links"` }
type IsolationSegment ¶
type IsolationSegment struct { GUID string `json:"guid"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` // contains filtered or unexported fields }
func (*IsolationSegment) AddOrg ¶
func (i *IsolationSegment) AddOrg(orgGuid string) error
func (*IsolationSegment) AddSpace ¶
func (i *IsolationSegment) AddSpace(spaceGuid string) error
func (*IsolationSegment) Delete ¶
func (i *IsolationSegment) Delete() error
func (*IsolationSegment) RemoveOrg ¶
func (i *IsolationSegment) RemoveOrg(orgGuid string) error
func (*IsolationSegment) RemoveSpace ¶
func (i *IsolationSegment) RemoveSpace(spaceGuid string) error
type LastOperation ¶
type ListIsolationSegmentsResponse ¶
type ListIsolationSegmentsResponse struct { Pagination Pagination `json:"pagination"` Resources []IsolationSegementResponse `json:"resources"` }
type MappedRoute ¶
type Org ¶
type Org struct { Guid string `json:"guid"` Name string `json:"name"` QuotaDefinitionGuid string `json:"quota_definition_guid"` // contains filtered or unexported fields }
func (*Org) AssociateAuditorByUsername ¶
func (*Org) AssociateManagerByUsername ¶
func (*Org) AssociateUserByUsername ¶
func (*Org) RemoveAuditor ¶
func (*Org) RemoveAuditorByUsername ¶
func (*Org) RemoveManager ¶
func (*Org) RemoveManagerByUsername ¶
func (*Org) RemoveUser ¶
func (*Org) RemoveUserByUsername ¶
func (*Org) Summary ¶
func (o *Org) Summary() (OrgSummary, error)
type OrgQuota ¶
type OrgQuota struct { Guid string `json:"guid"` Name string `json:"name"` NonBasicServicesAllowed bool `json:"non_basic_services_allowed"` TotalServices int `json:"total_services"` TotalRoutes int `json:"total_routes"` TotalPrivateDomains int `json:"total_private_domains"` MemoryLimit int `json:"memory_limit"` TrialDBAllowed bool `json:"trial_db_allowed"` InstanceMemoryLimit int `json:"instance_memory_limit"` AppInstanceLimit int `json:"app_instance_limit"` AppTaskLimit int `json:"app_task_limit"` TotalServiceKeys int `json:"total_service_keys"` TotalReservedRoutePorts int `json:"total_reserved_route_ports"` // contains filtered or unexported fields }
type OrgQuotasResource ¶
type OrgQuotasResponse ¶
type OrgQuotasResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []OrgQuotasResource `json:"resources"` }
type OrgRequest ¶
type OrgResource ¶
type OrgResponse ¶
type OrgResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []OrgResource `json:"resources"` }
type OrgSummary ¶
type OrgSummary struct { Guid string `json:"guid"` Name string `json:"name"` Status string `json:"status"` Spaces []OrgSummarySpaces `json:"spaces"` }
type OrgSummarySpaces ¶
type Pagination ¶
type RouteRequest ¶
type RoutesResource ¶
type RoutesResponse ¶
type RoutesResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []RoutesResource `json:"resources"` }
type SecGroup ¶
type SecGroup struct { Guid string `json:"guid"` Name string `json:"name"` Rules []SecGroupRule `json:"rules"` Running bool `json:"running_default"` Staging bool `json:"staging_default"` SpacesURL string `json:"spaces_url"` SpacesData []SpaceResource `json:"spaces"` // contains filtered or unexported fields }
func (*SecGroup) ListSpaceResources ¶
func (secGroup *SecGroup) ListSpaceResources() ([]SpaceResource, error)
type SecGroupCreateResponse ¶
type SecGroupResource ¶
type SecGroupResponse ¶
type SecGroupResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []SecGroupResource `json:"resources"` }
type SecGroupRule ¶
type SecGroupRule struct { Protocol string `json:"protocol"` Ports string `json:"ports,omitempty"` //e.g. "4000-5000,9142" Destination string `json:"destination"` //CIDR Format Description string `json:"description,omitempty"` //Optional description Code int `json:"code"` // ICMP code Type int `json:"type"` //ICMP type. Only valid if Protocol=="icmp" Log bool `json:"log,omitempty"` //If true, log this rule }
type ServiceBinding ¶
type ServiceBinding struct { Guid string `json:"guid"` AppGuid string `json:"app_guid"` ServiceInstanceGuid string `json:"service_instance_guid"` Credentials interface{} `json:"credentials"` BindingOptions interface{} `json:"binding_options"` GatewayData interface{} `json:"gateway_data"` GatewayName string `json:"gateway_name"` SyslogDrainUrl string `json:"syslog_drain_url"` VolumeMounts interface{} `json:"volume_mounts"` AppUrl string `json:"app_url"` ServiceInstanceUrl string `json:"service_instance_url"` // contains filtered or unexported fields }
type ServiceBindingResource ¶
type ServiceBindingResource struct { Meta Meta `json:"metadata"` Entity ServiceBinding `json:"entity"` }
type ServiceBindingsResponse ¶
type ServiceBindingsResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` Resources []ServiceBindingResource `json:"resources"` NextUrl string `json:"next_url"` }
type ServiceInstance ¶
type ServiceInstance struct { Name string `json:"name"` Credentials map[string]interface{} `json:"credentials"` ServicePlanGuid string `json:"service_plan_guid"` SpaceGuid string `json:"space_guid"` DashboardUrl string `json:"dashboard_url"` Type string `json:"type"` LastOperation LastOperation `json:"last_operation"` Tags []string `json:"tags"` ServiceGuid string `json:"service_guid"` SpaceUrl string `json:"space_url"` ServicePlanUrl string `json:"service_plan_url"` ServiceBindingsUrl string `json:"service_bindings_url"` ServiceKeysUrl string `json:"service_keys_url"` RoutesUrl string `json:"routes_url"` ServiceUrl string `json:"service_url"` Guid string `json:"guid"` // contains filtered or unexported fields }
type ServiceInstanceResource ¶
type ServiceInstanceResource struct { Meta Meta `json:"metadata"` Entity ServiceInstance `json:"entity"` }
type ServiceInstancesResponse ¶
type ServiceInstancesResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []ServiceInstanceResource `json:"resources"` }
type ServiceKey ¶
type ServiceKeyResource ¶
type ServiceKeyResource struct { Meta Meta `json:"metadata"` Entity ServiceKey `json:"entity"` }
type ServiceKeysResponse ¶
type ServiceKeysResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` Resources []ServiceKeyResource `json:"resources"` }
type ServicePlan ¶
type ServicePlan struct { Name string `json:"name"` Guid string `json:"guid"` Free bool `json:"free"` Description string `json:"description"` ServiceGuid string `json:"service_guid"` Extra interface{} `json:"extra"` UniqueId string `json:"unique_id"` Public bool `json:"public"` Active bool `json:"active"` Bindable bool `json:"bindable"` ServiceUrl string `json:"service_url"` ServiceInstancesUrl string `json:"service_instances_url"` // contains filtered or unexported fields }
type ServicePlanResource ¶
type ServicePlanResource struct { Meta Meta `json:"metadata"` Entity ServicePlan `json:"entity"` }
type ServicePlanVisibilitiesResponse ¶
type ServicePlanVisibilitiesResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []ServicePlanVisibilityResource `json:"resources"` }
type ServicePlanVisibility ¶
type ServicePlanVisibility struct { Guid string `json:"guid"` ServicePlanGuid string `json:"service_plan_guid"` OrganizationGuid string `json:"organization_guid"` ServicePlanUrl string `json:"service_plan_url"` OrganizationUrl string `json:"organization_url"` // contains filtered or unexported fields }
type ServicePlanVisibilityResource ¶
type ServicePlanVisibilityResource struct { Meta Meta `json:"metadata"` Entity ServicePlanVisibility `json:"entity"` }
type ServicePlansResponse ¶
type ServicePlansResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` Resources []ServicePlanResource `json:"resources"` }
type ServiceSummary ¶
type ServicesResource ¶
type ServicesResponse ¶
type ServicesResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` Resources []ServicesResource `json:"resources"` }
type SharedDomain ¶
type SharedDomain struct { // contains filtered or unexported fields }
type SharedDomainResource ¶
type SharedDomainResource struct {}
type SharedDomainsResponse ¶
type SharedDomainsResponse struct {}
type Space ¶
type Space struct { Guid string `json:"guid"` Name string `json:"name"` OrganizationGuid string `json:"organization_guid"` OrgURL string `json:"organization_url"` OrgData OrgResource `json:"organization"` QuotaDefinitionGuid string `json:"space_quota_definition_guid"` // contains filtered or unexported fields }
func (*Space) AssociateAuditorByUsername ¶
func (*Space) AssociateDeveloperByUsername ¶
func (*Space) Quota ¶
func (s *Space) Quota() (*SpaceQuota, error)
func (*Space) RemoveAuditorByUsername ¶
func (*Space) RemoveDeveloperByUsername ¶
func (*Space) Summary ¶
func (s *Space) Summary() (SpaceSummary, error)
type SpaceQuota ¶
type SpaceQuota struct { Guid string `json:"guid"` Name string `json:"name"` OrganizationGuid string `json:"organization_guid"` NonBasicServicesAllowed bool `json:"non_basic_services_allowed"` TotalServices int `json:"total_services"` TotalRoutes int `json:"total_routes"` MemoryLimit int `json:"memory_limit"` InstanceMemoryLimit int `json:"instance_memory_limit"` AppInstanceLimit int `json:"app_instance_limit"` AppTaskLimit int `json:"app_task_limit"` TotalServiceKeys int `json:"total_service_keys"` TotalReservedRoutePorts int `json:"total_reserved_route_ports"` // contains filtered or unexported fields }
type SpaceQuotasResource ¶
type SpaceQuotasResource struct { Meta Meta `json:"metadata"` Entity SpaceQuota `json:"entity"` }
type SpaceQuotasResponse ¶
type SpaceQuotasResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []SpaceQuotasResource `json:"resources"` }
type SpaceRequest ¶
type SpaceRequest struct { Name string `json:"name"` OrganizationGuid string `json:"organization_guid"` DeveloperGuid []string `json:"developer_guids"` ManagerGuid []string `json:"manager_guids"` AuditorGuid []string `json:"auditor_guids"` DomainGuid []string `json:"domain_guids"` SecurityGroupGuids []string `json:"security_group_guids"` SpaceQuotaDefGuid []string `json:"space_quota_definition_guid"` AllowSSH []string `json:"allow_ssh"` }
type SpaceResource ¶
type SpaceResponse ¶
type SpaceResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []SpaceResource `json:"resources"` }
type SpaceRole ¶
type SpaceRole struct { Guid string `json:"guid"` Admin bool `json:"admin"` Active bool `json:"active"` DefaultSpaceGuid string `json:"default_space_guid"` Username string `json:"username"` SpaceRoles []string `json:"space_roles"` SpacesUrl string `json:"spaces_url"` OrganizationsUrl string `json:"organizations_url"` ManagedOrganizationsUrl string `json:"managed_organizations_url"` BillingManagedOrganizationsUrl string `json:"billing_managed_organizations_url"` AuditedOrganizationsUrl string `json:"audited_organizations_url"` ManagedSpacesUrl string `json:"managed_spaces_url"` AuditedSpacesUrl string `json:"audited_spaces_url"` // contains filtered or unexported fields }
type SpaceRoleResource ¶
type SpaceRoleResponse ¶
type SpaceRoleResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []SpaceRoleResource `json:"resources"` }
type SpaceSummary ¶
type SpaceSummary struct { Guid string `json:"guid"` Name string `json:"name"` Apps []AppSummary `json:"apps"` Services []ServiceSummary `json:"services"` }
type StacksResource ¶
type StacksResponse ¶
type StacksResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []StacksResource `json:"resources"` }
type Task ¶
type Task struct { GUID string `json:"guid"` SequenceID int `json:"sequence_id"` Name string `json:"name"` Command string `json:"command"` State string `json:"state"` MemoryInMb int `json:"memory_in_mb"` DiskInMb int `json:"disk_in_mb"` Result struct { FailureReason string `json:"failure_reason"` } `json:"result"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DropletGUID string `json:"droplet_guid"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` App struct { Href string `json:"href"` } `json:"app"` Droplet struct { Href string `json:"href"` } `json:"droplet"` } `json:"links"` }
Task is a description of a task element.
type TaskListResponse ¶
type TaskListResponse struct { Pagination struct { TotalResults int `json:"total_results"` TotalPages int `json:"total_pages"` First struct { Href string `json:"href"` } `json:"first"` Last struct { Href string `json:"href"` } `json:"last"` Next interface{} `json:"next"` Previous interface{} `json:"previous"` } `json:"pagination"` Tasks []Task `json:"resources"` }
TaskListResponse is the JSON response from the API.
type TaskRequest ¶
type TaskRequest struct { Command string `json:"command"` Name string `json:"name"` MemoryInMegabyte int `json:"memory_in_mb"` DiskInMegabyte int `json:"disk_in_mb"` DropletGUID string `json:"droplet_guid"` }
TaskRequest is a v3 JSON object as described in: http://v3-apidocs.cloudfoundry.org/version/3.0.0/index.html#create-a-task
type User ¶
type User struct { Guid string `json:"guid"` Admin bool `json:"admin"` Active bool `json:"active"` DefaultSpaceGUID string `json:"default_space_guid"` Username string `json:"username"` SpacesURL string `json:"spaces_url"` OrgsURL string `json:"organizations_url"` ManagedOrgsURL string `json:"managed_organizations_url"` BillingManagedOrgsURL string `json:"billing_managed_organizations_url"` AuditedOrgsURL string `json:"audited_organizations_url"` ManagedSpacesURL string `json:"managed_spaces_url"` AuditedSpacesURL string `json:"audited_spaces_url"` // contains filtered or unexported fields }
type UserProvidedServiceInstance ¶
type UserProvidedServiceInstance struct { Name string `json:"name"` Credentials map[string]interface{} `json:"credentials"` SpaceGuid string `json:"space_guid"` Type string `json:"type"` Tags []string `json:"tags"` SpaceUrl string `json:"space_url"` ServiceBindingsUrl string `json:"service_bindings_url"` RoutesUrl string `json:"routes_url"` RouteServiceUrl string `json:"route_service_url"` SyslogDrainUrl string `json:"syslog_drain_url"` Guid string `json:"guid"` // contains filtered or unexported fields }
type UserProvidedServiceInstanceResource ¶
type UserProvidedServiceInstanceResource struct { Meta Meta `json:"metadata"` Entity UserProvidedServiceInstance `json:"entity"` }
type UserProvidedServiceInstancesResponse ¶
type UserProvidedServiceInstancesResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []UserProvidedServiceInstanceResource `json:"resources"` }
type UserRequest ¶
type UserResource ¶
type UserResponse ¶
type UserResponse struct { Count int `json:"total_results"` Pages int `json:"total_pages"` NextUrl string `json:"next_url"` Resources []UserResource `json:"resources"` }
type V3DockerApp ¶
type V3DockerApp struct { Name string `json:"name"` EnvironmentVariables map[string]string `json:"environment_variables,omitempty"` Relationships struct { Space struct { Data struct { GUID string `json:"guid"` } `json:"data"` } `json:"space"` } `json:"relationships"` Lifecycle struct { Type string `json:"type"` Data struct { } `json:"data"` } `json:"lifecycle"` }
type V3DockerAppResponse ¶
type V3DockerBuild ¶
type V3DockerBuild struct { Package struct { GUID string `json:"guid"` } `json:"package"` }
type V3DockerBuildResponse ¶
type V3DockerPackage ¶
Source Files ¶
- appevents.go
- apps.go
- buildpacks.go
- client.go
- domains.go
- error.go
- isolationsegments.go
- org_quotas.go
- orgs.go
- routes.go
- secgroups.go
- service_bindings.go
- service_instances.go
- service_keys.go
- service_plan_visibilities.go
- service_plans.go
- services.go
- space_quotas.go
- spaces.go
- stacks.go
- tasks.go
- types.go
- user_provided_service_instances.go
- users.go