{"modulePath":"github.com/wfernandes/cli","version":"v6.1.1+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Constants\n\n```go\nconst (\n\tDefaultAppUploadBitsTimeout = 15 * time.Minute\n)\n```\n\n```go\nconst MAX_INT64 int64 = 1\u003c\u003c63 - 1\n```\n\n## Types\n\n```go\ntype AppEventsRepository interface {\n\tRecentEvents(appGuid string, limit uint64) ([]models.EventFields, error)\n}\n```\n\n```go\ntype AppFilesRepository interface {\n\tListFiles(appGuid, path string) (files string, apiErr error)\n}\n```\n\n```go\ntype AppInstancesRepository interface {\n\tGetInstances(appGuid string) (instances []models.AppInstanceFields, apiErr error)\n}\n```\n\n```go\ntype AppSummaryRepository interface {\n\tGetSummariesInCurrentSpace() (apps []models.Application, apiErr error)\n\tGetSummary(appGuid string) (summary models.Application, apiErr error)\n}\n```\n\n```go\ntype ApplicationBitsRepository interface {\n\tUploadApp(appGuid, dir string, cb func(path string, zipSize, fileCount uint64)) (apiErr error)\n}\n```\n\n```go\ntype ApplicationFromSummary struct {\n\tGuid             string\n\tName             string\n\tRoutes           []RouteSummary\n\tRunningInstances int `json:\"running_instances\"`\n\tMemory           uint64\n\tInstances        int\n\tDiskQuota        uint64 `json:\"disk_quota\"`\n\tUrls             []string\n\tState            string\n\tSpaceGuid        string `json:\"space_guid\"`\n}\n```\n\n```go\nfunc (resource ApplicationFromSummary) ToFields() (app models.ApplicationFields)\n```\n\n```go\nfunc (resource ApplicationFromSummary) ToModel() (app models.Application)\n```\n\n```go\ntype ApplicationRepository interface {\n\tCreate(params models.AppParams) (createdApp models.Application, apiErr error)\n\tRead(name string) (app models.Application, apiErr error)\n\tUpdate(appGuid string, params models.AppParams) (updatedApp models.Application, apiErr error)\n\tDelete(appGuid string) (apiErr error)\n}\n```\n\n```go\ntype ApplicationSummaries struct {\n\tApps []ApplicationFromSummary\n}\n```\n\n```go\nfunc (resource ApplicationSummaries) ToModels() (apps []models.ApplicationFields)\n```\n\n```go\ntype AuthenticationRepository interface {\n\tAuthenticate(credentials map[string]string) (apiErr error)\n\tRefreshAuthToken() (updatedToken string, apiErr error)\n\tGetLoginPromptsAndSaveUAAServerURL() (map[string]configuration.AuthPrompt, error)\n}\n```\n\n```go\ntype BuildpackBitsRepository interface {\n\tUploadBuildpack(buildpack models.Buildpack, dir string) (apiErr error)\n}\n```\n\n```go\ntype BuildpackRepository interface {\n\tFindByName(name string) (buildpack models.Buildpack, apiErr error)\n\tListBuildpacks(func(models.Buildpack) bool) error\n\tCreate(name string, position *int, enabled *bool, locked *bool) (createdBuildpack models.Buildpack, apiErr error)\n\tDelete(buildpackGuid string) (apiErr error)\n\tUpdate(buildpack models.Buildpack) (updatedBuildpack models.Buildpack, apiErr error)\n}\n```\n\n```go\ntype CCUserProvidedServiceInstanceRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCCUserProvidedServiceInstanceRepository(config configuration.Reader, gateway net.Gateway) (repo CCUserProvidedServiceInstanceRepository)\n```\n\n```go\nfunc (repo CCUserProvidedServiceInstanceRepository) Create(name, drainUrl string, params map[string]string) (apiErr error)\n```\n\n```go\nfunc (repo CCUserProvidedServiceInstanceRepository) Update(serviceInstanceFields models.ServiceInstanceFields) (apiErr error)\n```\n\n```go\ntype CloudControllerAppEventsRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerAppEventsRepository(config configuration.Reader, gateway net.Gateway, strategy strategy.EndpointStrategy) CloudControllerAppEventsRepository\n```\n\n```go\nfunc (repo CloudControllerAppEventsRepository) RecentEvents(appGuid string, limit uint64) ([]models.EventFields, error)\n```\n\n```go\ntype CloudControllerAppFilesRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerAppFilesRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerAppFilesRepository)\n```\n\n```go\nfunc (repo CloudControllerAppFilesRepository) ListFiles(appGuid, path string) (files string, apiErr error)\n```\n\n```go\ntype CloudControllerAppInstancesRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerAppInstancesRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerAppInstancesRepository)\n```\n\n```go\nfunc (repo CloudControllerAppInstancesRepository) GetInstances(appGuid string) (instances []models.AppInstanceFields, err error)\n```\n\n```go\ntype CloudControllerAppSummaryRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerAppSummaryRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerAppSummaryRepository)\n```\n\n```go\nfunc (repo CloudControllerAppSummaryRepository) GetSummariesInCurrentSpace() (apps []models.Application, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerAppSummaryRepository) GetSummary(appGuid string) (summary models.Application, apiErr error)\n```\n\n```go\ntype CloudControllerApplicationBitsRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerApplicationBitsRepository(config configuration.Reader, gateway net.Gateway, zipper app_files.Zipper) (repo CloudControllerApplicationBitsRepository)\n```\n\n```go\nfunc (repo CloudControllerApplicationBitsRepository) UploadApp(appGuid string, appDir string, fileSizePrinter func(path string, zipSize, fileCount uint64)) (apiErr error)\n```\n\n```go\ntype CloudControllerApplicationRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerApplicationRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerApplicationRepository)\n```\n\n```go\nfunc (repo CloudControllerApplicationRepository) Create(params models.AppParams) (createdApp models.Application, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerApplicationRepository) Delete(appGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerApplicationRepository) Read(name string) (app models.Application, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerApplicationRepository) Update(appGuid string, params models.AppParams) (updatedApp models.Application, apiErr error)\n```\n\n```go\ntype CloudControllerBuildpackBitsRepository struct {\n\tTrustedCerts []tls.Certificate\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerBuildpackBitsRepository(config configuration.Reader, gateway net.Gateway, zipper app_files.Zipper) (repo CloudControllerBuildpackBitsRepository)\n```\n\n```go\nfunc (repo CloudControllerBuildpackBitsRepository) UploadBuildpack(buildpack models.Buildpack, buildpackLocation string) (apiErr error)\n```\n\n```go\ntype CloudControllerBuildpackRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerBuildpackRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerBuildpackRepository)\n```\n\n```go\nfunc (repo CloudControllerBuildpackRepository) Create(name string, position *int, enabled *bool, locked *bool) (createdBuildpack models.Buildpack, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerBuildpackRepository) Delete(buildpackGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerBuildpackRepository) FindByName(name string) (buildpack models.Buildpack, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerBuildpackRepository) ListBuildpacks(cb func(models.Buildpack) bool) error\n```\n\n```go\nfunc (repo CloudControllerBuildpackRepository) Update(buildpack models.Buildpack) (updatedBuildpack models.Buildpack, apiErr error)\n```\n\n```go\ntype CloudControllerCurlRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerCurlRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerCurlRepository)\n```\n\n```go\nfunc (repo CloudControllerCurlRepository) Request(method, path, headerString, body string) (resHeaders, resBody string, err error)\n```\n\n```go\ntype CloudControllerDomainRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerDomainRepository(config configuration.Reader, gateway net.Gateway, strategy strategy.EndpointStrategy) CloudControllerDomainRepository\n```\n\n```go\nfunc (repo CloudControllerDomainRepository) Create(domainName string, owningOrgGuid string) (createdDomain models.DomainFields, err error)\n```\n\n```go\nfunc (repo CloudControllerDomainRepository) CreateSharedDomain(domainName string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerDomainRepository) Delete(domainGuid string) error\n```\n\n```go\nfunc (repo CloudControllerDomainRepository) DeleteSharedDomain(domainGuid string) error\n```\n\n```go\nfunc (repo CloudControllerDomainRepository) FindByName(name string) (domain models.DomainFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerDomainRepository) FindByNameInOrg(name string, orgGuid string) (domain models.DomainFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerDomainRepository) ListDomainsForOrg(orgGuid string, cb func(models.DomainFields) bool) error\n```\n\n```go\ntype CloudControllerOrganizationRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerOrganizationRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerOrganizationRepository)\n```\n\n```go\nfunc (repo CloudControllerOrganizationRepository) Create(name string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerOrganizationRepository) Delete(orgGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerOrganizationRepository) FindByName(name string) (org models.Organization, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerOrganizationRepository) ListOrgs(cb func(models.Organization) bool) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerOrganizationRepository) Rename(orgGuid string, name string) (apiErr error)\n```\n\n```go\ntype CloudControllerPasswordRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerPasswordRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerPasswordRepository)\n```\n\n```go\nfunc (repo CloudControllerPasswordRepository) UpdatePassword(old string, new string) error\n```\n\n```go\ntype CloudControllerQuotaRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerQuotaRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerQuotaRepository)\n```\n\n```go\nfunc (repo CloudControllerQuotaRepository) AssignQuotaToOrg(orgGuid, quotaGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerQuotaRepository) Create(quota models.QuotaFields) error\n```\n\n```go\nfunc (repo CloudControllerQuotaRepository) Delete(quotaGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerQuotaRepository) FindAll() (quotas []models.QuotaFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerQuotaRepository) FindByName(name string) (quota models.QuotaFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerQuotaRepository) Update(quota models.QuotaFields) error\n```\n\n```go\ntype CloudControllerRouteRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerRouteRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerRouteRepository)\n```\n\n```go\nfunc (repo CloudControllerRouteRepository) Bind(routeGuid, appGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerRouteRepository) Create(host, domainGuid string) (createdRoute models.Route, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerRouteRepository) CreateInSpace(host, domainGuid, spaceGuid string) (createdRoute models.Route, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerRouteRepository) Delete(routeGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerRouteRepository) FindByHostAndDomain(host string, domain models.DomainFields) (route models.Route, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerRouteRepository) ListRoutes(cb func(models.Route) bool) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerRouteRepository) Unbind(routeGuid, appGuid string) (apiErr error)\n```\n\n```go\ntype CloudControllerServiceAuthTokenRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerServiceAuthTokenRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerServiceAuthTokenRepository)\n```\n\n```go\nfunc (repo CloudControllerServiceAuthTokenRepository) Create(authToken models.ServiceAuthTokenFields) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceAuthTokenRepository) Delete(authToken models.ServiceAuthTokenFields) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceAuthTokenRepository) FindAll() (authTokens []models.ServiceAuthTokenFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceAuthTokenRepository) FindByLabelAndProvider(label, provider string) (authToken models.ServiceAuthTokenFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceAuthTokenRepository) Update(authToken models.ServiceAuthTokenFields) (apiErr error)\n```\n\n```go\ntype CloudControllerServiceBindingRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerServiceBindingRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerServiceBindingRepository)\n```\n\n```go\nfunc (repo CloudControllerServiceBindingRepository) Create(instanceGuid, appGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceBindingRepository) Delete(instance models.ServiceInstance, appGuid string) (found bool, apiErr error)\n```\n\n```go\ntype CloudControllerServiceBrokerRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerServiceBrokerRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerServiceBrokerRepository)\n```\n\n```go\nfunc (repo CloudControllerServiceBrokerRepository) Create(name, url, username, password string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceBrokerRepository) Delete(guid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceBrokerRepository) FindByName(name string) (serviceBroker models.ServiceBroker, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceBrokerRepository) ListServiceBrokers(callback func(models.ServiceBroker) bool) error\n```\n\n```go\nfunc (repo CloudControllerServiceBrokerRepository) Rename(guid, name string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceBrokerRepository) Update(serviceBroker models.ServiceBroker) (apiErr error)\n```\n\n```go\ntype CloudControllerServiceRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerServiceRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerServiceRepository)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) CreateServiceInstance(name, planGuid string) (err error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) DeleteService(instance models.ServiceInstance) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) FindInstanceByName(name string) (instance models.ServiceInstance, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) FindServiceOfferingByLabelAndProvider(label, provider string) (models.ServiceOffering, error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) FindServiceOfferingsForSpaceByLabel(spaceGuid, name string) (offerings models.ServiceOfferings, err error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) FindServicePlanByDescription(planDescription resources.ServicePlanDescription) (string, error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) GetAllServiceOfferings() (models.ServiceOfferings, error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) GetServiceInstanceCountForServicePlan(v1PlanGuid string) (count int, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) GetServiceOfferingsForSpace(spaceGuid string) (models.ServiceOfferings, error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) MigrateServicePlanFromV1ToV2(v1PlanGuid, v2PlanGuid string) (changedCount int, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) PurgeServiceOffering(offering models.ServiceOffering) error\n```\n\n```go\nfunc (repo CloudControllerServiceRepository) RenameService(instance models.ServiceInstance, newName string) (apiErr error)\n```\n\n```go\ntype CloudControllerServiceSummaryRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerServiceSummaryRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerServiceSummaryRepository)\n```\n\n```go\nfunc (repo CloudControllerServiceSummaryRepository) GetSummariesInCurrentSpace() (instances []models.ServiceInstance, apiErr error)\n```\n\n```go\ntype CloudControllerSpaceRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerSpaceRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerSpaceRepository)\n```\n\n```go\nfunc (repo CloudControllerSpaceRepository) Create(name string, orgGuid string) (space models.Space, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerSpaceRepository) Delete(spaceGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerSpaceRepository) FindByName(name string) (space models.Space, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerSpaceRepository) FindByNameInOrg(name, orgGuid string) (space models.Space, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerSpaceRepository) ListSpaces(callback func(models.Space) bool) error\n```\n\n```go\nfunc (repo CloudControllerSpaceRepository) Rename(spaceGuid, newName string) (apiErr error)\n```\n\n```go\ntype CloudControllerStackRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerStackRepository(config configuration.Reader, gateway net.Gateway) (repo CloudControllerStackRepository)\n```\n\n```go\nfunc (repo CloudControllerStackRepository) FindAll() (stacks []models.Stack, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerStackRepository) FindByName(name string) (stack models.Stack, apiErr error)\n```\n\n```go\ntype CloudControllerUserRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerUserRepository(config configuration.Reader, uaaGateway net.Gateway, ccGateway net.Gateway) (repo CloudControllerUserRepository)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) Create(username, password string) (err error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) Delete(userGuid string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) FindByUsername(username string) (user models.UserFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) ListUsersInOrgForRole(orgGuid string, roleName string) (users []models.UserFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) ListUsersInSpaceForRole(spaceGuid string, roleName string) (users []models.UserFields, apiErr error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) SetOrgRole(userGuid string, orgGuid string, role string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) SetSpaceRole(userGuid, spaceGuid, orgGuid, role string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) UnsetOrgRole(userGuid, orgGuid, role string) (apiErr error)\n```\n\n```go\nfunc (repo CloudControllerUserRepository) UnsetSpaceRole(userGuid, spaceGuid, role string) (apiErr error)\n```\n\n```go\ntype CurlRepository interface {\n\tRequest(method, path, header, body string) (resHeaders, resBody string, apiErr error)\n}\n```\n\n```go\ntype DomainRepository interface {\n\tListDomainsForOrg(orgGuid string, cb func(models.DomainFields) bool) error\n\tFindByName(name string) (domain models.DomainFields, apiErr error)\n\tFindByNameInOrg(name string, owningOrgGuid string) (domain models.DomainFields, apiErr error)\n\tCreate(domainName string, owningOrgGuid string) (createdDomain models.DomainFields, apiErr error)\n\tCreateSharedDomain(domainName string) (apiErr error)\n\tDelete(domainGuid string) (apiErr error)\n\tDeleteSharedDomain(domainGuid string) (apiErr error)\n}\n```\n\n```go\ntype DomainSummary struct {\n\tGuid                   string\n\tName                   string\n\tOwningOrganizationGuid string\n}\n```\n\n```go\ntype EndpointRepository interface {\n\tUpdateEndpoint(endpoint string) (finalEndpoint string, apiErr error)\n}\n```\n\n```go\ntype InstanceApiResponse struct {\n\tState string\n\tSince float64\n}\n```\n\n```go\ntype InstanceStatsApiResponse struct {\n\tStats struct {\n\t\tDiskQuota uint64 `json:\"disk_quota\"`\n\t\tMemQuota  uint64 `json:\"mem_quota\"`\n\t\tUsage     struct {\n\t\t\tCpu  float64\n\t\t\tDisk uint64\n\t\t\tMem  uint64\n\t\t}\n\t}\n}\n```\n\n```go\ntype InstancesApiResponse map[string]InstanceApiResponse\n```\n\n```go\ntype LoggregatorLogsRepository struct {\n\tTrustedCerts []tls.Certificate\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewLoggregatorLogsRepository(config configuration.Reader, consumer consumer.LoggregatorConsumer) LoggregatorLogsRepository\n```\n\n```go\nfunc (repo LoggregatorLogsRepository) Close()\n```\n\n```go\nfunc (repo LoggregatorLogsRepository) RecentLogsFor(appGuid string) ([]*logmessage.LogMessage, error)\n```\n\n```go\nfunc (repo LoggregatorLogsRepository) TailLogsFor(appGuid string, bufferTime time.Duration, onConnect func(), onMessage func(*logmessage.LogMessage)) error\n```\n\n```go\ntype LoginResource struct {\n\tPrompts map[string][]string\n\tLinks   map[string]string\n}\n```\n\n```go\ntype LogsRepository interface {\n\tRecentLogsFor(appGuid string) ([]*logmessage.LogMessage, error)\n\tTailLogsFor(appGuid string, bufferTime time.Duration, onConnect func(), onMessage func(*logmessage.LogMessage)) error\n\tClose()\n}\n```\n\n```go\ntype OrganizationRepository interface {\n\tListOrgs(func(models.Organization) bool) (apiErr error)\n\tFindByName(name string) (org models.Organization, apiErr error)\n\tCreate(name string) (apiErr error)\n\tRename(orgGuid string, name string) (apiErr error)\n\tDelete(orgGuid string) (apiErr error)\n}\n```\n\n```go\ntype PasswordRepository interface {\n\tUpdatePassword(old string, new string) error\n}\n```\n\n```go\ntype QuotaRepository interface {\n\tFindAll() (quotas []models.QuotaFields, apiErr error)\n\tFindByName(name string) (quota models.QuotaFields, apiErr error)\n\n\tAssignQuotaToOrg(orgGuid, quotaGuid string) error\n\n\t// CRUD ahoy\n\tCreate(quota models.QuotaFields) error\n\tUpdate(quota models.QuotaFields) error\n\tDelete(quotaGuid string) error\n}\n```\n\n```go\ntype RemoteEndpointRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewEndpointRepository(config configuration.ReadWriter, gateway net.Gateway) (repo RemoteEndpointRepository)\n```\n\n```go\nfunc (repo RemoteEndpointRepository) UpdateEndpoint(endpoint string) (finalEndpoint string, apiErr error)\n```\n\n```go\ntype RepositoryLocator struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewRepositoryLocator(config configuration.ReadWriter, gatewaysByName map[string]net.Gateway) (loc RepositoryLocator)\n```\n\n```go\nfunc (locator RepositoryLocator) GetAppEventsRepository() AppEventsRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetAppFilesRepository() AppFilesRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetAppInstancesRepository() AppInstancesRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetAppSummaryRepository() AppSummaryRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetApplicationBitsRepository() ApplicationBitsRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetApplicationRepository() ApplicationRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetAuthenticationRepository() AuthenticationRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetBuildpackBitsRepository() BuildpackBitsRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetBuildpackRepository() BuildpackRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetCurlRepository() CurlRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetDomainRepository() DomainRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetEndpointRepository() EndpointRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetLogsRepository() LogsRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetOrganizationRepository() OrganizationRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetPasswordRepository() PasswordRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetQuotaRepository() QuotaRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetRouteRepository() RouteRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetServiceAuthTokenRepository() ServiceAuthTokenRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetServiceBindingRepository() ServiceBindingRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetServiceBrokerRepository() ServiceBrokerRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetServiceRepository() ServiceRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetServiceSummaryRepository() ServiceSummaryRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetSpaceRepository() SpaceRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetStackRepository() StackRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetUserProvidedServiceInstanceRepository() UserProvidedServiceInstanceRepository\n```\n\n```go\nfunc (locator RepositoryLocator) GetUserRepository() UserRepository\n```\n\n```go\ntype RouteRepository interface {\n\tListRoutes(cb func(models.Route) bool) (apiErr error)\n\tFindByHostAndDomain(host string, domain models.DomainFields) (route models.Route, apiErr error)\n\tCreate(host, domainGuid string) (createdRoute models.Route, apiErr error)\n\tCreateInSpace(host, domainGuid, spaceGuid string) (createdRoute models.Route, apiErr error)\n\tBind(routeGuid, appGuid string) (apiErr error)\n\tUnbind(routeGuid, appGuid string) (apiErr error)\n\tDelete(routeGuid string) (apiErr error)\n}\n```\n\n```go\ntype RouteSummary struct {\n\tGuid   string\n\tHost   string\n\tDomain DomainSummary\n}\n```\n\n```go\nfunc (resource RouteSummary) ToModel() (route models.RouteSummary)\n```\n\n```go\ntype ServiceAuthTokenRepository interface {\n\tFindAll() (authTokens []models.ServiceAuthTokenFields, apiErr error)\n\tFindByLabelAndProvider(label, provider string) (authToken models.ServiceAuthTokenFields, apiErr error)\n\tCreate(authToken models.ServiceAuthTokenFields) (apiErr error)\n\tUpdate(authToken models.ServiceAuthTokenFields) (apiErr error)\n\tDelete(authToken models.ServiceAuthTokenFields) (apiErr error)\n}\n```\n\n```go\ntype ServiceBindingRepository interface {\n\tCreate(instanceGuid, appGuid string) (apiErr error)\n\tDelete(instance models.ServiceInstance, appGuid string) (found bool, apiErr error)\n}\n```\n\n```go\ntype ServiceBrokerRepository interface {\n\tListServiceBrokers(callback func(models.ServiceBroker) bool) error\n\tFindByName(name string) (serviceBroker models.ServiceBroker, apiErr error)\n\tCreate(name, url, username, password string) (apiErr error)\n\tUpdate(serviceBroker models.ServiceBroker) (apiErr error)\n\tRename(guid, name string) (apiErr error)\n\tDelete(guid string) (apiErr error)\n}\n```\n\n```go\ntype ServiceInstanceSummary struct {\n\tName        string\n\tServicePlan ServicePlanSummary `json:\"service_plan\"`\n}\n```\n\n```go\ntype ServiceInstanceSummaryApp struct {\n\tName         string\n\tServiceNames []string `json:\"service_names\"`\n}\n```\n\n```go\ntype ServiceInstancesSummaries struct {\n\tApps             []ServiceInstanceSummaryApp\n\tServiceInstances []ServiceInstanceSummary `json:\"services\"`\n}\n```\n\n```go\nfunc (resource ServiceInstancesSummaries) ToModels() (instances []models.ServiceInstance)\n```\n\n```go\ntype ServiceOfferingSummary struct {\n\tLabel    string\n\tProvider string\n\tVersion  string\n}\n```\n\n```go\ntype ServicePlanSummary struct {\n\tName            string\n\tGuid            string\n\tServiceOffering ServiceOfferingSummary `json:\"service\"`\n}\n```\n\n```go\ntype ServiceRepository interface {\n\tPurgeServiceOffering(offering models.ServiceOffering) error\n\tFindServiceOfferingByLabelAndProvider(name, provider string) (offering models.ServiceOffering, apiErr error)\n\tFindServiceOfferingsForSpaceByLabel(spaceGuid, name string) (offering models.ServiceOfferings, apiErr error)\n\tGetAllServiceOfferings() (offerings models.ServiceOfferings, apiErr error)\n\tGetServiceOfferingsForSpace(spaceGuid string) (offerings models.ServiceOfferings, apiErr error)\n\tFindInstanceByName(name string) (instance models.ServiceInstance, apiErr error)\n\tCreateServiceInstance(name, planGuid string) (apiErr error)\n\tRenameService(instance models.ServiceInstance, newName string) (apiErr error)\n\tDeleteService(instance models.ServiceInstance) (apiErr error)\n\tFindServicePlanByDescription(planDescription resources.ServicePlanDescription) (planGuid string, apiErr error)\n\tGetServiceInstanceCountForServicePlan(v1PlanGuid string) (count int, apiErr error)\n\tMigrateServicePlanFromV1ToV2(v1PlanGuid, v2PlanGuid string) (changedCount int, apiErr error)\n}\n```\n\n```go\ntype ServiceSummaryRepository interface {\n\tGetSummariesInCurrentSpace() (instances []models.ServiceInstance, apiErr error)\n}\n```\n\n```go\ntype SortedMessageQueue struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewSortedMessageQueue(printTimeBuffer time.Duration, clock func() time.Time) *SortedMessageQueue\n```\n\n```go\nfunc (pq SortedMessageQueue) Len() int\n```\n\n```go\nfunc (pq SortedMessageQueue) Less(i, j int) bool\n```\n\n```go\nfunc (pq *SortedMessageQueue) NextTimestamp() int64\n```\n\n```go\nfunc (pq *SortedMessageQueue) PopMessage() *logmessage.LogMessage\n```\n\n```go\nfunc (pq *SortedMessageQueue) PushMessage(message *logmessage.LogMessage)\n```\n\n```go\nfunc (pq SortedMessageQueue) Swap(i, j int)\n```\n\n```go\ntype SpaceRepository interface {\n\tListSpaces(func(models.Space) bool) error\n\tFindByName(name string) (space models.Space, apiErr error)\n\tFindByNameInOrg(name, orgGuid string) (space models.Space, apiErr error)\n\tCreate(name string, orgGuid string) (space models.Space, apiErr error)\n\tRename(spaceGuid, newName string) (apiErr error)\n\tDelete(spaceGuid string) (apiErr error)\n}\n```\n\n```go\ntype StackRepository interface {\n\tFindByName(name string) (stack models.Stack, apiErr error)\n\tFindAll() (stacks []models.Stack, apiErr error)\n}\n```\n\n```go\ntype StatsApiResponse map[string]InstanceStatsApiResponse\n```\n\n```go\ntype UAAAuthenticationRepository struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewUAAAuthenticationRepository(gateway net.Gateway, config configuration.ReadWriter) (uaa UAAAuthenticationRepository)\n```\n\n```go\nfunc (uaa UAAAuthenticationRepository) Authenticate(credentials map[string]string) (apiErr error)\n```\n\n```go\nfunc (uaa UAAAuthenticationRepository) GetLoginPromptsAndSaveUAAServerURL() (prompts map[string]configuration.AuthPrompt, apiErr error)\n```\n\n```go\nfunc (uaa UAAAuthenticationRepository) RefreshAuthToken() (updatedToken string, apiErr error)\n```\n\n```go\ntype UserProvidedServiceInstanceRepository interface {\n\tCreate(name, drainUrl string, params map[string]string) (apiErr error)\n\tUpdate(serviceInstanceFields models.ServiceInstanceFields) (apiErr error)\n}\n```\n\n```go\ntype UserRepository interface {\n\tFindByUsername(username string) (user models.UserFields, apiErr error)\n\tListUsersInOrgForRole(orgGuid string, role string) ([]models.UserFields, error)\n\tListUsersInSpaceForRole(spaceGuid string, role string) ([]models.UserFields, error)\n\tCreate(username, password string) (apiErr error)\n\tDelete(userGuid string) (apiErr error)\n\tSetOrgRole(userGuid, orgGuid, role string) (apiErr error)\n\tUnsetOrgRole(userGuid, orgGuid, role string) (apiErr error)\n\tSetSpaceRole(userGuid, spaceGuid, orgGuid, role string) (apiErr error)\n\tUnsetSpaceRole(userGuid, spaceGuid, role string) (apiErr error)\n}\n```\n\n","path":"github.com/wfernandes/cli/src/cf/api","name":"api","synopsis":"","isRedistributable":true}
