Documentation
¶
Index ¶
- type BrowserOpener
- type ClientBuilder
- type Factory
- func (f *Factory) Do(req *http.Request) (*http.Response, error)
- func (f *Factory) ErrWriter(cmd *cli.Command) io.Writer
- func (f *Factory) OpenURL(url string) error
- func (f *Factory) ResolveExplicitRepo(cmd *cli.Command) (flags.RepoSelection, error)
- func (f *Factory) ResolveRepo(cmd *cli.Command) (flags.RepoSelection, error)
- func (f *Factory) ResolveRepoContext(cmd *cli.Command) (flags.RepoSelection, error)
- func (f *Factory) RunGit(cmd *cli.Command, args ...string) error
- func (f *Factory) SDK(cmd *cli.Command) (*gitverse.Client, error)
- func (f *Factory) SDKWithCredentials(cmd *cli.Command) (*gitverse.Client, auth.Credentials, error)
- func (f *Factory) Writer(cmd *cli.Command) io.Writer
- type GitRunner
- type HTTPDoer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserOpener ¶
BrowserOpener opens a URL in the user's browser.
type ClientBuilder ¶
ClientBuilder builds an SDK client from command configuration.
type Factory ¶
type Factory struct {
NewClient ClientBuilder
BrowserOpener BrowserOpener
GitRunner GitRunner
HTTPDo HTTPDoer
CurrentRepository flags.GitRepositoryResolver
}
Factory carries command runtime dependencies.
func NewFactory ¶
func NewFactory() *Factory
NewFactory returns a factory backed by real command dependencies.
func (*Factory) Do ¶
Do executes an HTTP request.
func (*Factory) ErrWriter ¶
ErrWriter returns the command error writer.
func (*Factory) OpenURL ¶
OpenURL opens a URL in the user's browser.
func (*Factory) ResolveExplicitRepo ¶
ResolveExplicitRepo resolves an explicit repository argument.
func (*Factory) ResolveRepo ¶
ResolveRepo resolves a repository for repo-scoped commands.
func (*Factory) ResolveRepoContext ¶
ResolveRepoContext resolves a repository without consuming positional args.
func (*Factory) RunGit ¶
RunGit runs git with the command's standard streams.
func (*Factory) SDK ¶
SDK returns an SDK client for a command.
func (*Factory) SDKWithCredentials ¶
SDKWithCredentials returns an SDK client and the credentials used to build it.
type GitRunner ¶
GitRunner runs git with the command's standard streams.
Source Files
¶
- factory.go