本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api.RepositoryLocator.GetServicePlanRepository方法的典型用法代码示例。如果您正苦于以下问题:Golang RepositoryLocator.GetServicePlanRepository方法的具体用法?Golang RepositoryLocator.GetServicePlanRepository怎么用?Golang RepositoryLocator.GetServicePlanRepository使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/api.RepositoryLocator
的用法示例。
在下文中一共展示了RepositoryLocator.GetServicePlanRepository方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: NewFactory
//.........这里部分代码省略.........
displayApp := application.NewShowApp(ui, config, repoLocator.GetAppSummaryRepository(), repoLocator.GetAppInstancesRepository())
start := application.NewStart(ui, config, displayApp, repoLocator.GetApplicationRepository(), repoLocator.GetAppInstancesRepository(), repoLocator.GetLogsRepository())
stop := application.NewStop(ui, config, repoLocator.GetApplicationRepository())
restart := application.NewRestart(ui, start, stop)
restage := application.NewRestage(ui, config, repoLocator.GetApplicationRepository(), start)
bind := service.NewBindService(ui, config, repoLocator.GetServiceBindingRepository())
factory.cmdsByName["app"] = displayApp
factory.cmdsByName["bind-service"] = bind
factory.cmdsByName["start"] = start
factory.cmdsByName["stop"] = stop
factory.cmdsByName["restart"] = restart
factory.cmdsByName["restage"] = restage
factory.cmdsByName["push"] = application.NewPush(
ui, config, manifestRepo, start, stop, bind,
repoLocator.GetApplicationRepository(),
repoLocator.GetDomainRepository(),
repoLocator.GetRouteRepository(),
repoLocator.GetStackRepository(),
repoLocator.GetServiceRepository(),
repoLocator.GetAuthenticationRepository(),
words.NewWordGenerator(),
actors.NewPushActor(repoLocator.GetApplicationBitsRepository(), app_files.ApplicationZipper{}, app_files.ApplicationFiles{}),
app_files.ApplicationZipper{},
app_files.ApplicationFiles{})
factory.cmdsByName["scale"] = application.NewScale(ui, config, restart, repoLocator.GetApplicationRepository())
spaceRoleSetter := user.NewSetSpaceRole(ui, config, repoLocator.GetSpaceRepository(), repoLocator.GetUserRepository())
factory.cmdsByName["set-space-role"] = spaceRoleSetter
factory.cmdsByName["create-space"] = space.NewCreateSpace(ui, config, spaceRoleSetter, repoLocator.GetSpaceRepository(), repoLocator.GetOrganizationRepository(), repoLocator.GetUserRepository())
planBuilder := plan_builder.NewBuilder(
repoLocator.GetServicePlanRepository(),
repoLocator.GetServicePlanVisibilityRepository(),
repoLocator.GetOrganizationRepository(),
)
serviceBuilder := service_builder.NewBuilder(
repoLocator.GetServiceRepository(),
planBuilder,
)
brokerBuilder := broker_builder.NewBuilder(
repoLocator.GetServiceBrokerRepository(),
serviceBuilder,
)
factory.cmdsByName["service-access"] = serviceaccess.NewServiceAccess(
ui, config,
actors.NewServiceHandler(
repoLocator.GetOrganizationRepository(),
brokerBuilder,
serviceBuilder,
),
repoLocator.GetAuthenticationRepository(),
)
factory.cmdsByName["enable-service-access"] = serviceaccess.NewEnableServiceAccess(
ui, config,
actors.NewServicePlanHandler(
repoLocator.GetServicePlanRepository(),
repoLocator.GetServicePlanVisibilityRepository(),
repoLocator.GetOrganizationRepository(),
planBuilder,
serviceBuilder,
),
repoLocator.GetAuthenticationRepository(),
)
factory.cmdsByName["disable-service-access"] = serviceaccess.NewDisableServiceAccess(
ui, config,
actors.NewServicePlanHandler(
repoLocator.GetServicePlanRepository(),
repoLocator.GetServicePlanVisibilityRepository(),
repoLocator.GetOrganizationRepository(),
planBuilder,
serviceBuilder,
),
repoLocator.GetAuthenticationRepository(),
)
factory.cmdsByName["create-space-quota"] = spacequota.NewCreateSpaceQuota(ui, config, repoLocator.GetSpaceQuotaRepository(), repoLocator.GetOrganizationRepository())
factory.cmdsByName["delete-space-quota"] = spacequota.NewDeleteSpaceQuota(ui, config, repoLocator.GetSpaceQuotaRepository())
factory.cmdsByName["space-quotas"] = spacequota.NewListSpaceQuotas(ui, config, repoLocator.GetSpaceQuotaRepository())
factory.cmdsByName["space-quota"] = spacequota.NewSpaceQuota(ui, config, repoLocator.GetSpaceQuotaRepository())
factory.cmdsByName["update-space-quota"] = spacequota.NewUpdateSpaceQuota(ui, config, repoLocator.GetSpaceQuotaRepository())
factory.cmdsByName["set-space-quota"] = spacequota.NewSetSpaceQuota(ui, config, repoLocator.GetSpaceRepository(), repoLocator.GetSpaceQuotaRepository())
factory.cmdsByName["unset-space-quota"] = spacequota.NewUnsetSpaceQuota(ui, config, repoLocator.GetSpaceQuotaRepository(), repoLocator.GetSpaceRepository())
factory.cmdsByName["feature-flags"] = featureflag.NewListFeatureFlags(ui, config, repoLocator.GetFeatureFlagRepository())
factory.cmdsByName["feature-flag"] = featureflag.NewShowFeatureFlag(ui, config, repoLocator.GetFeatureFlagRepository())
factory.cmdsByName["enable-feature-flag"] = featureflag.NewEnableFeatureFlag(ui, config, repoLocator.GetFeatureFlagRepository())
factory.cmdsByName["disable-feature-flag"] = featureflag.NewDisableFeatureFlag(ui, config, repoLocator.GetFeatureFlagRepository())
factory.cmdsByName["running-environment-variable-group"] = environmentvariablegroup.NewRunningEnvironmentVariableGroup(ui, config, repoLocator.GetEnvironmentVariableGroupsRepository())
factory.cmdsByName["staging-environment-variable-group"] = environmentvariablegroup.NewStagingEnvironmentVariableGroup(ui, config, repoLocator.GetEnvironmentVariableGroupsRepository())
factory.cmdsByName["set-staging-environment-variable-group"] = environmentvariablegroup.NewSetStagingEnvironmentVariableGroup(ui, config, repoLocator.GetEnvironmentVariableGroupsRepository())
factory.cmdsByName["set-running-environment-variable-group"] = environmentvariablegroup.NewSetRunningEnvironmentVariableGroup(ui, config, repoLocator.GetEnvironmentVariableGroupsRepository())
return
}
示例2: NewFactory
func NewFactory(ui terminal.UI, config core_config.ReadWriter, manifestRepo manifest.ManifestRepository, repoLocator api.RepositoryLocator, pluginConfig plugin_config.PluginConfiguration, rpcService *rpc.CliRpcService) (factory concreteFactory) {
factory.cmdsByName = make(map[string]command.Command)
planBuilder := plan_builder.NewBuilder(
repoLocator.GetServicePlanRepository(),
repoLocator.GetServicePlanVisibilityRepository(),
repoLocator.GetOrganizationRepository(),
)
serviceBuilder := service_builder.NewBuilder(
repoLocator.GetServiceRepository(),
planBuilder,
)
brokerBuilder := broker_builder.NewBuilder(
repoLocator.GetServiceBrokerRepository(),
serviceBuilder,
)
factory.cmdsByName["config"] = commands.NewConfig(ui, config)
factory.cmdsByName["update-service"] = service.NewUpdateService(
ui,
config,
repoLocator.GetServiceRepository(),
plan_builder.NewBuilder(
repoLocator.GetServicePlanRepository(),
repoLocator.GetServicePlanVisibilityRepository(),
repoLocator.GetOrganizationRepository(),
),
)
factory.cmdsByName["create-service-key"] = servicekey.NewCreateServiceKey(ui, config, repoLocator.GetServiceRepository(), repoLocator.GetServiceKeyRepository())
factory.cmdsByName["create-user"] = user.NewCreateUser(ui, config, repoLocator.GetUserRepository())
factory.cmdsByName["create-user-provided-service"] = service.NewCreateUserProvidedService(ui, config, repoLocator.GetUserProvidedServiceInstanceRepository())
factory.cmdsByName["curl"] = commands.NewCurl(ui, config, repoLocator.GetCurlRepository())
factory.cmdsByName["delete-service-key"] = servicekey.NewDeleteServiceKey(ui, config, repoLocator.GetServiceRepository(), repoLocator.GetServiceKeyRepository())
factory.cmdsByName["oauth-token"] = commands.NewOAuthToken(ui, config, repoLocator.GetAuthenticationRepository())
factory.cmdsByName["service-keys"] = servicekey.NewListServiceKeys(ui, config, repoLocator.GetServiceRepository(), repoLocator.GetServiceKeyRepository())
factory.cmdsByName["service-key"] = servicekey.NewGetServiceKey(ui, config, repoLocator.GetServiceRepository(), repoLocator.GetServiceKeyRepository())
factory.cmdsByName["unbind-service"] = service.NewUnbindService(ui, config, repoLocator.GetServiceBindingRepository())
factory.cmdsByName["update-user-provided-service"] = service.NewUpdateUserProvidedService(ui, config, repoLocator.GetUserProvidedServiceInstanceRepository())
factory.cmdsByName["bind-staging-security-group"] = securitygroup.NewBindToStagingGroup(
ui,
config,
repoLocator.GetSecurityGroupRepository(),
repoLocator.GetStagingSecurityGroupsRepository(),
)
factory.cmdsByName["staging-security-groups"] = securitygroup.NewListStagingSecurityGroups(ui, config, repoLocator.GetStagingSecurityGroupsRepository())
factory.cmdsByName["unbind-staging-security-group"] = securitygroup.NewUnbindFromStagingGroup(
ui,
config,
repoLocator.GetSecurityGroupRepository(),
repoLocator.GetStagingSecurityGroupsRepository(),
)
factory.cmdsByName["bind-running-security-group"] = securitygroup.NewBindToRunningGroup(
ui,
config,
repoLocator.GetSecurityGroupRepository(),
repoLocator.GetRunningSecurityGroupsRepository(),
)
factory.cmdsByName["unbind-running-security-group"] = securitygroup.NewUnbindFromRunningGroup(
ui,
config,
repoLocator.GetSecurityGroupRepository(),
repoLocator.GetRunningSecurityGroupsRepository(),
)
factory.cmdsByName["running-security-groups"] = securitygroup.NewListRunningSecurityGroups(ui, config, repoLocator.GetRunningSecurityGroupsRepository())
factory.cmdsByName["bind-security-group"] = securitygroup.NewBindSecurityGroup(
ui,
config,
repoLocator.GetSecurityGroupRepository(),
repoLocator.GetSpaceRepository(),
repoLocator.GetOrganizationRepository(),
repoLocator.GetSecurityGroupSpaceBinder(),
)
factory.cmdsByName["unbind-security-group"] = securitygroup.NewUnbindSecurityGroup(ui, config, repoLocator.GetSecurityGroupRepository(), repoLocator.GetOrganizationRepository(), repoLocator.GetSpaceRepository(), repoLocator.GetSecurityGroupSpaceBinder())
createRoute := route.NewCreateRoute(ui, config, repoLocator.GetRouteRepository())
factory.cmdsByName["create-route"] = createRoute
factory.cmdsByName["map-route"] = route.NewMapRoute(ui, config, repoLocator.GetRouteRepository(), createRoute)
displayApp := application.NewShowApp(ui, config, repoLocator.GetAppSummaryRepository(), repoLocator.GetAppInstancesRepository(), repoLocator.GetLogsNoaaRepository())
start := application.NewStart(ui, config, displayApp, repoLocator.GetApplicationRepository(), repoLocator.GetAppInstancesRepository(), repoLocator.GetLogsNoaaRepository(), repoLocator.GetOldLogsRepository())
stop := application.NewStop(ui, config, repoLocator.GetApplicationRepository())
restart := application.NewRestart(ui, config, start, stop)
restage := application.NewRestage(ui, config, repoLocator.GetApplicationRepository(), start)
bind := service.NewBindService(ui, config, repoLocator.GetServiceBindingRepository())
factory.cmdsByName["bind-service"] = bind
factory.cmdsByName["start"] = start
factory.cmdsByName["stop"] = stop
factory.cmdsByName["restart"] = restart
factory.cmdsByName["restart-app-instance"] = application.NewRestartAppInstance(ui, config, repoLocator.GetAppInstancesRepository())
factory.cmdsByName["restage"] = restage
factory.cmdsByName["push"] = application.NewPush(
ui, config, manifestRepo, start, stop, bind,
repoLocator.GetApplicationRepository(),
repoLocator.GetDomainRepository(),
//.........这里部分代码省略.........