chromedp/cdp/security/security.go

67 lines
1.9 KiB
Go
Raw Normal View History

2017-01-24 22:09:23 +07:00
// Package security provides the Chrome Debugging Protocol
// commands, types, and events for the Security domain.
2017-01-24 22:09:23 +07:00
//
// Security.
//
// Generated by the chromedp-gen command.
package security
// Code generated by chromedp-gen. DO NOT EDIT.
2017-01-24 22:09:23 +07:00
import (
"context"
2017-01-26 14:28:34 +07:00
cdp "github.com/knq/chromedp/cdp"
2017-01-24 22:09:23 +07:00
)
// DisableParams disables tracking security state changes.
type DisableParams struct{}
// Disable disables tracking security state changes.
func Disable() *DisableParams {
return &DisableParams{}
}
// Do executes Security.disable against the provided context and
// target handler.
func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
return h.Execute(ctxt, cdp.CommandSecurityDisable, nil, nil)
2017-01-24 22:09:23 +07:00
}
2017-12-18 07:23:14 +07:00
// EnableParams enables tracking security state changes.
type EnableParams struct{}
// Enable enables tracking security state changes.
func Enable() *EnableParams {
return &EnableParams{}
}
// Do executes Security.enable against the provided context and
// target handler.
func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
return h.Execute(ctxt, cdp.CommandSecurityEnable, nil, nil)
}
2017-12-22 10:07:54 +07:00
// SetIgnoreCertificateErrorsParams enable/disable whether all certificate
// errors should be ignored.
type SetIgnoreCertificateErrorsParams struct {
Ignore bool `json:"ignore"` // If true, all certificate errors will be ignored.
2017-03-25 05:51:18 +07:00
}
2017-12-22 10:07:54 +07:00
// SetIgnoreCertificateErrors enable/disable whether all certificate errors
// should be ignored.
2017-03-25 05:51:18 +07:00
//
// parameters:
2017-12-22 10:07:54 +07:00
// ignore - If true, all certificate errors will be ignored.
func SetIgnoreCertificateErrors(ignore bool) *SetIgnoreCertificateErrorsParams {
return &SetIgnoreCertificateErrorsParams{
Ignore: ignore,
2017-03-25 05:51:18 +07:00
}
}
2017-12-22 10:07:54 +07:00
// Do executes Security.setIgnoreCertificateErrors against the provided context and
2017-03-25 05:51:18 +07:00
// target handler.
2017-12-22 10:07:54 +07:00
func (p *SetIgnoreCertificateErrorsParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
return h.Execute(ctxt, cdp.CommandSecuritySetIgnoreCertificateErrors, p, nil)
2017-03-25 05:51:18 +07:00
}