- Updating documentation for chromedp-gen to point to standard versions
  of easyjson/quicktemplate (qtc) and added information about goimports
- Replaced {% end %} non-standard quicktemplate tags with the
  appropriate closing tags
- Updated to latest chrome protocol.json definition
- Regenerated cdp protocol after switching to standard easyjson/qtc
		
	
			
		
			
				
	
	
		
			355 lines
		
	
	
		
			8.7 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			355 lines
		
	
	
		
			8.7 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // AUTOGENERATED FILE: easyjson marshaler/unmarshalers.
 | |
| 
 | |
| package rendering
 | |
| 
 | |
| import (
 | |
| 	json "encoding/json"
 | |
| 	easyjson "github.com/mailru/easyjson"
 | |
| 	jlexer "github.com/mailru/easyjson/jlexer"
 | |
| 	jwriter "github.com/mailru/easyjson/jwriter"
 | |
| )
 | |
| 
 | |
| // suppress unused package warning
 | |
| var (
 | |
| 	_ *json.RawMessage
 | |
| 	_ *jlexer.Lexer
 | |
| 	_ *jwriter.Writer
 | |
| 	_ easyjson.Marshaler
 | |
| )
 | |
| 
 | |
| func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering(in *jlexer.Lexer, out *SetShowViewportSizeOnResizeParams) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "show":
 | |
| 			out.Show = bool(in.Bool())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering(out *jwriter.Writer, in SetShowViewportSizeOnResizeParams) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	if !first {
 | |
| 		out.RawByte(',')
 | |
| 	}
 | |
| 	first = false
 | |
| 	out.RawString("\"show\":")
 | |
| 	out.Bool(bool(in.Show))
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v SetShowViewportSizeOnResizeParams) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v SetShowViewportSizeOnResizeParams) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *SetShowViewportSizeOnResizeParams) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *SetShowViewportSizeOnResizeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering(l, v)
 | |
| }
 | |
| func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering1(in *jlexer.Lexer, out *SetShowScrollBottleneckRectsParams) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "show":
 | |
| 			out.Show = bool(in.Bool())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering1(out *jwriter.Writer, in SetShowScrollBottleneckRectsParams) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	if !first {
 | |
| 		out.RawByte(',')
 | |
| 	}
 | |
| 	first = false
 | |
| 	out.RawString("\"show\":")
 | |
| 	out.Bool(bool(in.Show))
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v SetShowScrollBottleneckRectsParams) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering1(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v SetShowScrollBottleneckRectsParams) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering1(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *SetShowScrollBottleneckRectsParams) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering1(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *SetShowScrollBottleneckRectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering1(l, v)
 | |
| }
 | |
| func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(in *jlexer.Lexer, out *SetShowPaintRectsParams) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "result":
 | |
| 			out.Result = bool(in.Bool())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(out *jwriter.Writer, in SetShowPaintRectsParams) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	if !first {
 | |
| 		out.RawByte(',')
 | |
| 	}
 | |
| 	first = false
 | |
| 	out.RawString("\"result\":")
 | |
| 	out.Bool(bool(in.Result))
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v SetShowPaintRectsParams) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v SetShowPaintRectsParams) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *SetShowPaintRectsParams) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *SetShowPaintRectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(l, v)
 | |
| }
 | |
| func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(in *jlexer.Lexer, out *SetShowFPSCounterParams) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "show":
 | |
| 			out.Show = bool(in.Bool())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(out *jwriter.Writer, in SetShowFPSCounterParams) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	if !first {
 | |
| 		out.RawByte(',')
 | |
| 	}
 | |
| 	first = false
 | |
| 	out.RawString("\"show\":")
 | |
| 	out.Bool(bool(in.Show))
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v SetShowFPSCounterParams) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v SetShowFPSCounterParams) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *SetShowFPSCounterParams) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *SetShowFPSCounterParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(l, v)
 | |
| }
 | |
| func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering4(in *jlexer.Lexer, out *SetShowDebugBordersParams) {
 | |
| 	isTopLevel := in.IsStart()
 | |
| 	if in.IsNull() {
 | |
| 		if isTopLevel {
 | |
| 			in.Consumed()
 | |
| 		}
 | |
| 		in.Skip()
 | |
| 		return
 | |
| 	}
 | |
| 	in.Delim('{')
 | |
| 	for !in.IsDelim('}') {
 | |
| 		key := in.UnsafeString()
 | |
| 		in.WantColon()
 | |
| 		if in.IsNull() {
 | |
| 			in.Skip()
 | |
| 			in.WantComma()
 | |
| 			continue
 | |
| 		}
 | |
| 		switch key {
 | |
| 		case "show":
 | |
| 			out.Show = bool(in.Bool())
 | |
| 		default:
 | |
| 			in.SkipRecursive()
 | |
| 		}
 | |
| 		in.WantComma()
 | |
| 	}
 | |
| 	in.Delim('}')
 | |
| 	if isTopLevel {
 | |
| 		in.Consumed()
 | |
| 	}
 | |
| }
 | |
| func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering4(out *jwriter.Writer, in SetShowDebugBordersParams) {
 | |
| 	out.RawByte('{')
 | |
| 	first := true
 | |
| 	_ = first
 | |
| 	if !first {
 | |
| 		out.RawByte(',')
 | |
| 	}
 | |
| 	first = false
 | |
| 	out.RawString("\"show\":")
 | |
| 	out.Bool(bool(in.Show))
 | |
| 	out.RawByte('}')
 | |
| }
 | |
| 
 | |
| // MarshalJSON supports json.Marshaler interface
 | |
| func (v SetShowDebugBordersParams) MarshalJSON() ([]byte, error) {
 | |
| 	w := jwriter.Writer{}
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering4(&w, v)
 | |
| 	return w.Buffer.BuildBytes(), w.Error
 | |
| }
 | |
| 
 | |
| // MarshalEasyJSON supports easyjson.Marshaler interface
 | |
| func (v SetShowDebugBordersParams) MarshalEasyJSON(w *jwriter.Writer) {
 | |
| 	easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering4(w, v)
 | |
| }
 | |
| 
 | |
| // UnmarshalJSON supports json.Unmarshaler interface
 | |
| func (v *SetShowDebugBordersParams) UnmarshalJSON(data []byte) error {
 | |
| 	r := jlexer.Lexer{Data: data}
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering4(&r, v)
 | |
| 	return r.Error()
 | |
| }
 | |
| 
 | |
| // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
 | |
| func (v *SetShowDebugBordersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
 | |
| 	easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering4(l, v)
 | |
| }
 |