chromedp/cdp/schema/schema.go

45 lines
1.1 KiB
Go
Raw Normal View History

2017-01-24 15:09:23 +00:00
// Package schema provides the Chrome Debugging Protocol
// 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
// 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.
}
// 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.
func (p *GetDomainsParams) Do(ctxt context.Context, h cdp.Handler) (domains []*Domain, err error) {
2017-01-24 15:09:23 +00:00
// execute
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
}
return res.Domains, nil
2017-01-24 15:09:23 +00:00
}