api

package
v6.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2014 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCloudControllerTestRequest

func NewCloudControllerTestRequest(request testnet.TestRequest) testnet.TestRequest

Types

type FakeAppEventsRepo

type FakeAppEventsRepo struct {
	AppGuid     string
	Events      []models.EventFields
	ApiResponse net.ApiResponse
}

func (FakeAppEventsRepo) ListEvents

func (repo FakeAppEventsRepo) ListEvents(appGuid string, cb func(models.EventFields) bool) net.ApiResponse

type FakeAppFilesRepo

type FakeAppFilesRepo struct {
	AppGuid  string
	Path     string
	FileList string
}

func (*FakeAppFilesRepo) ListFiles

func (repo *FakeAppFilesRepo) ListFiles(appGuid, path string) (files string, apiResponse net.ApiResponse)

type FakeAppInstancesRepo

type FakeAppInstancesRepo struct {
	GetInstancesAppGuid    string
	GetInstancesResponses  [][]models.AppInstanceFields
	GetInstancesErrorCodes []string
}

func (*FakeAppInstancesRepo) GetInstances

func (repo *FakeAppInstancesRepo) GetInstances(appGuid string) (instances []models.AppInstanceFields, apiResponse net.ApiResponse)

type FakeAppSummaryRepo

type FakeAppSummaryRepo struct {
	GetSummariesInCurrentSpaceApps []models.AppSummary

	GetSummaryErrorCode string
	GetSummaryAppGuid   string
	GetSummarySummary   models.AppSummary
}

func (*FakeAppSummaryRepo) GetSummariesInCurrentSpace

func (repo *FakeAppSummaryRepo) GetSummariesInCurrentSpace() (apps []models.AppSummary, apiResponse net.ApiResponse)

func (*FakeAppSummaryRepo) GetSummary

func (repo *FakeAppSummaryRepo) GetSummary(appGuid string) (summary models.AppSummary, apiResponse net.ApiResponse)

type FakeApplicationBitsRepository

type FakeApplicationBitsRepository struct {
	UploadedAppGuid string
	UploadedDir     string
	UploadAppErr    bool

	CallbackPath      string
	CallbackZipSize   uint64
	CallbackFileCount uint64
}

func (*FakeApplicationBitsRepository) UploadApp

func (repo *FakeApplicationBitsRepository) UploadApp(appGuid, dir string, cb func(path string, zipSize, fileCount uint64)) (apiResponse net.ApiResponse)

type FakeApplicationRepository

type FakeApplicationRepository struct {
	FindAllApps []models.Application

	ReadName     string
	ReadApp      models.Application
	ReadErr      bool
	ReadAuthErr  bool
	ReadNotFound bool

	CreateAppParams []models.AppParams

	UpdateParams    models.AppParams
	UpdateAppGuid   string
	UpdateAppResult models.Application
	UpdateErr       bool

	DeletedAppGuid string
}

func (*FakeApplicationRepository) Create

func (repo *FakeApplicationRepository) Create(params models.AppParams) (resultApp models.Application, apiResponse net.ApiResponse)

func (*FakeApplicationRepository) CreatedAppParams

func (repo *FakeApplicationRepository) CreatedAppParams() (params models.AppParams)

func (*FakeApplicationRepository) Delete

func (repo *FakeApplicationRepository) Delete(appGuid string) (apiResponse net.ApiResponse)

func (*FakeApplicationRepository) Read

func (repo *FakeApplicationRepository) Read(name string) (app models.Application, apiResponse net.ApiResponse)

func (*FakeApplicationRepository) Update

func (repo *FakeApplicationRepository) Update(appGuid string, params models.AppParams) (updatedApp models.Application, apiResponse net.ApiResponse)

type FakeAuthTokenRepo

type FakeAuthTokenRepo struct {
	CreatedServiceAuthTokenFields models.ServiceAuthTokenFields

	FindAllAuthTokens []models.ServiceAuthTokenFields

	FindByLabelAndProviderLabel                  string
	FindByLabelAndProviderProvider               string
	FindByLabelAndProviderServiceAuthTokenFields models.ServiceAuthTokenFields
	FindByLabelAndProviderApiResponse            net.ApiResponse

	UpdatedServiceAuthTokenFields models.ServiceAuthTokenFields

	DeletedServiceAuthTokenFields models.ServiceAuthTokenFields
}

func (*FakeAuthTokenRepo) Create

