fakes

package
v6.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCloudControllerTestRequest

func NewCloudControllerTestRequest(request testnet.TestRequest) testnet.TestRequest

Types

type FakeAppEventsRepository

type FakeAppEventsRepository struct {
	RecentEventsStub func(appGuid string, limit uint64) ([]models.EventFields, error)
	// contains filtered or unexported fields
}

func (*FakeAppEventsRepository) RecentEvents

func (fake *FakeAppEventsRepository) RecentEvents(arg1 string, arg2 uint64) ([]models.EventFields, error)

func (*FakeAppEventsRepository) RecentEventsArgsForCall

func (fake *FakeAppEventsRepository) RecentEventsArgsForCall(i int) (string, uint64)

func (*FakeAppEventsRepository) RecentEventsCallCount

func (fake *FakeAppEventsRepository) RecentEventsCallCount() int

func (*FakeAppEventsRepository) RecentEventsReturns

func (fake *FakeAppEventsRepository) RecentEventsReturns(result1 []models.EventFields, result2 error)

type FakeAppFilesRepo

type FakeAppFilesRepo struct {
	AppGuid  string
	Instance int
	Path     string
	FileList string
}

func (*FakeAppFilesRepo) ListFiles

func (repo *FakeAppFilesRepo) ListFiles(appGuid string, instance int, path string) (files string, apiErr error)

type FakeAppInstancesRepo

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

func (*FakeAppInstancesRepo) GetInstances

func (repo *FakeAppInstancesRepo) GetInstances(appGuid string) (instances []models.AppInstanceFields, apiErr error)

type FakeAppSummaryRepo

type FakeAppSummaryRepo struct {
	GetSummariesInCurrentSpaceApps []models.Application

	GetSummaryErrorCode string
	GetSummaryAppGuid   string
	GetSummarySummary   models.Application
}

func (*FakeAppSummaryRepo) GetSummariesInCurrentSpace

func (repo *FakeAppSummaryRepo) GetSummariesInCurrentSpace() (apps []models.Application, apiErr error)

func (*FakeAppSummaryRepo) GetSummary

func (repo *FakeAppSummaryRepo) GetSummary(appGuid string) (summary models.Application, apiErr error)

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)) (apiErr error)

type FakeApplicationRepository

type FakeApplicationRepository struct {
	FindAllApps []models.Application

	ReadArgs struct {
		Name string
	}
	ReadReturns struct {
		App   models.Application
		Error error
	}

	CreateAppParams []models.AppParams

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

	DeletedAppGuid string

	ReadEnvArgs struct {
		AppGuid string
	}

	ReadEnvReturns struct {
		UserEnv      map[string]string
		VcapServices string
		Error        error
	}

	CreateRestageRequestArgs struct {
		AppGuid string
	}
}

func (*FakeApplicationRepository) Create

func (repo *FakeApplicationRepository) Create(params models.AppParams) (resultApp models.Application, apiErr error)

func (*FakeApplicationRepository) CreateRestageRequest

func (repo *FakeApplicationRepository) CreateRestageRequest(guid string) (apiErr error)

func (*FakeApplicationRepository) CreatedAppParams

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

func (*FakeApplicationRepository) Delete

func (repo *FakeApplicationRepository) Delete(appGuid string) (apiErr error)

func (*FakeApplicationRepository) Read

func (repo *FakeApplicationRepository) Read(name string) (app models.Application, apiErr error)

func (*FakeApplicationRepository) ReadEnv

func (repo *FakeApplicationRepository) ReadEnv(appGuid string) (map[string]string, string, error)

func (*FakeApplicationRepository) Update

func (repo *FakeApplicationRepository) Update(appGuid string, params models.AppParams) (updatedApp models.Application, apiErr error)

type FakeAuthTokenRepo

