github.com/gobuffalo/buffalo-cli/v2@v2.0.0-alpha.15.0.20200919213536-a7350c8e6799/cli/cmds/fix/ifaces.go (about)

     1  package fix
     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  // Fixer is an optional interface a plugin can implement
    13  // to be run with `buffalo fix`. This should update the application
    14  // to the current version of the plugin.
    15  // The expectation is fixing of only one major revision.
    16  type Fixer interface {
    17  	plugins.Plugin
    18  	Fix(ctx context.Context, root string, args []string) error
    19  }
    20  
    21  type Flagger interface {
    22  	plugins.Plugin
    23  	FixFlags() []*flag.Flag
    24  }
    25  
    26  type Pflagger interface {
    27  	plugins.Plugin
    28  	FixFlags() []*pflag.Flag
    29  }
    30  
    31  type Namer interface {
    32  	Fixer
    33  	CmdName() string
    34  }
    35  
    36  type Aliaser interface {
    37  	Fixer
    38  	CmdAliases() []string
    39  }
    40  
    41  type Stdouter = plugio.Outer