mirror of https://github.com/IoTcat/auxpi.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
458 lines
9.4 KiB
458 lines
9.4 KiB
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. |
|
|
|
package server |
|
|
|
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 easyjsonB7954fafDecodeAuxpiServer(in *jlexer.Lexer, out *picInfo) { |
|
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 "width": |
|
out.Width = int(in.Int()) |
|
case "size": |
|
out.Size = int(in.Int()) |
|
case "ret": |
|
out.Ret = int(in.Int()) |
|
case "height": |
|
out.Height = int(in.Int()) |
|
case "name": |
|
out.Name = string(in.String()) |
|
case "pid": |
|
out.Pid = string(in.String()) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB7954fafEncodeAuxpiServer(out *jwriter.Writer, in picInfo) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"width\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Width)) |
|
} |
|
{ |
|
const prefix string = ",\"size\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Size)) |
|
} |
|
{ |
|
const prefix string = ",\"ret\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Ret)) |
|
} |
|
{ |
|
const prefix string = ",\"height\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Height)) |
|
} |
|
{ |
|
const prefix string = ",\"name\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Name)) |
|
} |
|
{ |
|
const prefix string = ",\"pid\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Pid)) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v picInfo) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB7954fafEncodeAuxpiServer(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v picInfo) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB7954fafEncodeAuxpiServer(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *picInfo) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB7954fafDecodeAuxpiServer(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *picInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB7954fafDecodeAuxpiServer(l, v) |
|
} |
|
func easyjsonB7954fafDecodeAuxpiServer1(in *jlexer.Lexer, out *SinaPics) { |
|
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 "pic_1": |
|
(out.Pic_1).UnmarshalEasyJSON(in) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB7954fafEncodeAuxpiServer1(out *jwriter.Writer, in SinaPics) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"pic_1\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
(in.Pic_1).MarshalEasyJSON(out) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v SinaPics) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB7954fafEncodeAuxpiServer1(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SinaPics) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB7954fafEncodeAuxpiServer1(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SinaPics) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB7954fafDecodeAuxpiServer1(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SinaPics) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB7954fafDecodeAuxpiServer1(l, v) |
|
} |
|
func easyjsonB7954fafDecodeAuxpiServer2(in *jlexer.Lexer, out *SinaMsg) { |
|
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 "code": |
|
out.Code = string(in.String()) |
|
case "data": |
|
(out.Data).UnmarshalEasyJSON(in) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB7954fafEncodeAuxpiServer2(out *jwriter.Writer, in SinaMsg) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"code\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Code)) |
|
} |
|
{ |
|
const prefix string = ",\"data\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
(in.Data).MarshalEasyJSON(out) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v SinaMsg) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB7954fafEncodeAuxpiServer2(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SinaMsg) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB7954fafEncodeAuxpiServer2(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SinaMsg) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB7954fafDecodeAuxpiServer2(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SinaMsg) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB7954fafDecodeAuxpiServer2(l, v) |
|
} |
|
func easyjsonB7954fafDecodeAuxpiServer3(in *jlexer.Lexer, out *SinaData) { |
|
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 "count": |
|
out.Count = int(in.Int()) |
|
case "data": |
|
out.Data = string(in.String()) |
|
case "pics": |
|
(out.Pics).UnmarshalEasyJSON(in) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB7954fafEncodeAuxpiServer3(out *jwriter.Writer, in SinaData) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"count\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Count)) |
|
} |
|
{ |
|
const prefix string = ",\"data\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Data)) |
|
} |
|
{ |
|
const prefix string = ",\"pics\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
(in.Pics).MarshalEasyJSON(out) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v SinaData) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB7954fafEncodeAuxpiServer3(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SinaData) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB7954fafEncodeAuxpiServer3(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SinaData) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB7954fafDecodeAuxpiServer3(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SinaData) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB7954fafDecodeAuxpiServer3(l, v) |
|
} |
|
func easyjsonB7954fafDecodeAuxpiServer4(in *jlexer.Lexer, out *Sina) { |
|
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 { |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB7954fafEncodeAuxpiServer4(out *jwriter.Writer, in Sina) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v Sina) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB7954fafEncodeAuxpiServer4(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v Sina) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB7954fafEncodeAuxpiServer4(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *Sina) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB7954fafDecodeAuxpiServer4(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *Sina) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB7954fafDecodeAuxpiServer4(l, v) |
|
}
|
|
|