Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureContextInConfig(cfg config.Config) error
- func EnsureTargetInConfig(cfg config.Config) error
- func MissingArgumentError(argName string) error
- func MissingArgumentWithExplanationError(argName string, explanation string) error
- func NotifyErrorsWithRetry(err error, log Logger, c config.Config)
- func NotifyValidationErrors(err error, cmd *cobra.Command, log Logger)
- type AuthCallbackServer
- func (acs AuthCallbackServer) CSS() string
- func (acs AuthCallbackServer) Hangup(done chan url.Values, values url.Values)
- func (acs AuthCallbackServer) Html() string
- func (acs AuthCallbackServer) Javascript() string
- func (acs AuthCallbackServer) Log() Logger
- func (acs AuthCallbackServer) Port() int
- func (acs *AuthCallbackServer) SetHangupFunc(hangupFunc func(chan url.Values, url.Values))
- func (acs AuthCallbackServer) Start(done chan url.Values)
- type AuthcodeClientImpersonator
- type CallbackServer
- type ClientImpersonator
- type FakeCallbackServer
- func (fcs FakeCallbackServer) CSS() string
- func (fcs FakeCallbackServer) Hangup(done chan url.Values, values url.Values)
- func (fcs FakeCallbackServer) Html() string
- func (fcs FakeCallbackServer) Javascript() string
- func (fcs FakeCallbackServer) Log() Logger
- func (fcs FakeCallbackServer) Port() int
- func (fcs *FakeCallbackServer) SetHangupFunc(hangupFunc func(chan url.Values, url.Values))
- func (fcs FakeCallbackServer) Start(done chan url.Values)
- type ImplicitClientImpersonator
- type InteractivePrompt
- type InteractiveSecret
- type JsonPrinter
- type Logger
- func (l *Logger) Error(msg string)
- func (l *Logger) Errorf(format string, a ...interface{})
- func (l *Logger) Info(msg string)
- func (l *Logger) Infof(format string, a ...interface{})
- func (l *Logger) Mute()
- func (l *Logger) Robots(msg string)
- func (l *Logger) Robotsf(format string, a ...interface{})
- func (l *Logger) Unmute()
- func (l *Logger) Warn(msg string)
- type Printer
- type TestPrinter
Constants ¶
View Source
const CallbackCSS = `` /* 169-byte string literal not displayed */
View Source
const MISSING_CONTEXT = "You must have a token in your context to perform this command."
View Source
const MISSING_TARGET = "You must set a target in order to use this command."
Variables ¶
View Source
var InteractiveInput io.Reader = os.Stdin
View Source
var InteractiveOutput io.Writer = os.Stdout
View Source
var ReadPassword func(fd int) ([]byte, error) = terminal.ReadPassword
Functions ¶
func EnsureContextInConfig ¶
func EnsureTargetInConfig ¶
func MissingArgumentError ¶
Types ¶
type AuthCallbackServer ¶
type AuthCallbackServer struct {
// contains filtered or unexported fields
}
func NewAuthCallbackServer ¶
func NewAuthCallbackServer(html, css, js string, log Logger, port int) AuthCallbackServer
func (AuthCallbackServer) CSS ¶
func (acs AuthCallbackServer) CSS() string
func (AuthCallbackServer) Hangup ¶
func (acs AuthCallbackServer) Hangup(done chan url.Values, values url.Values)
func (AuthCallbackServer) Html ¶
func (acs AuthCallbackServer) Html() string
func (AuthCallbackServer) Javascript ¶
func (acs AuthCallbackServer) Javascript() string
func (AuthCallbackServer) Log ¶
func (acs AuthCallbackServer) Log() Logger
func (AuthCallbackServer) Port ¶
func (acs AuthCallbackServer) Port() int
func (*AuthCallbackServer) SetHangupFunc ¶
func (acs *AuthCallbackServer) SetHangupFunc(hangupFunc func(chan url.Values, url.Values))
func (AuthCallbackServer) Start ¶
func (acs AuthCallbackServer) Start(done chan url.Values)
type AuthcodeClientImpersonator ¶
type AuthcodeClientImpersonator struct { ClientID string ClientSecret string TokenFormat string Scope string UaaBaseURL string Port int Log Logger AuthCallbackServer CallbackServer BrowserLauncher func(string) error // contains filtered or unexported fields }
func (AuthcodeClientImpersonator) Authorize ¶
func (aci AuthcodeClientImpersonator) Authorize()
func (AuthcodeClientImpersonator) Done ¶
func (aci AuthcodeClientImpersonator) Done() chan oauth2.Token
func (AuthcodeClientImpersonator) Start ¶
func (aci AuthcodeClientImpersonator) Start()
type CallbackServer ¶
type ClientImpersonator ¶
type FakeCallbackServer ¶
type FakeCallbackServer struct {
// contains filtered or unexported fields
}
func (FakeCallbackServer) CSS ¶
func (fcs FakeCallbackServer) CSS() string
func (FakeCallbackServer) Hangup ¶
func (fcs FakeCallbackServer) Hangup(done chan url.Values, values url.Values)
func (FakeCallbackServer) Html ¶
func (fcs FakeCallbackServer) Html() string
func (FakeCallbackServer) Javascript ¶
func (fcs FakeCallbackServer) Javascript() string
func (FakeCallbackServer) Log ¶
func (fcs FakeCallbackServer) Log() Logger
func (FakeCallbackServer) Port ¶
func (fcs FakeCallbackServer) Port() int
func (*FakeCallbackServer) SetHangupFunc ¶
func (fcs *FakeCallbackServer) SetHangupFunc(hangupFunc func(chan url.Values, url.Values))
func (FakeCallbackServer) Start ¶
func (fcs FakeCallbackServer) Start(done chan url.Values)
type ImplicitClientImpersonator ¶
type ImplicitClientImpersonator struct { ClientID string TokenFormat string Scope string UaaBaseURL string Port int Log Logger AuthCallbackServer CallbackServer BrowserLauncher func(string) error // contains filtered or unexported fields }
func (ImplicitClientImpersonator) Authorize ¶
func (ici ImplicitClientImpersonator) Authorize()
func (ImplicitClientImpersonator) Done ¶
func (ici ImplicitClientImpersonator) Done() chan oauth2.Token
func (ImplicitClientImpersonator) Start ¶
func (ici ImplicitClientImpersonator) Start()
type InteractivePrompt ¶
type InteractivePrompt struct {
Prompt string
}
func (InteractivePrompt) Get ¶
func (ip InteractivePrompt) Get() (string, error)
type InteractiveSecret ¶
type InteractiveSecret struct {
Prompt string
}
func (*InteractiveSecret) Get ¶
func (is *InteractiveSecret) Get() (string, error)
type JsonPrinter ¶
type JsonPrinter struct {
Log Logger
}
func NewJsonPrinter ¶
func NewJsonPrinter(log Logger) JsonPrinter
func (JsonPrinter) Print ¶
func (jp JsonPrinter) Print(obj interface{}) error
func (JsonPrinter) PrintError ¶
func (jp JsonPrinter) PrintError(b []byte) error
type TestPrinter ¶
type TestPrinter struct {
CallData map[string]interface{}
}
func NewTestPrinter ¶
func NewTestPrinter() TestPrinter
func (TestPrinter) Print ¶
func (tp TestPrinter) Print(obj interface{}) error
Click to show internal directories.
Click to hide internal directories.