type FakeAuthTokenRepo struct {
	CreatedServiceAuthTokenFields models.ServiceAuthTokenFields

	FindAllAuthTokens []models.ServiceAuthTokenFields

	FindByLabelAndProviderLabel                  string
	FindByLabelAndProviderProvider               string
	FindByLabelAndProviderServiceAuthTokenFields models.ServiceAuthTokenFields
	FindByLabelAndProviderApiResponse            error

	UpdatedServiceAuthTokenFields models.ServiceAuthTokenFields

	DeletedServiceAuthTokenFields models.ServiceAuthTokenFields
}

func (*FakeAuthTokenRepo) Create

func (repo *FakeAuthTokenRepo) Create(authToken models.ServiceAuthTokenFields) (apiErr error)

func (*FakeAuthTokenRepo) Delete

func (repo *FakeAuthTokenRepo) Delete(authToken models.ServiceAuthTokenFields) (apiErr error)

func (*FakeAuthTokenRepo) FindAll

func (repo *FakeAuthTokenRepo) FindAll() (authTokens []models.ServiceAuthTokenFields, apiErr error)

func (*FakeAuthTokenRepo) FindByLabelAndProvider

func (repo *FakeAuthTokenRepo) FindByLabelAndProvider(label, provider string) (authToken models.ServiceAuthTokenFields, apiErr error)

func (*FakeAuthTokenRepo) Update

func (repo *FakeAuthTokenRepo) Update(authToken models.ServiceAuthTokenFields) (apiErr error)

type FakeAuthenticationRepository

type FakeAuthenticationRepository struct {
	Config           configuration.ReadWriter
	AuthenticateArgs struct {
		Credentials []map[string]string
	}
	GetLoginPromptsWasCalled bool
	GetLoginPromptsReturns   struct {
		Error   error
		Prompts map[string]configuration.AuthPrompt
	}

	AuthError          bool
	AccessToken        string
	RefreshToken       string
	RefreshTokenCalled bool
	RefreshTokenError  error
}

func (*FakeAuthenticationRepository) Authenticate

func (auth *FakeAuthenticationRepository) Authenticate(credentials map[string]string) (apiErr error)

func (*FakeAuthenticationRepository) GetLoginPromptsAndSaveUAAServerURL

func (auth *FakeAuthenticationRepository) GetLoginPromptsAndSaveUAAServerURL() (prompts map[string]configuration.AuthPrompt, apiErr error)

func (*FakeAuthenticationRepository) RefreshAuthToken

func (auth *FakeAuthenticationRepository) RefreshAuthToken() (string, error)

type FakeBuildpackBitsRepository

type FakeBuildpackBitsRepository struct {
	UploadBuildpackErr         bool
	UploadBuildpackApiResponse error
	UploadBuildpackPath        string
}

func (*FakeBuildpackBitsRepository) UploadBuildpack

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

type FakeBuildpackRepository

type FakeBuildpackRepository struct {
	Buildpacks []models.Buildpack

	FindByNameNotFound    bool
	FindByNameName        string
	FindByNameBuildpack   models.Buildpack
	FindByNameApiResponse error

	CreateBuildpackExists bool
	CreateBuildpack       models.Buildpack
	CreateApiResponse     error

	DeleteBuildpackGuid string
	DeleteApiResponse   error

	UpdateBuildpackArgs struct {
		Buildpack models.Buildpack
	}

	UpdateBuildpackReturns struct {
		Error error
	}
}

func (*FakeBuildpackRepository) Create

func (repo *FakeBuildpackRepository) Create(name string, position *int, enabled *bool, locked *bool) (createdBuildpack models.Buildpack, apiErr error)

func (*FakeBuildpackRepository) Delete

func (repo *FakeBuildpackRepository) Delete(buildpackGuid string) (apiErr error)

func (*FakeBuildpackRepository) FindByName

func (repo *FakeBuildpackRepository) FindByName(name string) (buildpack models.Buildpack, apiErr error)

func (*FakeBuildpackRepository) ListBuildpacks

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

func (*FakeBuildpackRepository) Update

func (repo *FakeBuildpackRepository) Update(buildpack models.Buildpack) (updatedBuildpack models.Buildpack, apiErr error)

