當前位置: 首頁>>代碼示例>>Golang>>正文


Golang requirements.Factory類代碼示例

本文整理匯總了Golang中github.com/nttlabs/cli/cf/requirements.Factory的典型用法代碼示例。如果您正苦於以下問題:Golang Factory類的具體用法?Golang Factory怎麽用?Golang Factory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Factory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: GetRequirements

func (cmd ListApps) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	reqs = []requirements.Requirement{
		requirementsFactory.NewLoginRequirement(),
		requirementsFactory.NewTargetedSpaceRequirement(),
	}
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:apps.go

示例2: GetRequirements

func (cmd *DisableServiceAccess) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) {
	if len(context.Args()) != 1 {
		cmd.ui.FailWithUsage(context)
	}

	return []requirements.Requirement{requirementsFactory.NewLoginRequirement()}, nil
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:disable_service_access.go

示例3: GetRequirements

func (cmd *Restage) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) != 1 {
		cmd.ui.FailWithUsage(c)
	}

	return []requirements.Requirement{requirementsFactory.NewLoginRequirement()}, nil
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:restage.go

示例4: GetRequirements

func (cmd ListServices) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	reqs = append(reqs,
		requirementsFactory.NewLoginRequirement(),
		requirementsFactory.NewTargetedSpaceRequirement(),
	)
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:7,代碼來源:services.go

示例5: GetRequirements

func (cmd *RenameBuildpack) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) != 2 {
		cmd.ui.FailWithUsage(c)
	}

	reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement()}
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:rename_buildpack.go

示例6: GetRequirements

func (cmd Authenticate) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) != 2 {
		cmd.ui.FailWithUsage(c)
	}

	reqs = append(reqs, requirementsFactory.NewApiEndpointRequirement())
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:auth.go

示例7: GetRequirements

func (cmd UpdateSecurityGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) {
	if len(context.Args()) != 2 {
		cmd.ui.FailWithUsage(context)
	}

	requirements := []requirements.Requirement{requirementsFactory.NewLoginRequirement()}
	return requirements, nil
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:update_security_group.go

示例8: GetRequirements

func (cmd CreateUserProvidedService) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) != 1 {
		cmd.ui.FailWithUsage(c)
	}

	reqs = append(reqs, requirementsFactory.NewLoginRequirement())
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:create_user_provided_service.go

示例9: GetRequirements

func (cmd PurgeServiceOffering) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) != 1 {
		cmd.ui.FailWithUsage(c)
	}

	reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement()}
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:purge_service_offering.go

示例10: GetRequirements

func (cmd *DeleteApp) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) == 0 {
		cmd.ui.FailWithUsage(c)
	}

	reqs = []requirements.Requirement{requirementsFactory.NewLoginRequirement()}
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:delete.go

示例11: GetRequirements

func (cmd BindSecurityGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(context.Args()) != 3 {
		cmd.ui.FailWithUsage(context)
	}

	reqs = append(reqs, requirementsFactory.NewLoginRequirement())
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:bind_security_group.go

示例12: GetRequirements

func (cmd DeleteServiceBroker) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) != 1 {
		cmd.ui.FailWithUsage(c)
	}

	reqs = append(reqs, requirementsFactory.NewLoginRequirement())
	return
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:8,代碼來源:delete_service_broker.go

示例13: GetRequirements

func (cmd *unbindFromRunningGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) {
	if len(context.Args()) != 1 {
		cmd.ui.FailWithUsage(context)
	}

	return []requirements.Requirement{
		requirementsFactory.NewLoginRequirement(),
	}, nil
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:9,代碼來源:unbind_running_security_group.go

示例14: GetRequirements

func (cmd UnbindSecurityGroup) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) {
	argLength := len(context.Args())
	if argLength == 0 || argLength == 2 || argLength >= 4 {
		cmd.ui.FailWithUsage(context)
	}

	requirements := []requirements.Requirement{requirementsFactory.NewLoginRequirement()}
	return requirements, nil
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:9,代碼來源:unbind_security_group.go

示例15: GetRequirements

func (cmd CreateQuota) GetRequirements(requirementsFactory requirements.Factory, context *cli.Context) ([]requirements.Requirement, error) {
	if len(context.Args()) != 1 {
		cmd.ui.FailWithUsage(context)
	}

	return []requirements.Requirement{
		requirementsFactory.NewLoginRequirement(),
	}, nil
}
開發者ID:nttlabs,項目名稱:cli,代碼行數:9,代碼來源:create_quota.go


注:本文中的github.com/nttlabs/cli/cf/requirements.Factory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。