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 }
func (cmd Target) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { if len(c.Args()) != 0 { err = errors.New(T("incorrect usage")) cmd.ui.FailWithUsage(c) return } reqs = append(reqs, requirementsFactory.NewApiEndpointRequirement()) if c.String("o") != "" || c.String("s") != "" { reqs = append(reqs, requirementsFactory.NewLoginRequirement()) } return }
func (cmd MarketplaceServices) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) { reqs = append(reqs, requirementsFactory.NewApiEndpointRequirement()) return }