type FakeCurlRepository

type FakeCurlRepository struct {
	Method         string
	Path           string
	Header         string
	Body           string
	ResponseHeader string
	ResponseBody   string
	Error          error
}

func (*FakeCurlRepository) Request

func (repo *FakeCurlRepository) Request(method, path, header, body string) (resHeaders, resBody string, apiErr error)

type FakeDomainRepository

type FakeDomainRepository struct {
	ListDomainsForOrgGuid        string
	ListDomainsForOrgDomains     []models.DomainFields
	ListDomainsForOrgApiResponse error

	FindByNameInOrgName        string
	FindByNameInOrgGuid        string
	FindByNameInOrgDomain      models.DomainFields
	FindByNameInOrgApiResponse error

	FindByNameName     string
	FindByNameDomain   models.DomainFields
	FindByNameNotFound bool
	FindByNameErr      bool

	CreateDomainName          string
	CreateDomainOwningOrgGuid string

	CreateSharedDomainName string

	DeleteDomainGuid  string
	DeleteApiResponse error

	DeleteSharedDomainGuid  string
	DeleteSharedApiResponse error
}

func (*FakeDomainRepository) Create

func (repo *FakeDomainRepository) Create(domainName string, owningOrgGuid string) (createdDomain models.DomainFields, apiErr error)

func (*FakeDomainRepository) CreateSharedDomain

func (repo *FakeDomainRepository) CreateSharedDomain(domainName string) (apiErr error)

func (*FakeDomainRepository) Delete

func (repo *FakeDomainRepository) Delete(domainGuid string) (apiErr error)

func (*FakeDomainRepository) DeleteSharedDomain

func (repo *FakeDomainRepository) DeleteSharedDomain(domainGuid string) (apiErr error)

func (*FakeDomainRepository) FindByName

func (repo *FakeDomainRepository) FindByName(name string) (domain models.DomainFields, apiErr error)

func (*FakeDomainRepository) FindByNameInOrg

func (repo *FakeDomainRepository) FindByNameInOrg(name string, owningOrgGuid string) (domain models.DomainFields, apiErr error)

func (*FakeDomainRepository) FirstOrDefault

func (repo *FakeDomainRepository) FirstOrDefault(orgGuid string, name *string) (domain models.DomainFields, error error)

func (*FakeDomainRepository) ListDomainsForOrg

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

type FakeEndpointRepo

type FakeEndpointRepo struct {
	UpdateEndpointReceived string
	UpdateEndpointError    error
}

func (*FakeEndpointRepo) UpdateEndpoint

func (repo *FakeEndpointRepo) UpdateEndpoint(endpoint string) (string, error)

type FakeLoggregatorConsumer

type FakeLoggregatorConsumer struct {
	RecentCalledWith struct {
		AppGuid   string
		AuthToken string
	}

	RecentReturns struct {
		Messages []*logmessage.LogMessage
		Err      []error
		// contains filtered or unexported fields
	}

	TailFunc func(appGuid, token string) (<-chan *logmessage.LogMessage, error)

	IsClosed bool

	OnConnectCallback func()
	// contains filtered or unexported fields
}

func NewFakeLoggregatorConsumer

func NewFakeLoggregatorConsumer() *FakeLoggregatorConsumer

func (*FakeLoggregatorConsumer) Close

func (c *FakeLoggregatorConsumer) Close() error

func (*FakeLoggregatorConsumer) Recent

func (c *FakeLoggregatorConsumer) Recent(appGuid string, authToken string) ([]*logmessage.LogMessage, error)

func (*FakeLoggregatorConsumer) SetDebugPrinter

func (c *FakeLoggregatorConsumer) SetDebugPrinter(debugPrinter loggregator_consumer.DebugPrinter)

func (*FakeLoggregatorConsumer) SetOnConnectCallback

func (c *FakeLoggregatorConsumer) SetOnConnectCallback(cb func())

func (*FakeLoggregatorConsumer) Tail

