network

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const BlankPageURL = "about:blank"

Variables

This section is empty.

Functions

This section is empty.

Types

type FrameLoadedListener

type FrameLoadedListener = func(ctx context.Context, frame page.Frame)

type Manager

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

func New

func New(
	logger *zerolog.Logger,
	client *cdp.Client,
	eventLoop *events.Loop,
) (*Manager, error)

func (*Manager) AddFrameLoadedListener

func (m *Manager) AddFrameLoadedListener(listener FrameLoadedListener) events.ListenerID

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) DeleteCookies

func (m *Manager) DeleteCookies(ctx context.Context, url string, cookies drivers.HTTPCookies) error

func (*Manager) GetCookies

func (m *Manager) GetCookies(ctx context.Context) (drivers.HTTPCookies, error)

func (*Manager) GetHeaders

func (m *Manager) GetHeaders(_ context.Context) (drivers.HTTPHeaders, error)

func (*Manager) GetResponse

func (m *Manager) GetResponse(_ context.Context, frameID page.FrameID) (drivers.HTTPResponse, error)

func (*Manager) Navigate

func (m *Manager) Navigate(ctx context.Context, url values.String) error

func (*Manager) NavigateBack

func (m *Manager) NavigateBack(ctx context.Context, skip values.Int) (values.Boolean, error)

func (*Manager) NavigateForward

func (m *Manager) NavigateForward(ctx context.Context, skip values.Int) (values.Boolean, error)

func (*Manager) RemoveFrameLoadedListener

func (m *Manager) RemoveFrameLoadedListener(id events.ListenerID)

func (*Manager) SetCookies

func (m *Manager) SetCookies(ctx context.Context, url string, cookies drivers.HTTPCookies) error

func (*Manager) SetHeaders

func (m *Manager) SetHeaders(ctx context.Context, headers drivers.HTTPHeaders) error

func (*Manager) WaitForFrameNavigation

func (m *Manager) WaitForFrameNavigation(ctx context.Context, frameID page.FrameID, urlPattern *regexp.Regexp) error

func (*Manager) WaitForNavigation

func (m *Manager) WaitForNavigation(ctx context.Context, pattern *regexp.Regexp) error

Jump to

Keyboard shortcuts

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