github.com/cli/cli@v1.14.1-0.20210902173923-1af6a669e342/pkg/cmdutil/factory.go (about)

     1  package cmdutil
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"github.com/cli/cli/context"
     7  	"github.com/cli/cli/internal/config"
     8  	"github.com/cli/cli/internal/ghrepo"
     9  	"github.com/cli/cli/pkg/extensions"
    10  	"github.com/cli/cli/pkg/iostreams"
    11  )
    12  
    13  type Browser interface {
    14  	Browse(string) error
    15  }
    16  
    17  type Factory struct {
    18  	IOStreams *iostreams.IOStreams
    19  	Browser   Browser
    20  
    21  	HttpClient func() (*http.Client, error)
    22  	BaseRepo   func() (ghrepo.Interface, error)
    23  	Remotes    func() (context.Remotes, error)
    24  	Config     func() (config.Config, error)
    25  	Branch     func() (string, error)
    26  
    27  	ExtensionManager extensions.ExtensionManager
    28  
    29  	// Executable is the path to the currently invoked gh binary
    30  	Executable string
    31  }