{"modulePath":"github.com/randomtask1155/cli","version":"v6.41.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package internal\n\n## Constants\n\n```go\nconst (\n\tAppsResource              = \"apps\"\n\tBuildsResource            = \"builds\"\n\tDeploymentsResource       = \"deployments\"\n\tDropletsResource          = \"droplets\"\n\tIsolationSegmentsResource = \"isolation_segments\"\n\tOrgsResource              = \"organizations\"\n\tPackagesResource          = \"packages\"\n\tProcessesResource         = \"processes\"\n\tServiceInstancesResource  = \"service_instances\"\n\tSpacesResource            = \"spaces\"\n\tTasksResource             = \"tasks\"\n)\n```\n\n```go\nconst (\n\tDeleteApplicationProcessInstanceRequest                     = \"DeleteApplicationProcessInstance\"\n\tDeleteApplicationRequest                                    = \"DeleteApplication\"\n\tDeleteIsolationSegmentRelationshipOrganizationRequest       = \"DeleteIsolationSegmentRelationshipOrganization\"\n\tDeleteIsolationSegmentRequest                               = \"DeleteIsolationSegment\"\n\tDeleteServiceInstanceRelationshipsSharedSpaceRequest        = \"DeleteServiceInstanceRelationshipsSharedSpace\"\n\tGetApplicationDropletCurrentRequest                         = \"GetApplicationDropletCurrent\"\n\tGetApplicationEnvRequest                                    = \"GetApplicationEnv\"\n\tGetApplicationManifestRequest                               = \"GetApplicationManifest\"\n\tGetApplicationProcessesRequest                              = \"GetApplicationProcesses\"\n\tGetApplicationProcessRequest                                = \"GetApplicationProcess\"\n\tGetApplicationsRequest                                      = \"GetApplications\"\n\tGetApplicationTasksRequest                                  = \"GetApplicationTasks\"\n\tGetBuildRequest                                             = \"GetBuild\"\n\tGetDeploymentRequest                                        = \"GetDeployment\"\n\tGetDeploymentsRequest                                       = \"GetDeployments\"\n\tGetDropletRequest                                           = \"GetDroplet\"\n\tGetDropletsRequest                                          = \"GetDroplets\"\n\tGetIsolationSegmentOrganizationsRequest                     = \"GetIsolationSegmentOrganizations\"\n\tGetIsolationSegmentRequest                                  = \"GetIsolationSegment\"\n\tGetIsolationSegmentsRequest                                 = \"GetIsolationSegments\"\n\tGetOrganizationRelationshipDefaultIsolationSegmentRequest   = \"GetOrganizationRelationshipDefaultIsolationSegment\"\n\tGetOrganizationsRequest                                     = \"GetOrganizations\"\n\tGetPackageRequest                                           = \"GetPackage\"\n\tGetPackagesRequest                                          = \"GetPackages\"\n\tGetProcessStatsRequest                                      = \"GetProcessStats\"\n\tGetServiceInstancesRequest                                  = \"GetServiceInstances\"\n\tGetSpaceRelationshipIsolationSegmentRequest                 = \"GetSpaceRelationshipIsolationSegment\"\n\tGetSpacesRequest                                            = \"GetSpaces\"\n\tPatchApplicationCurrentDropletRequest                       = \"PatchApplicationCurrentDroplet\"\n\tPatchApplicationEnvironmentVariablesRequest                 = \"PatchApplicationEnvironmentVariables\"\n\tPatchApplicationRequest                                     = \"PatchApplication\"\n\tPatchOrganizationRelationshipDefaultIsolationSegmentRequest = \"PatchOrganizationRelationshipDefaultIsolationSegment\"\n\tPatchProcessRequest                                         = \"PatchProcess\"\n\tPatchSpaceRelationshipIsolationSegmentRequest               = \"PatchSpaceRelationshipIsolationSegment\"\n\tPostApplicationActionApplyManifest                          = \"PostApplicationActionApplyM\"\n\tPostApplicationActionRestartRequest                         = \"PostApplicationActionRestart\"\n\tPostApplicationActionStartRequest                           = \"PostApplicationActionStart\"\n\tPostApplicationActionStopRequest                            = \"PostApplicationActionStop\"\n\tPostApplicationDeploymentActionCancelRequest                = \"PostApplicationDeploymentActionCancel\"\n\tPostApplicationDeploymentRequest                            = \"PostApplicationDeployment\"\n\tPostApplicationProcessActionScaleRequest                    = \"PostApplicationProcessActionScale\"\n\tPostApplicationRequest                                      = \"PostApplication\"\n\tPostApplicationTasksRequest                                 = \"PostApplicationTasks\"\n\tPostBuildRequest                                            = \"PostBuild\"\n\tPostIsolationSegmentRelationshipOrganizationsRequest        = \"PostIsolationSegmentRelationshipOrganizations\"\n\tPostIsolationSegmentsRequest                                = \"PostIsolationSegments\"\n\tPostPackageRequest                                          = \"PostPackage\"\n\tPostServiceInstanceRelationshipsSharedSpacesRequest         = \"PostServiceInstanceRelationshipsSharedSpaces\"\n\tPutTaskCancelRequest                                        = \"PutTaskCancel\"\n)\n```\nNaming convention:\n\nHTTP method + non-parameter parts of the path + \"Request\"\n\nIf the request returns a single entity by GUID, use the singular (for example /v2/organizations/:organization\\_guid is GetOrganization).\n\n## Variables\n\n```go\nvar APIRoutes = []Route{\n\t{Resource: AppsResource, Path: \"/\", Method: http.MethodGet, Name: GetApplicationsRequest},\n\t{Resource: AppsResource, Path: \"/\", Method: http.MethodPost, Name: PostApplicationRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid\", Method: http.MethodDelete, Name: DeleteApplicationRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid\", Method: http.MethodPatch, Name: PatchApplicationRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/actions/apply_manifest\", Method: http.MethodPost, Name: PostApplicationActionApplyManifest},\n\t{Resource: AppsResource, Path: \"/:app_guid/actions/restart\", Method: http.MethodPost, Name: PostApplicationActionRestartRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/actions/start\", Method: http.MethodPost, Name: PostApplicationActionStartRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/actions/stop\", Method: http.MethodPost, Name: PostApplicationActionStopRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/droplets/current\", Method: http.MethodGet, Name: GetApplicationDropletCurrentRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/env\", Method: http.MethodGet, Name: GetApplicationEnvRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/environment_variables\", Method: http.MethodPatch, Name: PatchApplicationEnvironmentVariablesRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/manifest\", Method: http.MethodGet, Name: GetApplicationManifestRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/processes\", Method: http.MethodGet, Name: GetApplicationProcessesRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/processes/:type\", Method: http.MethodGet, Name: GetApplicationProcessRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/processes/:type/actions/scale\", Method: http.MethodPost, Name: PostApplicationProcessActionScaleRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/processes/:type/instances/:index\", Method: http.MethodDelete, Name: DeleteApplicationProcessInstanceRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/relationships/current_droplet\", Method: http.MethodPatch, Name: PatchApplicationCurrentDropletRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/tasks\", Method: http.MethodGet, Name: GetApplicationTasksRequest},\n\t{Resource: AppsResource, Path: \"/:app_guid/tasks\", Method: http.MethodPost, Name: PostApplicationTasksRequest},\n\t{Resource: BuildsResource, Path: \"/\", Method: http.MethodPost, Name: PostBuildRequest},\n\t{Resource: BuildsResource, Path: \"/:build_guid\", Method: http.MethodGet, Name: GetBuildRequest},\n\t{Resource: DeploymentsResource, Path: \"/:deployment_guid\", Method: http.MethodGet, Name: GetDeploymentRequest},\n\t{Resource: DeploymentsResource, Path: \"/\", Method: http.MethodPost, Name: PostApplicationDeploymentRequest},\n\t{Resource: DeploymentsResource, Path: \"/\", Method: http.MethodGet, Name: GetDeploymentsRequest},\n\t{Resource: DeploymentsResource, Path: \"/:deployment_guid/actions/cancel\", Method: http.MethodPost, Name: PostApplicationDeploymentActionCancelRequest},\n\t{Resource: DropletsResource, Path: \"/\", Method: http.MethodGet, Name: GetDropletsRequest},\n\t{Resource: DropletsResource, Path: \"/:droplet_guid\", Method: http.MethodGet, Name: GetDropletRequest},\n\t{Resource: IsolationSegmentsResource, Path: \"/\", Method: http.MethodGet, Name: GetIsolationSegmentsRequest},\n\t{Resource: IsolationSegmentsResource, Path: \"/\", Method: http.MethodPost, Name: PostIsolationSegmentsRequest},\n\t{Resource: IsolationSegmentsResource, Path: \"/:isolation_segment_guid\", Method: http.MethodDelete, Name: DeleteIsolationSegmentRequest},\n\t{Resource: IsolationSegmentsResource, Path: \"/:isolation_segment_guid\", Method: http.MethodGet, Name: GetIsolationSegmentRequest},\n\t{Resource: IsolationSegmentsResource, Path: \"/:isolation_segment_guid/organizations\", Method: http.MethodGet, Name: GetIsolationSegmentOrganizationsRequest},\n\t{Resource: IsolationSegmentsResource, Path: \"/:isolation_segment_guid/relationships/organizations\", Method: http.MethodPost, Name: PostIsolationSegmentRelationshipOrganizationsRequest},\n\t{Resource: IsolationSegmentsResource, Path: \"/:isolation_segment_guid/relationships/organizations/:organization_guid\", Method: http.MethodDelete, Name: DeleteIsolationSegmentRelationshipOrganizationRequest},\n\t{Resource: OrgsResource, Path: \"/\", Method: http.MethodGet, Name: GetOrganizationsRequest},\n\t{Resource: OrgsResource, Path: \"/:organization_guid/relationships/default_isolation_segment\", Method: http.MethodGet, Name: GetOrganizationRelationshipDefaultIsolationSegmentRequest},\n\t{Resource: OrgsResource, Path: \"/:organization_guid/relationships/default_isolation_segment\", Method: http.MethodPatch, Name: PatchOrganizationRelationshipDefaultIsolationSegmentRequest},\n\t{Resource: PackagesResource, Path: \"/\", Method: http.MethodGet, Name: GetPackagesRequest},\n\t{Resource: PackagesResource, Path: \"/\", Method: http.MethodPost, Name: PostPackageRequest},\n\t{Resource: PackagesResource, Path: \"/:package_guid\", Method: http.MethodGet, Name: GetPackageRequest},\n\t{Resource: ProcessesResource, Path: \"/:process_guid\", Method: http.MethodPatch, Name: PatchProcessRequest},\n\t{Resource: ProcessesResource, Path: \"/:process_guid/stats\", Method: http.MethodGet, Name: GetProcessStatsRequest},\n\t{Resource: ServiceInstancesResource, Path: \"/\", Method: http.MethodGet, Name: GetServiceInstancesRequest},\n\t{Resource: ServiceInstancesResource, Path: \"/:service_instance_guid/relationships/shared_spaces\", Method: http.MethodPost, Name: PostServiceInstanceRelationshipsSharedSpacesRequest},\n\t{Resource: ServiceInstancesResource, Path: \"/:service_instance_guid/relationships/shared_spaces/:space_guid\", Method: http.MethodDelete, Name: DeleteServiceInstanceRelationshipsSharedSpaceRequest},\n\t{Resource: SpacesResource, Path: \"/\", Method: http.MethodGet, Name: GetSpacesRequest},\n\t{Resource: SpacesResource, Path: \"/:space_guid/relationships/isolation_segment\", Method: http.MethodGet, Name: GetSpaceRelationshipIsolationSegmentRequest},\n\t{Resource: SpacesResource, Path: \"/:space_guid/relationships/isolation_segment\", Method: http.MethodPatch, Name: PatchSpaceRelationshipIsolationSegmentRequest},\n\t{Resource: TasksResource, Path: \"/:task_guid/cancel\", Method: http.MethodPut, Name: PutTaskCancelRequest},\n}\n```\nAPIRoutes is a list of routes used by the router to construct request URLs.\n\n## Types\n\n```go\ntype Params map[string]string\n```\nParams map path keys to values.  For example, if your route has the path pattern:\n\n\t/person/:person_id/pets/:pet_type\n\nThen a correct Params map would lool like:\n\n\trouter.Params{\n\t  \"person_id\": \"123\",\n\t  \"pet_type\": \"cats\",\n\t}\n\n```go\ntype RealTime struct{}\n```\n\n```go\nfunc (RealTime) Now() time.Time\n```\n\n```go\ntype Route struct {\n\t// Name is a key specifying which HTTP route the router should associate with\n\t// the endpoint at runtime.\n\tName string\n\t// Method is any valid HTTP method\n\tMethod string\n\t// Path contains a path pattern\n\tPath string\n\t// Resource is a key specifying which resource root the router should\n\t// associate with the endpoint at runtime.\n\tResource string\n}\n```\nRoute defines the property of a Cloud Controller V3 endpoint.\n\nMethod can be one of the following:\n\n\tGET HEAD POST PUT PATCH DELETE CONNECT OPTIONS TRACE\n\nPath conforms to Pat-style pattern matching. The following docs are taken from [http://godoc.org/github.com/bmizerany/pat#PatternServeMux](http://godoc.org/github.com/bmizerany/pat#PatternServeMux)\n\nPath Patterns may contain literals or captures. Capture names start with a colon and consist of letters A-Z, a-z, \\_, and 0-9. The rest of the pattern matches literally. The portion of the URL matching each name ends with an occurrence of the character in the pattern immediately following the name, or a /, whichever comes first. It is possible for a name to match the empty string.\n\nExample pattern with one capture:\n\n\t/hello/:name\n\nWill match:\n\n\t/hello/blake\n\t/hello/keith\n\nWill not match:\n\n\t/hello/blake/\n\t/hello/blake/foo\n\t/foo\n\t/foo/bar\n\nExample 2:\n\n\t/hello/:name/\n\nWill match:\n\n\t/hello/blake/\n\t/hello/keith/foo\n\t/hello/blake\n\t/hello/keith\n\nWill not match:\n\n\t/foo\n\t/foo/bar\n\n```go\nfunc (r Route) CreatePath(params Params) (string, error)\n```\nCreatePath combines the route's path pattern with a Params map to produce a valid path.\n\n```go\ntype Router struct {\n\t// contains filtered or unexported fields\n}\n```\nRouter combines route and resource information in order to generate HTTP requests.\n\n```go\nfunc NewRouter(routes []Route, resources map[string]string) *Router\n```\nNewRouter returns a pointer to a new Router.\n\n```go\nfunc (router Router) CreateRequest(name string, params Params, body io.Reader) (*http.Request, error)\n```\nCreateRequest returns a request key'd off of the name given. The params are merged into the URL and body is set as the request body.\n\n","path":"github.com/randomtask1155/cli/api/cloudcontroller/ccv3/internal","name":"internal","synopsis":"","isRedistributable":true}