func (c *FakeLoggregatorConsumer) Tail(appGuid string, authToken string) (<-chan *logmessage.LogMessage, error)

func (*FakeLoggregatorConsumer) WaitForClose

func (c *FakeLoggregatorConsumer) WaitForClose()

type FakeLogsRepository

type FakeLogsRepository struct {
	RecentLogsForStub func(appGuid string) ([]*logmessage.LogMessage, error)

	TailLogsForStub func(appGuid string, onConnect func(), onMessage func(*logmessage.LogMessage)) error

	CloseStub func()
	// contains filtered or unexported fields
}

func (*FakeLogsRepository) Close

func (fake *FakeLogsRepository) Close()

func (*FakeLogsRepository) CloseCallCount

func (fake *FakeLogsRepository) CloseCallCount() int

func (*FakeLogsRepository) RecentLogsFor

func (fake *FakeLogsRepository) RecentLogsFor(appGuid string) ([]*logmessage.LogMessage, error)

func (*FakeLogsRepository) RecentLogsForArgsForCall

func (fake *FakeLogsRepository) RecentLogsForArgsForCall(i int) string

func (*FakeLogsRepository) RecentLogsForCallCount

func (fake *FakeLogsRepository) RecentLogsForCallCount() int

func (*FakeLogsRepository) RecentLogsForReturns

func (fake *FakeLogsRepository) RecentLogsForReturns(result1 []*logmessage.LogMessage, result2 error)

func (*FakeLogsRepository) TailLogsFor

func (fake *FakeLogsRepository) TailLogsFor(appGuid string, onConnect func(), onMessage func(*logmessage.LogMessage)) error

func (*FakeLogsRepository) TailLogsForArgsForCall

func (fake *FakeLogsRepository) TailLogsForArgsForCall(i int) (string, func(), func(*logmessage.LogMessage))

func (*FakeLogsRepository) TailLogsForCallCount

func (fake *FakeLogsRepository) TailLogsForCallCount() int

func (*FakeLogsRepository) TailLogsForReturns

func (fake *FakeLogsRepository) TailLogsForReturns(result1 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) (apiErr error)

func (*FakeOrgRepository) Delete

func (repo *FakeOrgRepository) Delete(orgGuid string) (apiErr error)

func (*FakeOrgRepository) FindByName

func (repo *FakeOrgRepository) FindByName(name string) (org models.Organization, apiErr error)

func (FakeOrgRepository) ListOrgs

func (repo FakeOrgRepository) ListOrgs(cb func(models.Organization) bool) (apiErr error)

func (*FakeOrgRepository) Rename

func (repo *FakeOrgRepository) Rename(orgGuid string, name string) (apiErr error)

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) (apiErr error)

type FakeQuotaRepository

type FakeQuotaRepository struct {
	FindAllReturns struct {
		Quotas []models.QuotaFields
		Error  error
	}

	FindByNameCalledWith struct {
		Name string
	}

	FindByNameReturns struct {
		Quota models.QuotaFields
		Error error
	}

	AssignQuotaToOrgCalledWith struct {
		OrgGuid   string
		QuotaGuid string
	}

	UpdateCalledWith struct {
		Name                  string
		MemoryLimit           uint64
		RoutesLimit           int
		ServicesLimit         int
		AllowPaidServicePlans bool
	}
	UpdateReturns struct {
		Error error
	}

	CreateCalledWith struct {
		Name                    string
		MemoryLimit             uint64
		RoutesLimit             int
		ServicesLimit           int
		NonBasicServicesAllowed bool
	}

	CreateReturns struct {
		Error error
	}

	DeleteCalledWith struct {
		Guid string
	}

	DeleteReturns struct {
		Error error
	}
}

func (*FakeQuotaRepository) AssignQuotaToOrg

func (repo *FakeQuotaRepository) AssignQuotaToOrg(orgGuid, quotaGuid string) (apiErr error)

func (*FakeQuotaRepository) Create

func (repo *FakeQuotaRepository) Create(quota models.QuotaFields) error

