subcommand

package
v0.0.0-...-b5a03d5 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAuthorizedUser

func FetchAuthorizedUser(ctx context.Context, wf *aw.Workflow, client *api.Client) (*model.User, error)

FetchAuthorizedUser fetches the owner of this api token.

Types

type BaseCommand

type BaseCommand struct {
	Args []string
}

func (BaseCommand) Arguments

func (cmd BaseCommand) Arguments() []string

func (BaseCommand) HasQuery

func (cmd BaseCommand) HasQuery() bool

func (BaseCommand) Query

func (cmd BaseCommand) Query() string

type HelpCommand

type HelpCommand struct {
	BaseCommand
}

HelpCommand describe a subcommand to show the subcommands.

func NewHelpCommand

func NewHelpCommand() HelpCommand

NewHelpCommand return an instance of this subcommand.

func (HelpCommand) Run

func (cmd HelpCommand) Run(_ctx context.Context, wf *aw.Workflow)

Run start this subcommand.

type ReposCommand

type ReposCommand struct {
	Owner string
	Limit int

	BaseCommand
}

ReposCommand describe a subcommand to fetch repos

func NewReposCommand

func NewReposCommand(owner string, args []string) ReposCommand

NewReposCommand return a ReposCommand instance.

func (ReposCommand) Run

func (cmd ReposCommand) Run(ctx context.Context, wf *aw.Workflow)

Run start this subcommand.

type SubCommand

type SubCommand interface {
	// Run the subcommand
	Run(ctx context.Context, wf *aw.Workflow)

	// Get the arguments
	Arguments() []string
}

SubCommand describe a sub command.

Directories

Path Synopsis
my

Jump to

Keyboard shortcuts

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