2017-01-24 15:09:23 +00:00
|
|
|
// Package schema provides the Chrome Debugging Protocol
|
2017-02-12 04:59:33 +00:00
|
|
|
// commands, types, and events for the Schema domain.
|
2017-01-24 15:09:23 +00:00
|
|
|
//
|
|
|
|
// Provides information about the protocol schema.
|
|
|
|
//
|
|
|
|
// Generated by the chromedp-gen command.
|
|
|
|
package schema
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
|
|
|
// GetDomainsParams returns supported domains.
|
|
|
|
type GetDomainsParams struct{}
|
|
|
|
|
|
|
|
// GetDomains returns supported domains.
|
|
|
|
func GetDomains() *GetDomainsParams {
|
|
|
|
return &GetDomainsParams{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetDomainsReturns return values.
|
|
|
|
type GetDomainsReturns struct {
|
|
|
|
Domains []*Domain `json:"domains,omitempty"` // List of supported domains.
|
|
|
|
}
|
|
|
|
|
2017-02-12 04:59:33 +00:00
|
|
|
// Do executes Schema.getDomains against the provided context and
|
|
|
|
// target handler.
|
2017-01-24 15:09:23 +00:00
|
|
|
//
|
|
|
|
// returns:
|
|
|
|
// domains - List of supported domains.
|
2017-02-12 04:59:33 +00:00
|
|
|
func (p *GetDomainsParams) Do(ctxt context.Context, h cdp.Handler) (domains []*Domain, err error) {
|
2017-01-24 15:09:23 +00:00
|
|
|
// execute
|
2017-02-14 08:41:23 +00:00
|
|
|
var res GetDomainsReturns
|
|
|
|
err = h.Execute(ctxt, cdp.CommandSchemaGetDomains, nil, &res)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
2017-02-14 08:41:23 +00:00
|
|
|
return res.Domains, nil
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|