func (*FakeQuotaRepository) Delete

func (repo *FakeQuotaRepository) Delete(quotaGuid string) (apiErr error)

func (*FakeQuotaRepository) FindAll

func (repo *FakeQuotaRepository) FindAll() ([]models.QuotaFields, error)

func (*FakeQuotaRepository) FindByName

func (repo *FakeQuotaRepository) FindByName(name string) (models.QuotaFields, error)

func (*FakeQuotaRepository) Update

func (repo *FakeQuotaRepository) Update(quota models.QuotaFields) error

type FakeRouteRepository

type FakeRouteRepository struct {
	FindByHostAndDomainCalledWith struct {
		Host   string
		Domain models.DomainFields
	}

	FindByHostAndDomainReturns struct {
		Route models.Route
		Error error
	}

	CreatedHost       string
	CreatedDomainGuid string
	CreatedRoute      models.Route

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

	BindErr        error
	BoundRouteGuid string
	BoundAppGuid   string

	UnboundRouteGuid string
	UnboundAppGuid   string

	ListErr bool
	Routes  []models.Route

	DeletedRouteGuids []string
	DeleteErr         error
}

func (*FakeRouteRepository) Bind

func (repo *FakeRouteRepository) Bind(routeGuid, appGuid string) (apiErr error)

func (*FakeRouteRepository) Create

func (repo *FakeRouteRepository) Create(host string, domain models.DomainFields) (createdRoute models.Route, apiErr error)

func (*FakeRouteRepository) CreateInSpace

func (repo *FakeRouteRepository) CreateInSpace(host, domainGuid, spaceGuid string) (createdRoute models.Route, apiErr error)

func (*FakeRouteRepository) Delete

func (repo *FakeRouteRepository) Delete(routeGuid string) (apiErr error)

func (*FakeRouteRepository) FindByHostAndDomain

func (repo *FakeRouteRepository) FindByHostAndDomain(host string, domain models.DomainFields) (route models.Route, apiErr error)

func (*FakeRouteRepository) ListRoutes

func (repo *FakeRouteRepository) ListRoutes(cb func(models.Route) bool) (apiErr error)

func (*FakeRouteRepository) Unbind

func (repo *FakeRouteRepository) Unbind(routeGuid, appGuid string) (apiErr error)

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) (apiErr error)

func (*FakeServiceBindingRepo) Delete

func (repo *FakeServiceBindingRepo) Delete(instance models.ServiceInstance, appGuid string) (found bool, apiErr error)

type FakeServiceBrokerRepo

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

	FindByGuidGuid          string
	FindByGuidServiceBroker models.ServiceBroker
	FindByGuidNotFound      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) (apiErr error)

func (*FakeServiceBrokerRepo) Delete

func (repo *FakeServiceBrokerRepo) Delete(guid string) (apiErr error)

func (*FakeServiceBrokerRepo) FindByGuid

func (repo *FakeServiceBrokerRepo) FindByGuid(guid string) (serviceBroker models.ServiceBroker, apiErr error)

func (*FakeServiceBrokerRepo) FindByName

func (repo *FakeServiceBrokerRepo) FindByName(name string) (serviceBroker models.ServiceBroker, apiErr error)

func (*FakeServiceBrokerRepo) ListServiceBrokers

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

func (*FakeServiceBrokerRepo) Rename

func (repo *FakeServiceBrokerRepo) Rename(guid, name string) (apiErr error)

func (*FakeServiceBrokerRepo) Update

func (repo *FakeServiceBrokerRepo) Update(serviceBroker models.ServiceBroker) (apiErr error)

type FakeServicePlanRepo

type FakeServicePlanRepo struct {
	SearchReturns map[string][]models.ServicePlanFields
	SearchErr     error

	UpdateStub func(models.ServicePlanFields, string, bool) error
	// contains filtered or unexported fields
}

func (*FakeServicePlanRepo) Search