func (repo *FakeAuthTokenRepo) Create(authToken models.ServiceAuthTokenFields) (apiResponse net.ApiResponse)

func (*FakeAuthTokenRepo) Delete

func (repo *FakeAuthTokenRepo) Delete(authToken models.ServiceAuthTokenFields) (apiResponse net.ApiResponse)

func (*FakeAuthTokenRepo) FindAll

func (repo *FakeAuthTokenRepo) FindAll() (authTokens []models.ServiceAuthTokenFields, apiResponse net.ApiResponse)

func (*FakeAuthTokenRepo) FindByLabelAndProvider

func (repo *FakeAuthTokenRepo) FindByLabelAndProvider(label, provider string) (authToken models.ServiceAuthTokenFields, apiResponse net.ApiResponse)

func (*FakeAuthTokenRepo) Update

func (repo *FakeAuthTokenRepo) Update(authToken models.ServiceAuthTokenFields) (apiResponse net.ApiResponse)

type FakeAuthenticationRepository

type FakeAuthenticationRepository struct {
	Config           configuration.ReadWriter
	AuthenticateArgs struct {
		Credentials map[string]string
	}

	AuthError    bool
	AccessToken  string
	RefreshToken string
}

func (*FakeAuthenticationRepository) Authenticate

func (auth *FakeAuthenticationRepository) Authenticate(credentials map[string]string) (apiResponse net.ApiResponse)

func (*FakeAuthenticationRepository) RefreshAuthToken

func (auth *FakeAuthenticationRepository) RefreshAuthToken() (updatedToken string, apiResponse net.ApiResponse)

type FakeBuildpackBitsRepository

type FakeBuildpackBitsRepository struct {
	UploadBuildpackErr         bool
	UploadBuildpackApiResponse net.ApiResponse
	UploadBuildpackPath        string
}

func (*FakeBuildpackBitsRepository) UploadBuildpack

func (repo *FakeBuildpackBitsRepository) UploadBuildpack(buildpack models.Buildpack, dir string) net.ApiResponse

type FakeBuildpackRepository

type FakeBuildpackRepository struct {
	Buildpacks []models.Buildpack

	FindByNameNotFound    bool
	FindByNameName        string
	FindByNameBuildpack   models.Buildpack
	FindByNameApiResponse net.ApiResponse

	CreateBuildpackExists bool
	CreateBuildpack       models.Buildpack
	CreateApiResponse     net.ApiResponse

	DeleteBuildpackGuid string
	DeleteApiResponse   net.ApiResponse

	UpdateBuildpack models.Buildpack
}

func (*FakeBuildpackRepository) Create

func (repo *FakeBuildpackRepository) Create(name string, position *int, enabled *bool, locked *bool) (createdBuildpack models.Buildpack, apiResponse net.ApiResponse)

func (*FakeBuildpackRepository) Delete

func (repo *FakeBuildpackRepository) Delete(buildpackGuid string) (apiResponse net.ApiResponse)

func (*FakeBuildpackRepository) FindByName

func (repo *FakeBuildpackRepository) FindByName(name string) (buildpack models.Buildpack, apiResponse net.ApiResponse)

func (*FakeBuildpackRepository) ListBuildpacks

func (repo *FakeBuildpackRepository) ListBuildpacks(cb func(models.Buildpack) bool) net.ApiResponse

func (*FakeBuildpackRepository) Update

func (repo *FakeBuildpackRepository) Update(buildpack models.Buildpack) (updatedBuildpack models.Buildpack, apiResponse net.ApiResponse)

type FakeCurlRepository

type FakeCurlRepository struct {
	Method         string
	Path           string
	Header         string
	Body           string
	ResponseHeader string
	ResponseBody   string
	ApiResponse    net.ApiResponse
}

func (*FakeCurlRepository) Request

func (repo *FakeCurlRepository) Request(method, path, header, body string) (resHeaders, resBody string, apiResponse net.ApiResponse)

type FakeDomainRepository

