github.com/gobuffalo/buffalo-cli/v2@v2.0.0-alpha.15.0.20200919213536-a7350c8e6799/cli/cmds/setup/ifaces.go (about) 1 package setup 2 3 import ( 4 "context" 5 "flag" 6 7 "github.com/gobuffalo/plugins" 8 "github.com/gobuffalo/plugins/plugio" 9 "github.com/spf13/pflag" 10 ) 11 12 type BeforeSetuper interface { 13 plugins.Plugin 14 BeforeSetup(ctx context.Context, root string, args []string) error 15 } 16 17 type Setuper interface { 18 plugins.Plugin 19 Setup(ctx context.Context, root string, args []string) error 20 } 21 22 type AfterSetuper interface { 23 plugins.Plugin 24 AfterSetup(ctx context.Context, root string, args []string, err error) error 25 } 26 27 type Flagger interface { 28 plugins.Plugin 29 SetupFlags() []*flag.Flag 30 } 31 32 type Pflagger interface { 33 plugins.Plugin 34 SetupFlags() []*pflag.Flag 35 } 36 37 type Namer interface { 38 Setuper 39 CmdName() string 40 } 41 42 type Aliaser interface { 43 Setuper 44 CmdAliases() []string 45 } 46 47 type Stdouter = plugio.Outer