func (fake *FakeServicePlanRepo) Search(queryParams map[string]string) ([]models.ServicePlanFields, error)

func (*FakeServicePlanRepo) Update

func (fake *FakeServicePlanRepo) Update(arg1 models.ServicePlanFields, arg2 string, arg3 bool) error

func (*FakeServicePlanRepo) UpdateArgsForCall

func (fake *FakeServicePlanRepo) UpdateArgsForCall(i int) (models.ServicePlanFields, string, bool)

func (*FakeServicePlanRepo) UpdateCallCount

func (fake *FakeServicePlanRepo) UpdateCallCount() int

func (*FakeServicePlanRepo) UpdateReturns

func (fake *FakeServicePlanRepo) UpdateReturns(result1 error)

type FakeServicePlanVisibilityRepository

type FakeServicePlanVisibilityRepository struct {
	CreateStub func(string, string) error

	ListStub func() ([]models.ServicePlanVisibilityFields, error)

	DeleteStub func(string) error

	SearchStub func(map[string]string) ([]models.ServicePlanVisibilityFields, error)
	// contains filtered or unexported fields
}

func (*FakeServicePlanVisibilityRepository) Create

func (fake *FakeServicePlanVisibilityRepository) Create(arg1 string, arg2 string) error

func (*FakeServicePlanVisibilityRepository) CreateArgsForCall

func (fake *FakeServicePlanVisibilityRepository) CreateArgsForCall(i int) (string, string)

func (*FakeServicePlanVisibilityRepository) CreateCallCount

func (fake *FakeServicePlanVisibilityRepository) CreateCallCount() int

func (*FakeServicePlanVisibilityRepository) CreateReturns

func (fake *FakeServicePlanVisibilityRepository) CreateReturns(result1 error)

func (*FakeServicePlanVisibilityRepository) Delete

func (*FakeServicePlanVisibilityRepository) DeleteArgsForCall

func (fake *FakeServicePlanVisibilityRepository) DeleteArgsForCall(i int) string

func (*FakeServicePlanVisibilityRepository) DeleteCallCount

func (fake *FakeServicePlanVisibilityRepository) DeleteCallCount() int

func (*FakeServicePlanVisibilityRepository) DeleteReturns

func (fake *FakeServicePlanVisibilityRepository) DeleteReturns(result1 error)

func (*FakeServicePlanVisibilityRepository) List

func (*FakeServicePlanVisibilityRepository) ListCallCount

func (fake *FakeServicePlanVisibilityRepository) ListCallCount() int

func (*FakeServicePlanVisibilityRepository) ListReturns

func (fake *FakeServicePlanVisibilityRepository) ListReturns(result1 []models.ServicePlanVisibilityFields, result2 error)

func (*FakeServicePlanVisibilityRepository) Search

func (*FakeServicePlanVisibilityRepository) SearchArgsForCall

func (fake *FakeServicePlanVisibilityRepository) SearchArgsForCall(i int) map[string]string

func (*FakeServicePlanVisibilityRepository) SearchCallCount

func (fake *FakeServicePlanVisibilityRepository) SearchCallCount() int

func (*FakeServicePlanVisibilityRepository) SearchReturns

func (fake *FakeServicePlanVisibilityRepository) SearchReturns(result1 []models.ServicePlanVisibilityFields, result2 error)

type FakeServiceRepo

