common

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(app *cli.App, commands ...basicFunction)

Used to attach subCommands to their relative base commands Ex: `tau new project` project is attached to the new command

Types

type Basic

type Basic interface {
	New() Command
	Edit() Command
	Delete() Command
	Query() Command
	List() Command
	Select() Command
	Clone() Command
	Push() Command
	Pull() Command
	Checkout() Command
	Import() Command

	// Sets the following in the command if not already set:
	// Name
	// Aliases
	// Also runs the options provided
	Base() (*cli.Command, []Option)
}

type BeforeHandler

type BeforeHandler interface {
	Shift(method cli.BeforeFunc)
	Push(method cli.BeforeFunc)
}

type Command

type Command interface {
	Raw() *cli.Command
	Parent() *cli.Command
	Options() []Option
	Initialize(parentCommand *cli.Command, baseCommand *cli.Command, baseOps []Option) *cli.Command
}
var NotImplemented Command = nil

func Create

func Create(cmd *cli.Command, ops ...Option) Command

type FlagHandler

type FlagHandler interface {
	Shift(flags ...cli.Flag)
	Push(flags ...cli.Flag)
}

type Linker

type Linker interface {
	Command
	Before() BeforeHandler
	Flags() FlagHandler
}

type Option

type Option func(Linker)

func Base

func Base(cmd *cli.Command, ops ...Option) (*cli.Command, []Option)

type UnimplementedBasic added in v0.1.9

type UnimplementedBasic struct{}

func (UnimplementedBasic) Base added in v0.1.9

func (UnimplementedBasic) Base() (*cli.Command, []Option)

func (UnimplementedBasic) Checkout added in v0.1.9

func (UnimplementedBasic) Checkout() Command

func (UnimplementedBasic) Clone added in v0.1.9

func (UnimplementedBasic) Clone() Command

func (UnimplementedBasic) Delete added in v0.1.9

func (UnimplementedBasic) Delete() Command

func (UnimplementedBasic) Edit added in v0.1.9

func (UnimplementedBasic) Edit() Command

func (UnimplementedBasic) Import added in v0.1.9

func (UnimplementedBasic) Import() Command

func (UnimplementedBasic) List added in v0.1.9

func (UnimplementedBasic) List() Command

func (UnimplementedBasic) New added in v0.1.9

func (UnimplementedBasic) Pull added in v0.1.9

func (UnimplementedBasic) Pull() Command

func (UnimplementedBasic) Push added in v0.1.9

func (UnimplementedBasic) Push() Command

func (UnimplementedBasic) Query added in v0.1.9

func (UnimplementedBasic) Query() Command

func (UnimplementedBasic) Select added in v0.1.9

func (UnimplementedBasic) Select() Command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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