type FakeDomainRepository struct {
	ListDomainsForOrgDomainsGuid string
	ListDomainsForOrgDomains     []models.DomainFields
	ListDomainsForOrgApiResponse net.ApiResponse

	ListSharedDomainsDomains     []models.DomainFields
	ListSharedDomainsApiResponse net.ApiResponse

	ListDomainsDomains     []models.DomainFields
	ListDomainsApiResponse net.ApiResponse

	FindByNameInOrgName        string
	FindByNameInOrgGuid        string
	FindByNameInOrgDomain      models.DomainFields
	FindByNameInOrgApiResponse net.ApiResponse

	FindByNameName     string
	FindByNameDomain   models.DomainFields
	FindByNameNotFound bool
	FindByNameErr      bool

	CreateDomainName          string
	CreateDomainOwningOrgGuid string

	CreateSharedDomainName string

	DeleteDomainGuid  string
	DeleteApiResponse net.ApiResponse

	DeleteSharedDomainGuid  string
	DeleteSharedApiResponse net.ApiResponse
}

func (*FakeDomainRepository) Create

func (repo *FakeDomainRepository) Create(domainName string, owningOrgGuid string) (createdDomain models.DomainFields, apiResponse net.ApiResponse)

func (*FakeDomainRepository) CreateSharedDomain

func (repo *FakeDomainRepository) CreateSharedDomain(domainName string) (apiResponse net.ApiResponse)

func (*FakeDomainRepository) Delete

func (repo *FakeDomainRepository) Delete(domainGuid string) (apiResponse net.ApiResponse)

func (*FakeDomainRepository) DeleteSharedDomain

func (repo *FakeDomainRepository) DeleteSharedDomain(domainGuid string) (apiResponse net.ApiResponse)

func (*FakeDomainRepository) FindByName

func (repo *FakeDomainRepository) FindByName(name string) (domain models.DomainFields, apiResponse net.ApiResponse)

func (*FakeDomainRepository) FindByNameInOrg

func (repo *FakeDomainRepository) FindByNameInOrg(name string, owningOrgGuid string) (domain models.DomainFields, apiResponse net.ApiResponse)

func (*FakeDomainRepository) ListDomains

func (repo *FakeDomainRepository) ListDomains(cb func(models.DomainFields) bool) net.ApiResponse

func (*FakeDomainRepository) ListDomainsForOrg

func (repo *FakeDomainRepository) ListDomainsForOrg(orgGuid string, cb func(models.DomainFields) bool) net.ApiResponse

func (*FakeDomainRepository) ListSharedDomains

func (repo *FakeDomainRepository) ListSharedDomains(cb func(models.DomainFields) bool) net.ApiResponse

type FakeEndpointRepo

type FakeEndpointRepo struct {
	Config configuration.ReadWriter

	UpdateEndpointReceived string
	UpdateEndpointError    net.ApiResponse

	LoggregatorEndpointReturns struct {
		Endpoint    string
		ApiResponse net.ApiResponse
	}

	UAAEndpointReturns struct {
		Endpoint    string
		ApiResponse net.ApiResponse
	}
}

func (*FakeEndpointRepo) GetCloudControllerEndpoint

func (repo *FakeEndpointRepo) GetCloudControllerEndpoint() (endpoint string, apiResponse net.ApiResponse)

func (*FakeEndpointRepo) GetLoggregatorEndpoint

func (repo *FakeEndpointRepo) GetLoggregatorEndpoint() (endpoint string, apiResponse net.ApiResponse)

func (*FakeEndpointRepo) GetUAAEndpoint

func (repo *FakeEndpointRepo) GetUAAEndpoint() (endpoint string, apiResponse net.ApiResponse)

func (*FakeEndpointRepo) UpdateEndpoint

func (repo *FakeEndpointRepo) UpdateEndpoint(endpoint string) (finalEndpoint string, apiResponse net.ApiResponse)

type FakeLogsRepository

type FakeLogsRepository struct {
	AppLoggedGuid     string
	RecentLogs        []*logmessage.Message
	TailLogMessages   []*logmessage.Message
	TailLogStopCalled bool
	TailLogErr        error
}

func (*FakeLogsRepository) RecentLogsFor

func (l *FakeLogsRepository) RecentLogsFor(appGuid string, onConnect func(), logChan chan *logmessage.Message) (err error)

func (*FakeLogsRepository) TailLogsFor

func (l *FakeLogsRepository) TailLogsFor(appGuid string, onConnect func(), logChan chan *logmessage.Message, stopLoggingChan chan bool, printInterval time.Duration) (err error)

type FakeOrgRepository

type FakeOrgRepository struct {
	Organizations []models.Organization

	CreateName      string
	CreateOrgExists bool

	FindByNameName         string
	FindByNameErr          bool
	FindByNameNotFound     bool
	FindByNameOrganization models.Organization

	RenameOrganizationGuid string
	RenameNewName          string

	DeletedOrganizationGuid string
}