type FakeServiceRepo struct {
	GetServiceOfferingByGuidReturns struct {
		ServiceOffering models.ServiceOffering
		Error           error
	}

	GetAllServiceOfferingsReturns struct {
		ServiceOfferings []models.ServiceOffering
		Error            error
	}

	GetServiceOfferingsForSpaceReturns struct {
		ServiceOfferings []models.ServiceOffering
		Error            error
	}
	GetServiceOfferingsForSpaceArgs struct {
		SpaceGuid string
	}

	FindServiceOfferingsForSpaceByLabelArgs struct {
		SpaceGuid string
		Name      string
	}

	FindServiceOfferingsForSpaceByLabelReturns struct {
		ServiceOfferings []models.ServiceOffering
		Error            error
	}

	CreateServiceInstanceArgs struct {
		Name     string
		PlanGuid string
	}
	CreateServiceInstanceReturns struct {
		Error error
	}

	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 error

	FindServiceOfferingByLabelAndProviderName            string
	FindServiceOfferingByLabelAndProviderProvider        string
	FindServiceOfferingByLabelAndProviderServiceOffering models.ServiceOffering
	FindServiceOfferingByLabelAndProviderApiResponse     error
	FindServiceOfferingByLabelAndProviderCalled          bool

	FindServiceOfferingByLabelName            string
	FindServiceOfferingByLabelServiceOffering models.ServiceOffering
	FindServiceOfferingByLabelApiResponse     error
	FindServiceOfferingByLabelCalled          bool

	ListServicesFromBrokerReturns map[string][]models.ServiceOffering
	ListServicesFromBrokerErr     error

	V1ServicePlanDescription                resources.ServicePlanDescription
	V2ServicePlanDescription                resources.ServicePlanDescription
	FindServicePlanByDescriptionArguments   []resources.ServicePlanDescription
	FindServicePlanByDescriptionResultGuids []string
	FindServicePlanByDescriptionResponses   []error

	ServiceInstanceCountForServicePlan int
	ServiceInstanceCountApiResponse    error

	V1GuidToMigrate                           string
	V2GuidToMigrate                           string
	MigrateServicePlanFromV1ToV2Called        bool
	MigrateServicePlanFromV1ToV2ReturnedCount int
	MigrateServicePlanFromV1ToV2Response      error
	// contains filtered or unexported fields
}

func (*FakeServiceRepo) CreateServiceInstance

func (repo *FakeServiceRepo) CreateServiceInstance(name, planGuid string) (apiErr error)

func (*FakeServiceRepo) DeleteService

func (repo *FakeServiceRepo) DeleteService(instance models.ServiceInstance) (apiErr error)

func (*FakeServiceRepo) FindInstanceByName

func (repo *FakeServiceRepo) FindInstanceByName(name string) (instance models.ServiceInstance, apiErr error)

func (*FakeServiceRepo) FindServiceOfferingByLabel

func (repo *FakeServiceRepo) FindServiceOfferingByLabel(name string) (offering models.ServiceOffering, apiErr error)

func (*FakeServiceRepo) FindServiceOfferingByLabelAndProvider

func (repo *FakeServiceRepo) FindServiceOfferingByLabelAndProvider(name, provider string) (offering models.ServiceOffering, apiErr error)

func (*FakeServiceRepo) FindServiceOfferingsForSpaceByLabel

func (repo *FakeServiceRepo) FindServiceOfferingsForSpaceByLabel(spaceGuid, name string) (models.ServiceOfferings, error)

func (*FakeServiceRepo) FindServicePlanByDescription

func (repo *FakeServiceRepo) FindServicePlanByDescription(planDescription resources.ServicePlanDescription) (planGuid string, apiErr error)

func (*FakeServiceRepo) GetAllServiceOfferings

func (repo *FakeServiceRepo) GetAllServiceOfferings() (models.ServiceOfferings, error)

func (*FakeServiceRepo) GetServiceInstanceCountForServicePlan

func (repo *FakeServiceRepo) GetServiceInstanceCountForServicePlan(v1PlanGuid string) (count int, apiErr error)

func (*FakeServiceRepo) GetServiceOfferingByGuid

func (repo *FakeServiceRepo) GetServiceOfferingByGuid(guid string) (models.ServiceOffering, error)

func (*FakeServiceRepo) GetServiceOfferingsForSpace

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

func (*FakeServiceRepo) ListServicesFromBroker

func (repo *FakeServiceRepo) ListServicesFromBroker(brokerGuid string) ([]models.ServiceOffering, error)

func (*FakeServiceRepo) MigrateServicePlanFromV1ToV2

