guppeteer

package module
v0.0.0-...-fc11c2f Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2017 License: MIT Imports: 11 Imported by: 0

README

guppeteer

puppeteer in Go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotConsumed = errors.New("not consumed yet")
	ErrNotNotified = errors.New("not notified yet")
	ErrNotified    = errors.New("notified")
)
View Source
var (
	Logger *zap.Logger
)

Functions

This section is empty.

Types

type Browser

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

func NewBrowser

func NewBrowser(cnx *Connection) *Browser

func (*Browser) NewPage

func (b *Browser) NewPage() (*Page, error)

type Callback

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

func NewCallback

func NewCallback() *Callback

func (*Callback) Deleted

func (cb *Callback) Deleted()

func (*Callback) IsDeleted

func (cb *Callback) IsDeleted() bool

func (*Callback) Reset

func (cb *Callback) Reset() error

func (*Callback) SetError

func (cb *Callback) SetError(e error) error

func (*Callback) SetResult

func (cb *Callback) SetResult(d []byte) error

func (*Callback) WaitError

func (cb *Callback) WaitError() <-chan error

func (*Callback) WaitResult

func (cb *Callback) WaitResult() <-chan []byte

type CallbackPool

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

func NewCallbackPool

func NewCallbackPool() *CallbackPool

func (*CallbackPool) Get

func (cp *CallbackPool) Get() *Callback

func (*CallbackPool) Put

func (cp *CallbackPool) Put(cb *Callback) error

type Connection

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

func NewConnection

func NewConnection(url string) (*Connection, error)

func (*Connection) CreateSession

func (cnx *Connection) CreateSession(tid target.TargetID) (*Session, error)

func (*Connection) Execute

func (cnx *Connection) Execute(method cdp.Method) (interface{}, error)

type Page

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

func CreatePage

func CreatePage(s *Session) (*Page, error)

func (*Page) Goto

func (p *Page) Goto(url, referrer string) (*page.Frame, error)

type Receiver

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

func NewReceiver

func NewReceiver(event string, f func([]byte)) *Receiver

func (*Receiver) Receive

func (rc *Receiver) Receive(d []byte) error

type Session

type Session struct {
	ID  target.SessionID
	TID target.TargetID
	// contains filtered or unexported fields
}

func (*Session) Close

func (ss *Session) Close() error

func (*Session) Execute

func (ss *Session) Execute(method cdp.Method) (interface{}, error)

type Subscriber

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

func (*Subscriber) Handle

func (sub *Subscriber) Handle(event string, d []byte)

func (*Subscriber) Subscribe

func (sub *Subscriber) Subscribe(event string, f func([]byte))

func (*Subscriber) WaitUtilPublished

func (sub *Subscriber) WaitUtilPublished() map[string]*Receiver

Directories

Path Synopsis
cdp

Jump to

Keyboard shortcuts

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