github.com/cli/cli@v1.14.1-0.20210902173923-1af6a669e342/pkg/extensions/extension.go (about) 1 package extensions 2 3 import ( 4 "io" 5 ) 6 7 //go:generate moq -rm -out extension_mock.go . Extension 8 type Extension interface { 9 Name() string 10 Path() string 11 URL() string 12 IsLocal() bool 13 UpdateAvailable() bool 14 } 15 16 //go:generate moq -rm -out manager_mock.go . ExtensionManager 17 type ExtensionManager interface { 18 List(includeMetadata bool) []Extension 19 Install(url string, stdout, stderr io.Writer) error 20 InstallLocal(dir string) error 21 Upgrade(name string, force bool, stdout, stderr io.Writer) error 22 Remove(name string) error 23 Dispatch(args []string, stdin io.Reader, stdout, stderr io.Writer) (bool, error) 24 Create(name string) error 25 }