func (repo *FakeServiceRepo) MigrateServicePlanFromV1ToV2(v1PlanGuid, v2PlanGuid string) (changedCount int, apiErr error)

func (*FakeServiceRepo) PurgeServiceOffering

func (repo *FakeServiceRepo) PurgeServiceOffering(offering models.ServiceOffering) (apiErr error)

func (*FakeServiceRepo) RenameService

func (repo *FakeServiceRepo) RenameService(instance models.ServiceInstance, newName string) (apiErr error)

type FakeServiceSummaryRepo

type FakeServiceSummaryRepo struct {
	GetSummariesInCurrentSpaceInstances []models.ServiceInstance
}

func (*FakeServiceSummaryRepo) GetSummariesInCurrentSpace

func (repo *FakeServiceSummaryRepo) GetSummariesInCurrentSpace() (instances []models.ServiceInstance, apiErr error)

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
	FindByNameInOrgError   error

	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, apiErr error)

func (*FakeSpaceRepository) Delete

func (repo *FakeSpaceRepository) Delete(spaceGuid string) (apiErr error)

func (*FakeSpaceRepository) FindByName

func (repo *FakeSpaceRepository) FindByName(name string) (space models.Space, apiErr error)

func (*FakeSpaceRepository) FindByNameInOrg

func (repo *FakeSpaceRepository) FindByNameInOrg(name, orgGuid string) (space models.Space, apiErr error)

func (FakeSpaceRepository) GetCurrentSpace

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

func (*FakeSpaceRepository) GetSummary

func (repo *FakeSpaceRepository) GetSummary() (space models.Space, apiErr error)

func (FakeSpaceRepository) ListSpaces

func (repo FakeSpaceRepository) ListSpaces(callback func(models.Space) bool) error

func (*FakeSpaceRepository) Rename

func (repo *FakeSpaceRepository) Rename(spaceGuid, newName string) (apiErr error)

type FakeStackRepository

type FakeStackRepository struct {
	FindByNameStack models.Stack
	FindByNameName  string

	FindAllStacks []models.Stack
}

func (*FakeStackRepository) FindAll

func (repo *FakeStackRepository) FindAll() (stacks []models.Stack, apiErr error)

func (*FakeStackRepository) FindByName

func (repo *FakeStackRepository) FindByName(name string) (stack models.Stack, apiErr error)

type FakeUserProvidedServiceInstanceRepo

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

	UpdateServiceInstance models.ServiceInstanceFields
}

func (*FakeUserProvidedServiceInstanceRepo) Create

func (repo *FakeUserProvidedServiceInstanceRepo) Create(name, drainUrl string, params map[string]interface{}) (apiErr error)

func (*FakeUserProvidedServiceInstanceRepo) Update

func (repo *FakeUserProvidedServiceInstanceRepo) Update(serviceInstance models.ServiceInstanceFields) (apiErr error)

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) (apiErr error)

func (*FakeUserRepository) Delete

func (repo *FakeUserRepository) Delete(userGuid string) (apiErr error)

func (*FakeUserRepository) FindByUsername

func (repo *FakeUserRepository) FindByUsername(username string) (user models.UserFields, apiErr error)

func (*FakeUserRepository) ListUsersInOrgForRole

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

func (*FakeUserRepository) ListUsersInSpaceForRole

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

func (*FakeUserRepository) SetOrgRole

func (repo *FakeUserRepository) SetOrgRole(userGuid, orgGuid, role string) (apiErr error)

func (*FakeUserRepository) SetSpaceRole

func (repo *FakeUserRepository) SetSpaceRole(userGuid, spaceGuid, orgGuid, role string) (apiErr error)

func (*FakeUserRepository) UnsetOrgRole

func (repo *FakeUserRepository) UnsetOrgRole(userGuid, orgGuid, role string) (apiErr error)

func (*FakeUserRepository) UnsetSpaceRole

func (repo *FakeUserRepository) UnsetSpaceRole(userGuid, spaceGuid, role string) (apiErr error)

Jump to

Keyboard shortcuts

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