2017-05-06 01:20:24 +00:00
|
|
|
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
2017-01-24 15:09:23 +00:00
|
|
|
|
|
|
|
package io
|
|
|
|
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2017-02-18 03:58:29 +00:00
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(in *jlexer.Lexer, out *ReadReturns) {
|
2017-01-24 15:09:23 +00:00
|
|
|
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 {
|
2017-02-18 03:58:29 +00:00
|
|
|
case "data":
|
|
|
|
out.Data = string(in.String())
|
|
|
|
case "eof":
|
|
|
|
out.EOF = bool(in.Bool())
|
2017-01-24 15:09:23 +00:00
|
|
|
default:
|
|
|
|
in.SkipRecursive()
|
|
|
|
}
|
|
|
|
in.WantComma()
|
|
|
|
}
|
|
|
|
in.Delim('}')
|
|
|
|
if isTopLevel {
|
|
|
|
in.Consumed()
|
|
|
|
}
|
|
|
|
}
|
2017-02-18 03:58:29 +00:00
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(out *jwriter.Writer, in ReadReturns) {
|
2017-01-24 15:09:23 +00:00
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
2017-02-18 03:58:29 +00:00
|
|
|
if in.Data != "" {
|
|
|
|
if !first {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
first = false
|
|
|
|
out.RawString("\"data\":")
|
|
|
|
out.String(string(in.Data))
|
|
|
|
}
|
|
|
|
if in.EOF {
|
|
|
|
if !first {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
first = false
|
|
|
|
out.RawString("\"eof\":")
|
|
|
|
out.Bool(bool(in.EOF))
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
out.RawByte('}')
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v ReadReturns) MarshalJSON() ([]byte, error) {
|
2017-01-24 15:09:23 +00:00
|
|
|
w := jwriter.Writer{}
|
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(&w, v)
|
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v ReadReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
2017-01-24 15:09:23 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(w, v)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v *ReadReturns) UnmarshalJSON(data []byte) error {
|
2017-01-24 15:09:23 +00:00
|
|
|
r := jlexer.Lexer{Data: data}
|
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(&r, v)
|
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v *ReadReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
2017-01-24 15:09:23 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(l, v)
|
|
|
|
}
|
2017-02-18 03:58:29 +00:00
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(in *jlexer.Lexer, out *ReadParams) {
|
2017-01-24 15:09:23 +00:00
|
|
|
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 {
|
2017-02-18 03:58:29 +00:00
|
|
|
case "handle":
|
|
|
|
out.Handle = StreamHandle(in.String())
|
|
|
|
case "offset":
|
|
|
|
out.Offset = int64(in.Int64())
|
|
|
|
case "size":
|
|
|
|
out.Size = int64(in.Int64())
|
2017-01-24 15:09:23 +00:00
|
|
|
default:
|
|
|
|
in.SkipRecursive()
|
|
|
|
}
|
|
|
|
in.WantComma()
|
|
|
|
}
|
|
|
|
in.Delim('}')
|
|
|
|
if isTopLevel {
|
|
|
|
in.Consumed()
|
|
|
|
}
|
|
|
|
}
|
2017-02-18 03:58:29 +00:00
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(out *jwriter.Writer, in ReadParams) {
|
2017-01-24 15:09:23 +00:00
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
2017-02-18 03:58:29 +00:00
|
|
|
if !first {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
first = false
|
|
|
|
out.RawString("\"handle\":")
|
|
|
|
out.String(string(in.Handle))
|
|
|
|
if in.Offset != 0 {
|
2017-01-24 15:09:23 +00:00
|
|
|
if !first {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
first = false
|
2017-02-18 03:58:29 +00:00
|
|
|
out.RawString("\"offset\":")
|
|
|
|
out.Int64(int64(in.Offset))
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
2017-02-18 03:58:29 +00:00
|
|
|
if in.Size != 0 {
|
2017-01-24 15:09:23 +00:00
|
|
|
if !first {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
first = false
|
2017-02-18 03:58:29 +00:00
|
|
|
out.RawString("\"size\":")
|
|
|
|
out.Int64(int64(in.Size))
|
2017-01-24 15:09:23 +00:00
|
|
|
}
|
|
|
|
out.RawByte('}')
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v ReadParams) MarshalJSON() ([]byte, error) {
|
2017-01-24 15:09:23 +00:00
|
|
|
w := jwriter.Writer{}
|
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(&w, v)
|
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v ReadParams) MarshalEasyJSON(w *jwriter.Writer) {
|
2017-01-24 15:09:23 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(w, v)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v *ReadParams) UnmarshalJSON(data []byte) error {
|
2017-01-24 15:09:23 +00:00
|
|
|
r := jlexer.Lexer{Data: data}
|
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(&r, v)
|
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v *ReadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
2017-01-24 15:09:23 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(l, v)
|
|
|
|
}
|
2017-02-18 03:58:29 +00:00
|
|
|
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo2(in *jlexer.Lexer, out *CloseParams) {
|
2017-01-24 15:09:23 +00:00
|
|
|
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 "handle":
|
|
|
|
out.Handle = StreamHandle(in.String())
|
|
|
|
default:
|
|
|
|
in.SkipRecursive()
|
|
|
|
}
|
|
|
|
in.WantComma()
|
|
|
|
}
|
|
|
|
in.Delim('}')
|
|
|
|
if isTopLevel {
|
|
|
|
in.Consumed()
|
|
|
|
}
|
|
|
|
}
|
2017-02-18 03:58:29 +00:00
|
|
|
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo2(out *jwriter.Writer, in CloseParams) {
|
2017-01-24 15:09:23 +00:00
|
|
|
out.RawByte('{')
|
|
|
|
first := true
|
|
|
|
_ = first
|
|
|
|
if !first {
|
|
|
|
out.RawByte(',')
|
|
|
|
}
|
|
|
|
first = false
|
|
|
|
out.RawString("\"handle\":")
|
|
|
|
out.String(string(in.Handle))
|
|
|
|
out.RawByte('}')
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v CloseParams) MarshalJSON() ([]byte, error) {
|
2017-01-24 15:09:23 +00:00
|
|
|
w := jwriter.Writer{}
|
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo2(&w, v)
|
|
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) {
|
2017-01-24 15:09:23 +00:00
|
|
|
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo2(w, v)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v *CloseParams) UnmarshalJSON(data []byte) error {
|
2017-01-24 15:09:23 +00:00
|
|
|
r := jlexer.Lexer{Data: data}
|
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo2(&r, v)
|
|
|
|
return r.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
2017-02-18 03:58:29 +00:00
|
|
|
func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
2017-01-24 15:09:23 +00:00
|
|
|
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo2(l, v)
|
|
|
|
}
|