2017-01-24 15:09:23 +00:00
|
|
|
// Package log provides the Chrome Debugging Protocol
|
2017-02-12 04:59:33 +00:00
|
|
|
// commands, types, and events for the Log domain.
|
2017-01-24 15:09:23 +00:00
|
|
|
//
|
|
|
|
// Provides access to log entries.
|
|
|
|
//
|
|
|
|
// Generated by the chromedp-gen command.
|
|
|
|
package log
|
|
|
|
|
2017-07-09 02:05:19 +00:00
|
|
|
// Code generated by chromedp-gen. DO NOT EDIT.
|
2017-01-24 15:09:23 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2017-01-26 07:28:34 +00:00
|
|
|
cdp "github.com/knq/chromedp/cdp"
|
2017-01-24 15:09:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// EnableParams enables log domain, sends the entries collected so far to the
|
|
|
|
// client by means of the entryAdded notification.
|
|
|
|
type EnableParams struct{}
|
|
|
|
|
|
|
|
// Enable enables log domain, sends the entries collected so far to the
|
|
|
|
// client by means of the entryAdded notification.
|
|
|
|
func Enable() *EnableParams {
|
|
|
|
return &EnableParams{}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Log.enable against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandLogEnable, nil, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DisableParams disables log domain, prevents further log entries from being
|
|
|
|
// reported to the client.
|
|
|
|
type DisableParams struct{}
|
|
|
|
|
|
|
|
// Disable disables log domain, prevents further log entries from being
|
|
|
|
// reported to the client.
|
|
|
|
func Disable() *DisableParams {
|
|
|
|
return &DisableParams{}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Log.disable against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandLogDisable, nil, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ClearParams clears the log.
|
|
|
|
type ClearParams struct{}
|
|
|
|
|
|
|
|
// Clear clears the log.
|
|
|
|
func Clear() *ClearParams {
|
|
|
|
return &ClearParams{}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Log.clear against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *ClearParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandLogClear, nil, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StartViolationsReportParams start violation reporting.
|
|
|
|
type StartViolationsReportParams struct {
|
|
|
|
Config []*ViolationSetting `json:"config"` // Configuration for violations.
|
|
|
|
}
|
|
|
|
|
|
|
|
// StartViolationsReport start violation reporting.
|
|
|
|
//
|
|
|
|
// parameters:
|
|
|
|
// config - Configuration for violations.
|
|
|
|
func StartViolationsReport(config []*ViolationSetting) *StartViolationsReportParams {
|
|
|
|
return &StartViolationsReportParams{
|
|
|
|
Config: config,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Log.startViolationsReport against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *StartViolationsReportParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandLogStartViolationsReport, p, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StopViolationsReportParams stop violation reporting.
|
|
|
|
type StopViolationsReportParams struct{}
|
|
|
|
|
|
|
|
// StopViolationsReport stop violation reporting.
|
|
|
|
func StopViolationsReport() *StopViolationsReportParams {
|
|
|
|
return &StopViolationsReportParams{}
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Log.stopViolationsReport against the provided context and
|
|
|
|
// target handler.
|
|
|
|
func (p *StopViolationsReportParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
2017-02-14 08:41:23 +00:00
|
|
|
return h.Execute(ctxt, cdp.CommandLogStopViolationsReport, nil, nil)
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|