Documentation ¶
Overview ¶
Package proto is used to parse the CDP protocol definitions (JSON).
Index ¶
- type AnyType
- func (at AnyType) Desc(indent, startOffset int) string
- func (at AnyType) ExportedName(d Domain) string
- func (at AnyType) GetSuffix(pkg string, d Domain) string
- func (at AnyType) GoType(pkg string, d Domain) string
- func (at AnyType) IsEnum() bool
- func (at AnyType) IsLocalEnum() bool
- func (at AnyType) Name(d Domain) string
- func (at AnyType) Recvr(d Domain) string
- type Command
- type Domain
- type Enum
- type Event
- type Protocol
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyType ¶
type AnyType struct { IDName string `json:"id,omitempty"` NameName string `json:"name,omitempty"` Type string `json:"type,omitempty"` Description string `json:"description,omitempty"` Ref string `json:"$ref,omitempty"` Properties []AnyType `json:"properties,omitempty"` Enum []Enum `json:"enum,omitempty"` Items *AnyType `json:"items,omitempty"` MinItems int `json:"minItems,omitempty"` MaxItems int `json:"maxItems,omitempty"` Optional bool `json:"optional,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Experimental bool `json:"experimental,omitempty"` }
AnyType is a catch-all struct for properties, parameters, etc.
func (AnyType) ExportedName ¶
ExportedName returns an exported name.
func (AnyType) IsLocalEnum ¶
IsLocalEnum returns true if type is enumerated without an exported type.
type Command ¶
type Command struct { NameName string `json:"name,omitempty"` Description string `json:"description,omitempty"` Parameters []AnyType `json:"parameters,omitempty"` Returns []AnyType `json:"returns,omitempty"` Optional bool `json:"optional,omitempty"` Experimental bool `json:"experimental,omitempty"` Redirect string `json:"redirect,omitempty"` Handlers []string `json:"handlers,omitempty"` Deprecated bool `json:"deprecated,omitempty"` }
Command represents a command belonging to a domain, e.g. Network.setCookie.
type Domain ¶
type Domain struct { Domain string `json:"domain,omitempty"` Experimental bool `json:"experimental,omitempty"` Description string `json:"description,omitempty"` Dependencies []string `json:"dependencies,omitempty"` Types []AnyType `json:"types,omitempty"` Commands []Command `json:"commands,omitempty"` Events []Event `json:"events,omitempty"` Deprecated bool `json:"deprecated,omitempty"` }
Domain represents a domain, e.g. Page, Network, etc.
type Event ¶
type Event struct { NameName string `json:"name,omitempty"` Description string `json:"description,omitempty"` Parameters []AnyType `json:"parameters,omitempty"` Experimental bool `json:"experimental,omitempty"` Deprecated bool `json:"deprecated,omitempty"` }
Event represents an subscribeable event.
Click to show internal directories.
Click to hide internal directories.