func (*FakeOrgRepository) Create

func (repo *FakeOrgRepository) Create(name string) (apiResponse net.ApiResponse)

func (*FakeOrgRepository) Delete

func (repo *FakeOrgRepository) Delete(orgGuid string) (apiResponse net.ApiResponse)

func (*FakeOrgRepository) FindByName

func (repo *FakeOrgRepository) FindByName(name string) (org models.Organization, apiResponse net.ApiResponse)

func (FakeOrgRepository) ListOrgs

func (repo FakeOrgRepository) ListOrgs(cb func(models.Organization) bool) (apiResponse net.ApiResponse)

func (*FakeOrgRepository) Rename

func (repo *FakeOrgRepository) Rename(orgGuid string, name string) (apiResponse net.ApiResponse)

type FakePasswordRepo

type FakePasswordRepo struct {
	Score          string
	ScoredPassword string

	UpdateUnauthorized bool
	UpdateNewPassword  string
	UpdateOldPassword  string
}

func (*FakePasswordRepo) UpdatePassword

func (repo *FakePasswordRepo) UpdatePassword(old string, new string) (apiResponse net.ApiResponse)

type FakeQuotaRepository

type FakeQuotaRepository struct {
	FindAllQuotas []models.QuotaFields

	FindByNameName     string
	FindByNameQuota    models.QuotaFields
	FindByNameNotFound bool
	FindByNameErr      bool

	UpdateOrgGuid   string
	UpdateQuotaGuid string
}

func (*FakeQuotaRepository) FindAll

func (repo *FakeQuotaRepository) FindAll() (quotas []models.QuotaFields, apiResponse net.ApiResponse)

func (*FakeQuotaRepository) FindByName

func (repo *FakeQuotaRepository) FindByName(name string) (quota models.QuotaFields, apiResponse net.ApiResponse)

func (*FakeQuotaRepository) Update

func (repo *FakeQuotaRepository) Update(orgGuid, quotaGuid string) (apiResponse net.ApiResponse)

type FakeRouteRepository

type FakeRouteRepository struct {
	FindByHostHost  string
	FindByHostErr   bool
	FindByHostRoute models.Route

	FindByHostAndDomainHost     string
	FindByHostAndDomainDomain   string
	FindByHostAndDomainRoute    models.Route
	FindByHostAndDomainErr      bool
	FindByHostAndDomainNotFound bool

	CreatedHost       string
	CreatedDomainGuid string

	CreateInSpaceHost         string
	CreateInSpaceDomainGuid   string
	CreateInSpaceSpaceGuid    string
	CreateInSpaceCreatedRoute models.Route
	CreateInSpaceErr          bool

	BoundRouteGuid string
	BoundAppGuid   string

	UnboundRouteGuid string
	UnboundAppGuid   string

	ListErr bool
	Routes  []models.Route

	DeleteRouteGuid string
}

func (*FakeRouteRepository) Bind

func (repo *FakeRouteRepository) Bind(routeGuid, appGuid string) (apiResponse net.ApiResponse)

func (*FakeRouteRepository) Create

func (repo *FakeRouteRepository) Create(host, domainGuid string) (createdRoute models.Route, apiResponse net.ApiResponse)

func (*FakeRouteRepository) CreateInSpace

func (repo *FakeRouteRepository) CreateInSpace(host, domainGuid, spaceGuid string) (createdRoute models.Route, apiResponse net.ApiResponse)

func (*FakeRouteRepository) Delete

func (repo *FakeRouteRepository) Delete(routeGuid string) (apiResponse net.ApiResponse)

func (*FakeRouteRepository) FindByHost

func (repo *FakeRouteRepository) FindByHost(host string) (route models.Route, apiResponse net.ApiResponse)

func (*FakeRouteRepository) FindByHostAndDomain

func (repo *FakeRouteRepository) FindByHostAndDomain(host, domain string) (route models.Route, apiResponse net.ApiResponse)

func (*FakeRouteRepository) ListRoutes

func (repo *FakeRouteRepository) ListRoutes(cb func(models.Route) bool) (apiResponse net.ApiResponse)

func (*FakeRouteRepository) Unbind

func (repo *FakeRouteRepository) Unbind(routeGuid, appGuid string) (apiResponse net.ApiResponse)

