cli

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AuthcodeCallbackHTML = `` /* 223-byte string literal not displayed */
View Source
const AuthcodeCallbackJS = ``
View Source
const CallbackCSS = `` /* 169-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

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) HTML

func (acs AuthCallbackServer) HTML() string

func (AuthCallbackServer) Hangup

func (acs AuthCallbackServer) Hangup(done chan url.Values, values url.Values)

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
	Audience           string
	Scope              string
	Port               int
	Log                Logger
	AuthCallbackServer CallbackServer
	BrowserLauncher    func(string) error
	// contains filtered or unexported fields
}

func NewAuthcodeClientImpersonator

func NewAuthcodeClientImpersonator(
	httpClient *http.Client,
	config client.Config,
	clientID string,
	clientSecret string,
	audience string,
	scope string,
	port int,
	log Logger,
	launcher func(string) error) AuthcodeClientImpersonator

func (AuthcodeClientImpersonator) Authorize

func (aci AuthcodeClientImpersonator) Authorize()

func (AuthcodeClientImpersonator) Done

func (aci AuthcodeClientImpersonator) Done() chan client.Token

func (AuthcodeClientImpersonator) Start

func (aci AuthcodeClientImpersonator) Start()

type CallbackServer

type CallbackServer interface {
	HTML() string
	CSS() string
	Javascript() string
	Port() int
	Log() Logger
	Hangup(chan url.Values, url.Values)
	Start(chan url.Values)
}

type ClientImpersonator

type ClientImpersonator interface {
	Start()
	Authorize()
	Done() chan client.Token
}

type JSONPrinter

type JSONPrinter struct {
	Log Logger
}

func NewJSONPrinter

func NewJSONPrinter(log Logger) JSONPrinter

func (JSONPrinter) Print

func (jp JSONPrinter) Print(obj interface{}) error

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(infoHandle, robotsHandle, warningHandle, errorHandle io.Writer) Logger

func (*Logger) Error

func (l *Logger) Error(msg string)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, a ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string)

func (*Logger) Infof

func (l *Logger) Infof(format string, a ...interface{})

func (*Logger) Mute

func (l *Logger) Mute()

func (*Logger) Robots

func (l *Logger) Robots(msg string)

func (*Logger) Robotsf

func (l *Logger) Robotsf(format string, a ...interface{})

func (*Logger) Unmute

func (l *Logger) Unmute()

func (*Logger) Warn

func (l *Logger) Warn(msg string)

type Printer

type Printer interface {
	Print(interface{}) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL