Documentation
¶
Index ¶
- func GetToken(repoUrl gitproviders.RepoURL, w io.Writer, ...) (string, error)
- func NewCLILogger(writer io.Writer) logger.Logger
- func NewGitProviderClient(stdout *os.File, lookupEnvFunc func(key string) (string, bool), ...) gitproviders.Client
- type CLILogger
- func (l CLILogger) Actionf(format string, a ...interface{})
- func (l CLILogger) Failuref(format string, a ...interface{})
- func (l CLILogger) Generatef(format string, a ...interface{})
- func (l CLILogger) Infow(msg string, kv ...interface{})
- func (l CLILogger) Printf(format string, a ...interface{})
- func (l CLILogger) Println(format string, a ...interface{})
- func (l CLILogger) Successf(format string, a ...interface{})
- func (l CLILogger) Waitingf(format string, a ...interface{})
- func (l CLILogger) Warningf(format string, a ...interface{})
- func (l CLILogger) Write(p []byte) (n int, err error)
- type GetAuthHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetToken ¶
func GetToken(repoUrl gitproviders.RepoURL, w io.Writer, lookupEnvFunc func(key string) (string, bool), authHandlerFunc GetAuthHandler, log logger.Logger) (string, error)
GetToken returns either the token stored in the <git provider>_TOKEN env var or a token retrieved via the CLI auth flow
func NewGitProviderClient ¶
func NewGitProviderClient(stdout *os.File, lookupEnvFunc func(key string) (string, bool), authHandlerFunc GetAuthHandler, log logger.Logger) gitproviders.Client
Types ¶
type GetAuthHandler ¶
type GetAuthHandler func(gitproviders.GitProviderName) (auth.BlockingCLIAuthHandler, error)
Click to show internal directories.
Click to hide internal directories.