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.
99 lines
2.1 KiB
99 lines
2.1 KiB
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
|
|
|
package item
|
|
|
|
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 easyjsonB8950805DecodeGitoaRuGo4devsCacheItem(in *jlexer.Lexer, out *expiredByte) {
|
|
isTopLevel := in.IsStart()
|
|
if in.IsNull() {
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
in.Skip()
|
|
return
|
|
}
|
|
in.Delim('{')
|
|
for !in.IsDelim('}') {
|
|
key := in.UnsafeFieldName(false)
|
|
in.WantColon()
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
in.WantComma()
|
|
continue
|
|
}
|
|
switch key {
|
|
case "d":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Data = nil
|
|
} else {
|
|
out.Data = in.Bytes()
|
|
}
|
|
case "e":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.Expired).UnmarshalJSON(data))
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjsonB8950805EncodeGitoaRuGo4devsCacheItem(out *jwriter.Writer, in expiredByte) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"d\":"
|
|
out.RawString(prefix[1:])
|
|
out.Base64Bytes(in.Data)
|
|
}
|
|
{
|
|
const prefix string = ",\"e\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.Expired).MarshalJSON())
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v expiredByte) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjsonB8950805EncodeGitoaRuGo4devsCacheItem(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v expiredByte) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjsonB8950805EncodeGitoaRuGo4devsCacheItem(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *expiredByte) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjsonB8950805DecodeGitoaRuGo4devsCacheItem(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *expiredByte) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjsonB8950805DecodeGitoaRuGo4devsCacheItem(l, v)
|
|
}
|
|
|