Documentation ¶
Index ¶
- Constants
- func GetScreenShot(err error) ([]byte, bool)
- func New(opts ...login.Option) (login.Method, error)
- func WithBinary(path string) login.Option
- func WithCancelOnClose(ctx context.Context, done <-chan struct{}) (context.Context, context.CancelFunc)
- func WithChromeVersion(ctx context.Context, revision int, client *http.Client) login.Option
- func WithCookies(cookies []*http.Cookie) login.Option
- func WithLoggers(infoLgr, errorLgr *log.Logger) login.Option
- func WithRefreshFrequency(frequency time.Duration) login.Option
- func WithScreenShortOnError() login.Option
- func WithTimeout(timeout time.Duration) login.Option
- func WithURL(url string) login.Option
- type HTTPError
- type InvalidTokenError
- type InvalidTypeOptionError
- type MissingOptionError
- type Screen
- type Screens
- type Validatable
- type WithLocationError
- type WithScreenshotError
Constants ¶
View Source
const ( ConfigURL = "url" ConfigCookieJar = "cookie" )
View Source
const ( // DefaultRefreshFrequency is the default refresh frequency for the login process. DefaultRefreshFrequency = 1500 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func GetScreenShot ¶
func WithBinary ¶
WithBinary sets the path to the chrome binary to be used for the login process.
func WithCancelOnClose ¶
func WithChromeVersion ¶
WithChromeVersion sets the version of chrome to be used for the login process.
func WithCookies ¶
WithCookies sets the cookies to be used for the login process.
func WithLoggers ¶
WithLoggers sets the loggers to be used for the login process.
func WithRefreshFrequency ¶
WithRefreshFrequency sets the frequency at which the login process will be refreshed.
func WithScreenShortOnError ¶
WithScreenShortOnError sets the option to take a screenshot when an error occurs.
func WithTimeout ¶
WithTimeout sets the timeout for the login process.
Types ¶
type InvalidTokenError ¶
func (*InvalidTokenError) Error ¶
func (e *InvalidTokenError) Error() string
type InvalidTypeOptionError ¶
type InvalidTypeOptionError struct {
// contains filtered or unexported fields
}
func (*InvalidTypeOptionError) Error ¶
func (e *InvalidTypeOptionError) Error() string
type MissingOptionError ¶
type MissingOptionError struct {
Option string
}
func (*MissingOptionError) Error ¶
func (e *MissingOptionError) Error() string
func (*MissingOptionError) Is ¶
func (e *MissingOptionError) Is(target error) bool
type Validatable ¶
type Validatable interface {
Validate() error
}
type WithLocationError ¶
func (*WithLocationError) Error ¶
func (e *WithLocationError) Error() string
type WithScreenshotError ¶
func (*WithScreenshotError) Error ¶
func (e *WithScreenshotError) Error() string
func (*WithScreenshotError) Unwrap ¶
func (e *WithScreenshotError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.