type FakeServiceBindingRepo

type FakeServiceBindingRepo struct {
	CreateServiceInstanceGuid string
	CreateApplicationGuid     string
	CreateErrorCode           string

	DeleteServiceInstance models.ServiceInstance
	DeleteApplicationGuid string
	DeleteBindingNotFound bool
}

func (*FakeServiceBindingRepo) Create

func (repo *FakeServiceBindingRepo) Create(instanceGuid, appGuid string) (apiResponse net.ApiResponse)

func (*FakeServiceBindingRepo) Delete

func (repo *FakeServiceBindingRepo) Delete(instance models.ServiceInstance, appGuid string) (found bool, apiResponse net.ApiResponse)

type FakeServiceBrokerRepo

type FakeServiceBrokerRepo struct {
	FindByNameName          string
	FindByNameServiceBroker models.ServiceBroker
	FindByNameNotFound      bool

	CreateName     string
	CreateUrl      string
	CreateUsername string
	CreatePassword string

	UpdatedServiceBroker     models.ServiceBroker
	RenamedServiceBrokerGuid string
	RenamedServiceBrokerName string
	DeletedServiceBrokerGuid string

	ServiceBrokers []models.ServiceBroker
	ListErr        bool
}

func (*FakeServiceBrokerRepo) Create

func (repo *FakeServiceBrokerRepo) Create(name, url, username, password string) (apiResponse net.ApiResponse)

func (*FakeServiceBrokerRepo) Delete

func (repo *FakeServiceBrokerRepo) Delete(guid string) (apiResponse net.ApiResponse)

func (*FakeServiceBrokerRepo) FindByName

func (repo *FakeServiceBrokerRepo) FindByName(name string) (serviceBroker models.ServiceBroker, apiResponse net.ApiResponse)

func (*FakeServiceBrokerRepo) ListServiceBrokers

func (repo *FakeServiceBrokerRepo) ListServiceBrokers(callback func(broker models.ServiceBroker) bool) net.ApiResponse

func (*FakeServiceBrokerRepo) Rename

func (repo *FakeServiceBrokerRepo) Rename(guid, name string) (apiResponse net.ApiResponse)

func (*FakeServiceBrokerRepo) Update

func (repo *FakeServiceBrokerRepo) Update(serviceBroker models.ServiceBroker) (apiResponse net.ApiResponse)

type FakeServiceRepo

type FakeServiceRepo struct {
	GetAllServiceOfferingsReturns struct {
		ServiceOfferings []models.ServiceOffering
		ApiResponse      net.ApiResponse
	}

	GetServiceOfferingsForSpaceReturns struct {
		ServiceOfferings []models.ServiceOffering
		ApiResponse      net.ApiResponse
	}
	GetServiceOfferingsForSpaceArgs struct {
		SpaceGuid string
	}

	CreateServiceInstanceName     string
	CreateServiceInstancePlanGuid string
	CreateServiceAlreadyExists    bool

	FindInstanceByNameName            string
	FindInstanceByNameServiceInstance models.ServiceInstance
	FindInstanceByNameErr             bool
	FindInstanceByNameNotFound        bool

	FindInstanceByNameMap generic.Map

	DeleteServiceServiceInstance models.ServiceInstance

	RenameServiceServiceInstance models.ServiceInstance
	RenameServiceNewName         string

	PurgedServiceOffering           models.ServiceOffering
	PurgeServiceOfferingCalled      bool
	PurgeServiceOfferingApiResponse net.ApiResponse

	FindServiceOfferingByLabelAndProviderName            string
	FindServiceOfferingByLabelAndProviderProvider        string
	FindServiceOfferingByLabelAndProviderServiceOffering models.ServiceOffering
	FindServiceOfferingByLabelAndProviderApiResponse     net.ApiResponse
	FindServiceOfferingByLabelAndProviderCalled          bool

	V1ServicePlanDescription                realApi.ServicePlanDescription
	V2ServicePlanDescription                realApi.ServicePlanDescription
	FindServicePlanByDescriptionArguments   []realApi.ServicePlanDescription
	FindServicePlanByDescriptionResultGuids []string
	FindServicePlanByDescriptionResponses   []net.ApiResponse

	ServiceInstanceCountForServicePlan int
	ServiceInstanceCountApiResponse    net.ApiResponse

	V1GuidToMigrate                           string
	V2GuidToMigrate                           string
	MigrateServicePlanFromV1ToV2Called        bool
	MigrateServicePlanFromV1ToV2ReturnedCount int
	MigrateServicePlanFromV1ToV2Response      net.ApiResponse
	// contains filtered or unexported fields
}

