本文整理匯總了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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}