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.
1812 lines
37 KiB
1812 lines
37 KiB
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. |
|
|
|
package auxpi |
|
|
|
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 easyjsonB926644bDecodeAuxpiAuxpiAll(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 easyjsonB926644bEncodeAuxpiAuxpiAll(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{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v picInfo) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *picInfo) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *picInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll1(in *jlexer.Lexer, out *fileData) { |
|
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 "name": |
|
out.Name = string(in.String()) |
|
case "url": |
|
out.Url = string(in.String()) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll1(out *jwriter.Writer, in fileData) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"name\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Name)) |
|
} |
|
{ |
|
const prefix string = ",\"url\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Url)) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v fileData) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll1(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v fileData) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll1(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *fileData) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll1(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *fileData) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll1(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll2(in *jlexer.Lexer, out *UserInfo) { |
|
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 "user": |
|
out.User = string(in.String()) |
|
case "status": |
|
out.Status = string(in.String()) |
|
case "code": |
|
out.Code = int(in.Int()) |
|
case "token": |
|
out.Token = string(in.String()) |
|
case "name": |
|
out.Name = string(in.String()) |
|
case "avatar": |
|
out.Avatar = string(in.String()) |
|
case "introduction": |
|
out.Introduction = string(in.String()) |
|
case "roles": |
|
if in.IsNull() { |
|
in.Skip() |
|
out.Roles = nil |
|
} else { |
|
in.Delim('[') |
|
if out.Roles == nil { |
|
if !in.IsDelim(']') { |
|
out.Roles = make([]string, 0, 4) |
|
} else { |
|
out.Roles = []string{} |
|
} |
|
} else { |
|
out.Roles = (out.Roles)[:0] |
|
} |
|
for !in.IsDelim(']') { |
|
var v1 string |
|
v1 = string(in.String()) |
|
out.Roles = append(out.Roles, v1) |
|
in.WantComma() |
|
} |
|
in.Delim(']') |
|
} |
|
case "setting": |
|
if m, ok := out.Setting.(easyjson.Unmarshaler); ok { |
|
m.UnmarshalEasyJSON(in) |
|
} else if m, ok := out.Setting.(json.Unmarshaler); ok { |
|
_ = m.UnmarshalJSON(in.Raw()) |
|
} else { |
|
out.Setting = in.Interface() |
|
} |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll2(out *jwriter.Writer, in UserInfo) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"user\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.User)) |
|
} |
|
{ |
|
const prefix string = ",\"status\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Status)) |
|
} |
|
{ |
|
const prefix string = ",\"code\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Code)) |
|
} |
|
{ |
|
const prefix string = ",\"token\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Token)) |
|
} |
|
{ |
|
const prefix string = ",\"name\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Name)) |
|
} |
|
{ |
|
const prefix string = ",\"avatar\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Avatar)) |
|
} |
|
{ |
|
const prefix string = ",\"introduction\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Introduction)) |
|
} |
|
{ |
|
const prefix string = ",\"roles\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
if in.Roles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { |
|
out.RawString("null") |
|
} else { |
|
out.RawByte('[') |
|
for v2, v3 := range in.Roles { |
|
if v2 > 0 { |
|
out.RawByte(',') |
|
} |
|
out.String(string(v3)) |
|
} |
|
out.RawByte(']') |
|
} |
|
} |
|
{ |
|
const prefix string = ",\"setting\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
if m, ok := in.Setting.(easyjson.Marshaler); ok { |
|
m.MarshalEasyJSON(out) |
|
} else if m, ok := in.Setting.(json.Marshaler); ok { |
|
out.Raw(m.MarshalJSON()) |
|
} else { |
|
out.Raw(json.Marshal(in.Setting)) |
|
} |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v UserInfo) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll2(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v UserInfo) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll2(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *UserInfo) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll2(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *UserInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll2(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll3(in *jlexer.Lexer, out *UploadConfig) { |
|
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 "local_store": |
|
out.LocalStore = bool(in.Bool()) |
|
case "open_sina_pic_store": |
|
out.OpenSinaPicStore = bool(in.Bool()) |
|
case "sina_account": |
|
(out.SinaAccount).UnmarshalEasyJSON(in) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll3(out *jwriter.Writer, in UploadConfig) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"local_store\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Bool(bool(in.LocalStore)) |
|
} |
|
{ |
|
const prefix string = ",\"open_sina_pic_store\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Bool(bool(in.OpenSinaPicStore)) |
|
} |
|
{ |
|
const prefix string = ",\"sina_account\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
(in.SinaAccount).MarshalEasyJSON(out) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v UploadConfig) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll3(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v UploadConfig) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll3(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *UploadConfig) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll3(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *UploadConfig) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll3(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll4(in *jlexer.Lexer, out *SmResponse) { |
|
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 easyjsonB926644bEncodeAuxpiAuxpiAll4(out *jwriter.Writer, in SmResponse) { |
|
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 SmResponse) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll4(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SmResponse) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll4(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SmResponse) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll4(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SmResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll4(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll5(in *jlexer.Lexer, out *SmData) { |
|
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 "height": |
|
out.Height = int(in.Int()) |
|
case "filename": |
|
out.Filename = string(in.String()) |
|
case "storename": |
|
out.Storename = string(in.String()) |
|
case "size": |
|
out.Size = int(in.Int()) |
|
case "path": |
|
out.Path = string(in.String()) |
|
case "hash": |
|
out.Hash = string(in.String()) |
|
case "timestamp": |
|
out.Timestamp = int(in.Int()) |
|
case "ip": |
|
out.Ip = string(in.String()) |
|
case "url": |
|
out.Url = string(in.String()) |
|
case "delete": |
|
out.Delete = string(in.String()) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll5(out *jwriter.Writer, in SmData) { |
|
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 = ",\"height\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Height)) |
|
} |
|
{ |
|
const prefix string = ",\"filename\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Filename)) |
|
} |
|
{ |
|
const prefix string = ",\"storename\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Storename)) |
|
} |
|
{ |
|
const prefix string = ",\"size\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Size)) |
|
} |
|
{ |
|
const prefix string = ",\"path\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Path)) |
|
} |
|
{ |
|
const prefix string = ",\"hash\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Hash)) |
|
} |
|
{ |
|
const prefix string = ",\"timestamp\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Timestamp)) |
|
} |
|
{ |
|
const prefix string = ",\"ip\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Ip)) |
|
} |
|
{ |
|
const prefix string = ",\"url\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Url)) |
|
} |
|
{ |
|
const prefix string = ",\"delete\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Delete)) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v SmData) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll5(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SmData) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll5(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SmData) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll5(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SmData) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll5(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll6(in *jlexer.Lexer, out *SiteConfig) { |
|
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 "site_name": |
|
out.SiteName = string(in.String()) |
|
case "site_footer": |
|
out.SiteFooter = string(in.String()) |
|
case "site_url": |
|
out.SiteUrl = string(in.String()) |
|
case "site_upload_max_number": |
|
out.SiteUploadMaxNumber = int(in.Int()) |
|
case "site_up_load_max_size": |
|
out.SiteUpLoadMaxSize = int64(in.Int64()) |
|
case "db_option": |
|
(out.DbOption).UnmarshalEasyJSON(in) |
|
case "jwt_secret": |
|
out.JwtSecret = string(in.String()) |
|
case "auxpi_salt": |
|
out.AuxpiSalt = string(in.String()) |
|
case "open_api_up_load": |
|
out.OpenApiUpLoad = bool(in.Bool()) |
|
case "api_token": |
|
out.ApiToken = string(in.String()) |
|
case "api_default": |
|
out.ApiDefault = string(in.String()) |
|
case "cache_config": |
|
out.CacheConfig = bool(in.Bool()) |
|
case "site_upload_way": |
|
(out.SiteUploadWay).UnmarshalEasyJSON(in) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll6(out *jwriter.Writer, in SiteConfig) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"site_name\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.SiteName)) |
|
} |
|
{ |
|
const prefix string = ",\"site_footer\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.SiteFooter)) |
|
} |
|
{ |
|
const prefix string = ",\"site_url\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.SiteUrl)) |
|
} |
|
{ |
|
const prefix string = ",\"site_upload_max_number\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.SiteUploadMaxNumber)) |
|
} |
|
{ |
|
const prefix string = ",\"site_up_load_max_size\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int64(int64(in.SiteUpLoadMaxSize)) |
|
} |
|
{ |
|
const prefix string = ",\"db_option\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
(in.DbOption).MarshalEasyJSON(out) |
|
} |
|
{ |
|
const prefix string = ",\"jwt_secret\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.JwtSecret)) |
|
} |
|
{ |
|
const prefix string = ",\"auxpi_salt\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.AuxpiSalt)) |
|
} |
|
{ |
|
const prefix string = ",\"open_api_up_load\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Bool(bool(in.OpenApiUpLoad)) |
|
} |
|
{ |
|
const prefix string = ",\"api_token\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.ApiToken)) |
|
} |
|
{ |
|
const prefix string = ",\"api_default\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.ApiDefault)) |
|
} |
|
{ |
|
const prefix string = ",\"cache_config\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Bool(bool(in.CacheConfig)) |
|
} |
|
{ |
|
const prefix string = ",\"site_upload_way\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
(in.SiteUploadWay).MarshalEasyJSON(out) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v SiteConfig) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll6(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SiteConfig) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll6(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SiteConfig) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll6(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SiteConfig) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll6(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll7(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 easyjsonB926644bEncodeAuxpiAuxpiAll7(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{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll7(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SinaPics) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll7(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SinaPics) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll7(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SinaPics) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll7(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll8(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 easyjsonB926644bEncodeAuxpiAuxpiAll8(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{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll8(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SinaMsg) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll8(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SinaMsg) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll8(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SinaMsg) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll8(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll9(in *jlexer.Lexer, out *SinaError) { |
|
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 "retcode": |
|
out.Retcode = string(in.String()) |
|
case "reason": |
|
out.Reason = string(in.String()) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll9(out *jwriter.Writer, in SinaError) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"retcode\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Retcode)) |
|
} |
|
{ |
|
const prefix string = ",\"reason\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Reason)) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v SinaError) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll9(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SinaError) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll9(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SinaError) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll9(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SinaError) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll9(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll10(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 easyjsonB926644bEncodeAuxpiAuxpiAll10(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{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll10(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v SinaData) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll10(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *SinaData) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll10(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *SinaData) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll10(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll11(in *jlexer.Lexer, out *ResultJson) { |
|
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 = int(in.Int()) |
|
case "msg": |
|
out.Msg = string(in.String()) |
|
case "data": |
|
(out.Data).UnmarshalEasyJSON(in) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll11(out *jwriter.Writer, in ResultJson) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"code\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Code)) |
|
} |
|
{ |
|
const prefix string = ",\"msg\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Msg)) |
|
} |
|
{ |
|
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 ResultJson) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll11(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v ResultJson) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll11(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *ResultJson) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll11(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *ResultJson) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll11(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll12(in *jlexer.Lexer, out *RespJson) { |
|
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 = int(in.Int()) |
|
case "msg": |
|
out.Msg = string(in.String()) |
|
case "data": |
|
if m, ok := out.Data.(easyjson.Unmarshaler); ok { |
|
m.UnmarshalEasyJSON(in) |
|
} else if m, ok := out.Data.(json.Unmarshaler); ok { |
|
_ = m.UnmarshalJSON(in.Raw()) |
|
} else { |
|
out.Data = in.Interface() |
|
} |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll12(out *jwriter.Writer, in RespJson) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"code\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.Code)) |
|
} |
|
{ |
|
const prefix string = ",\"msg\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.Msg)) |
|
} |
|
{ |
|
const prefix string = ",\"data\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
if m, ok := in.Data.(easyjson.Marshaler); ok { |
|
m.MarshalEasyJSON(out) |
|
} else if m, ok := in.Data.(json.Marshaler); ok { |
|
out.Raw(m.MarshalJSON()) |
|
} else { |
|
out.Raw(json.Marshal(in.Data)) |
|
} |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v RespJson) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll12(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v RespJson) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll12(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *RespJson) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll12(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *RespJson) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll12(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll13(in *jlexer.Lexer, out *DbOption) { |
|
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 "use_db": |
|
out.UseDb = bool(in.Bool()) |
|
case "db_type": |
|
out.DbType = string(in.String()) |
|
case "db_host": |
|
out.DbHost = string(in.String()) |
|
case "db_name": |
|
out.DbName = string(in.String()) |
|
case "db_user": |
|
out.DbUser = string(in.String()) |
|
case "dbl_pass": |
|
out.DblPass = string(in.String()) |
|
case "table_prefix": |
|
out.TablePrefix = string(in.String()) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll13(out *jwriter.Writer, in DbOption) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"use_db\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Bool(bool(in.UseDb)) |
|
} |
|
{ |
|
const prefix string = ",\"db_type\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.DbType)) |
|
} |
|
{ |
|
const prefix string = ",\"db_host\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.DbHost)) |
|
} |
|
{ |
|
const prefix string = ",\"db_name\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.DbName)) |
|
} |
|
{ |
|
const prefix string = ",\"db_user\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.DbUser)) |
|
} |
|
{ |
|
const prefix string = ",\"dbl_pass\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.DblPass)) |
|
} |
|
{ |
|
const prefix string = ",\"table_prefix\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.TablePrefix)) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v DbOption) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll13(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v DbOption) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll13(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *DbOption) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll13(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *DbOption) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll13(l, v) |
|
} |
|
func easyjsonB926644bDecodeAuxpiAuxpiAll14(in *jlexer.Lexer, out *Account) { |
|
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 "user_name": |
|
out.UserName = string(in.String()) |
|
case "pass_word": |
|
out.PassWord = string(in.String()) |
|
case "reset_sina_cookie_time": |
|
out.ResetSinaCookieTime = int(in.Int()) |
|
case "defult_pic_size": |
|
out.DefultPicSize = string(in.String()) |
|
default: |
|
in.SkipRecursive() |
|
} |
|
in.WantComma() |
|
} |
|
in.Delim('}') |
|
if isTopLevel { |
|
in.Consumed() |
|
} |
|
} |
|
func easyjsonB926644bEncodeAuxpiAuxpiAll14(out *jwriter.Writer, in Account) { |
|
out.RawByte('{') |
|
first := true |
|
_ = first |
|
{ |
|
const prefix string = ",\"user_name\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.UserName)) |
|
} |
|
{ |
|
const prefix string = ",\"pass_word\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.PassWord)) |
|
} |
|
{ |
|
const prefix string = ",\"reset_sina_cookie_time\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.Int(int(in.ResetSinaCookieTime)) |
|
} |
|
{ |
|
const prefix string = ",\"defult_pic_size\":" |
|
if first { |
|
first = false |
|
out.RawString(prefix[1:]) |
|
} else { |
|
out.RawString(prefix) |
|
} |
|
out.String(string(in.DefultPicSize)) |
|
} |
|
out.RawByte('}') |
|
} |
|
|
|
// MarshalJSON supports json.Marshaler interface |
|
func (v Account) MarshalJSON() ([]byte, error) { |
|
w := jwriter.Writer{} |
|
easyjsonB926644bEncodeAuxpiAuxpiAll14(&w, v) |
|
return w.Buffer.BuildBytes(), w.Error |
|
} |
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface |
|
func (v Account) MarshalEasyJSON(w *jwriter.Writer) { |
|
easyjsonB926644bEncodeAuxpiAuxpiAll14(w, v) |
|
} |
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface |
|
func (v *Account) UnmarshalJSON(data []byte) error { |
|
r := jlexer.Lexer{Data: data} |
|
easyjsonB926644bDecodeAuxpiAuxpiAll14(&r, v) |
|
return r.Error() |
|
} |
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface |
|
func (v *Account) UnmarshalEasyJSON(l *jlexer.Lexer) { |
|
easyjsonB926644bDecodeAuxpiAuxpiAll14(l, v) |
|
}
|
|
|