func (*FakeServiceRepo) CreateServiceInstance

func (repo *FakeServiceRepo) CreateServiceInstance(name, planGuid string) (identicalAlreadyExists bool, apiResponse net.ApiResponse)

func (*FakeServiceRepo) DeleteService

func (repo *FakeServiceRepo) DeleteService(instance models.ServiceInstance) (apiResponse net.ApiResponse)

func (*FakeServiceRepo) FindInstanceByName

func (repo *FakeServiceRepo) FindInstanceByName(name string) (instance models.ServiceInstance, apiResponse net.ApiResponse)

func (*FakeServiceRepo) FindServiceOfferingByLabelAndProvider

func (repo *FakeServiceRepo) FindServiceOfferingByLabelAndProvider(name, provider string) (offering models.ServiceOffering, apiResponse net.ApiResponse)

func (*FakeServiceRepo) FindServicePlanByDescription

func (repo *FakeServiceRepo) FindServicePlanByDescription(planDescription realApi.ServicePlanDescription) (planGuid string, apiResponse net.ApiResponse)

func (*FakeServiceRepo) GetAllServiceOfferings

func (repo *FakeServiceRepo) GetAllServiceOfferings() (models.ServiceOfferings, net.ApiResponse)

func (*FakeServiceRepo) GetServiceInstanceCountForServicePlan

func (repo *FakeServiceRepo) GetServiceInstanceCountForServicePlan(v1PlanGuid string) (count int, apiResponse net.ApiResponse)

func (*FakeServiceRepo) GetServiceOfferingsForSpace

func (repo *FakeServiceRepo) GetServiceOfferingsForSpace(spaceGuid string) (models.ServiceOfferings, net.ApiResponse)

func (*FakeServiceRepo) MigrateServicePlanFromV1ToV2

func (repo *FakeServiceRepo) MigrateServicePlanFromV1ToV2(v1PlanGuid, v2PlanGuid string) (changedCount int, apiResponse net.ApiResponse)

func (*FakeServiceRepo) PurgeServiceOffering

func (repo *FakeServiceRepo) PurgeServiceOffering(offering models.ServiceOffering) (apiResponse net.ApiResponse)

func (*FakeServiceRepo) RenameService

func (repo *FakeServiceRepo) RenameService(instance models.ServiceInstance, newName string) (apiResponse net.ApiResponse)

type FakeServiceSummaryRepo

type FakeServiceSummaryRepo struct {
	GetSummariesInCurrentSpaceInstances []models.ServiceInstance
}

func (*FakeServiceSummaryRepo) GetSummariesInCurrentSpace

func (repo *FakeServiceSummaryRepo) GetSummariesInCurrentSpace() (instances []models.ServiceInstance, apiResponse net.ApiResponse)

type FakeSpaceRepository

type FakeSpaceRepository struct {
	CurrentSpace models.Space

	Spaces []models.Space

	FindByNameName     string
	FindByNameSpace    models.Space
	FindByNameErr      bool
	FindByNameNotFound bool

	FindByNameInOrgName    string
	FindByNameInOrgOrgGuid string
	FindByNameInOrgSpace   models.Space

	SummarySpace models.Space

	CreateSpaceName    string
	CreateSpaceOrgGuid string
	CreateSpaceExists  bool
	CreateSpaceSpace   models.Space

	RenameSpaceGuid string
	RenameNewName   string

	DeletedSpaceGuid string
}

func (*FakeSpaceRepository) Create

func (repo *FakeSpaceRepository) Create(name string, orgGuid string) (space models.Space, apiResponse net.ApiResponse)

func (*FakeSpaceRepository) Delete

func (repo *FakeSpaceRepository) Delete(spaceGuid string) (apiResponse net.ApiResponse)

func (*FakeSpaceRepository) FindByName

func (repo *FakeSpaceRepository) FindByName(name string) (space models.Space, apiResponse net.ApiResponse)

func (*FakeSpaceRepository) FindByNameInOrg

func (repo *FakeSpaceRepository) FindByNameInOrg(name, orgGuid string) (space models.Space, apiResponse net.ApiResponse)

func (FakeSpaceRepository) GetCurrentSpace

func (repo FakeSpaceRepository) GetCurrentSpace() (space models.Space)

func (*FakeSpaceRepository) GetSummary

func (repo *FakeSpaceRepository) GetSummary() (space models.Space, apiResponse net.ApiResponse)

func (FakeSpaceRepository) ListSpaces

func (repo FakeSpaceRepository) ListSpaces(callback func(models.Space) bool) net.ApiResponse

func (*FakeSpaceRepository) Rename

func (repo *FakeSpaceRepository) Rename(spaceGuid, newName string) (apiResponse net.ApiResponse)

type FakeStackRepository

type FakeStackRepository struct {
	FindByNameStack models.Stack
	FindByNameName  string

	FindAllStacks []models.Stack
}

func (*FakeStackRepository) FindAll

func (repo *FakeStackRepository) FindAll() (stacks []models.Stack, apiResponse net.ApiResponse)

func (*FakeStackRepository) FindByName

func (repo *FakeStackRepository) FindByName(name string) (stack models.Stack, apiResponse net.ApiResponse)

type FakeUserProvidedServiceInstanceRepo

type FakeUserProvidedServiceInstanceRepo struct {
	CreateName     string
	CreateDrainUrl string
	CreateParams   map[string]string

	UpdateServiceInstance models.ServiceInstanceFields
}

func (*FakeUserProvidedServiceInstanceRepo) Create

func (repo *FakeUserProvidedServiceInstanceRepo) Create(name, drainUrl string, params map[string]string) (apiResponse net.ApiResponse)

func (*FakeUserProvidedServiceInstanceRepo) Update

func (repo *FakeUserProvidedServiceInstanceRepo) Update(serviceInstance models.ServiceInstanceFields) (apiResponse net.ApiResponse)

type FakeUserRepository

type FakeUserRepository struct {
	FindByUsernameUsername   string
	FindByUsernameUserFields models.UserFields
	FindByUsernameNotFound   bool

	ListUsersOrganizationGuid string
	ListUsersSpaceGuid        string
	ListUsersByRole           map[string][]models.UserFields

	CreateUserUsername string
	CreateUserPassword string
	CreateUserExists   bool

	DeleteUserGuid string

	SetOrgRoleUserGuid         string
	SetOrgRoleOrganizationGuid string
	SetOrgRoleRole             string

	UnsetOrgRoleUserGuid         string
	UnsetOrgRoleOrganizationGuid string
	UnsetOrgRoleRole             string

	SetSpaceRoleUserGuid  string
	SetSpaceRoleOrgGuid   string
	SetSpaceRoleSpaceGuid string
	SetSpaceRoleRole      string

	UnsetSpaceRoleUserGuid  string
	UnsetSpaceRoleSpaceGuid string
	UnsetSpaceRoleRole      string
}

func (*FakeUserRepository) Create

func (repo *FakeUserRepository) Create(username, password string) (apiResponse net.ApiResponse)

func (*FakeUserRepository) Delete

func (repo *FakeUserRepository) Delete(userGuid string) (apiResponse net.ApiResponse)

func (*FakeUserRepository) FindByUsername

func (repo *FakeUserRepository) FindByUsername(username string) (user models.UserFields, apiResponse net.ApiResponse)

func (*FakeUserRepository) ListUsersInOrgForRole

func (repo *FakeUserRepository) ListUsersInOrgForRole(orgGuid string, roleName string) ([]models.UserFields, net.ApiResponse)

func (*FakeUserRepository) ListUsersInSpaceForRole

func (repo *FakeUserRepository) ListUsersInSpaceForRole(spaceGuid string, roleName string) ([]models.UserFields, net.ApiResponse)

func (*FakeUserRepository) SetOrgRole

func (repo *FakeUserRepository) SetOrgRole(userGuid, orgGuid, role string) (apiResponse net.ApiResponse)

func (*FakeUserRepository) SetSpaceRole

func (repo *FakeUserRepository) SetSpaceRole(userGuid, spaceGuid, orgGuid, role string) (apiResponse net.ApiResponse)

func (*FakeUserRepository) UnsetOrgRole

func (repo *FakeUserRepository) UnsetOrgRole(userGuid, orgGuid, role string) (apiResponse net.ApiResponse)

func (*FakeUserRepository) UnsetSpaceRole

func (repo *FakeUserRepository) UnsetSpaceRole(userGuid, spaceGuid, role string) (apiResponse net.ApiResponse)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL