3096 lines
68 KiB
Go
3096 lines
68 KiB
Go
|
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||
|
|
||
|
package server
|
||
|
|
||
|
import (
|
||
|
json "encoding/json"
|
||
|
storage "github.com/khlieng/dispatch/storage"
|
||
|
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 easyjson42239ddeDecodeGithubComKhliengDispatchServer(in *jlexer.Lexer, out *WhoisReply) {
|
||
|
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 "nick":
|
||
|
out.Nick = string(in.String())
|
||
|
case "username":
|
||
|
out.Username = string(in.String())
|
||
|
case "host":
|
||
|
out.Host = string(in.String())
|
||
|
case "realname":
|
||
|
out.Realname = string(in.String())
|
||
|
case "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channels":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Channels = nil
|
||
|
} else {
|
||
|
in.Delim('[')
|
||
|
if out.Channels == nil {
|
||
|
if !in.IsDelim(']') {
|
||
|
out.Channels = make([]string, 0, 4)
|
||
|
} else {
|
||
|
out.Channels = []string{}
|
||
|
}
|
||
|
} else {
|
||
|
out.Channels = (out.Channels)[:0]
|
||
|
}
|
||
|
for !in.IsDelim(']') {
|
||
|
var v1 string
|
||
|
v1 = string(in.String())
|
||
|
out.Channels = append(out.Channels, v1)
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim(']')
|
||
|
}
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer(out *jwriter.Writer, in WhoisReply) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Nick != "" {
|
||
|
const prefix string = ",\"nick\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Nick))
|
||
|
}
|
||
|
if in.Username != "" {
|
||
|
const prefix string = ",\"username\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Username))
|
||
|
}
|
||
|
if in.Host != "" {
|
||
|
const prefix string = ",\"host\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Host))
|
||
|
}
|
||
|
if in.Realname != "" {
|
||
|
const prefix string = ",\"realname\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Realname))
|
||
|
}
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if len(in.Channels) != 0 {
|
||
|
const prefix string = ",\"channels\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
{
|
||
|
out.RawByte('[')
|
||
|
for v2, v3 := range in.Channels {
|
||
|
if v2 > 0 {
|
||
|
out.RawByte(',')
|
||
|
}
|
||
|
out.String(string(v3))
|
||
|
}
|
||
|
out.RawByte(']')
|
||
|
}
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v WhoisReply) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v WhoisReply) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *WhoisReply) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *WhoisReply) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer1(in *jlexer.Lexer, out *Whois) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "user":
|
||
|
out.User = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer1(out *jwriter.Writer, in Whois) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.User != "" {
|
||
|
const prefix string = ",\"user\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.User))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Whois) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer1(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Whois) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer1(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Whois) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer1(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Whois) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer1(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer2(in *jlexer.Lexer, out *WSResponse) {
|
||
|
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 "type":
|
||
|
out.Type = 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 easyjson42239ddeEncodeGithubComKhliengDispatchServer2(out *jwriter.Writer, in WSResponse) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Type != "" {
|
||
|
const prefix string = ",\"type\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Type))
|
||
|
}
|
||
|
if in.Data != nil {
|
||
|
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 WSResponse) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer2(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v WSResponse) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer2(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *WSResponse) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer2(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *WSResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer2(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer3(in *jlexer.Lexer, out *WSRequest) {
|
||
|
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 "type":
|
||
|
out.Type = string(in.String())
|
||
|
case "data":
|
||
|
if data := in.Raw(); in.Ok() {
|
||
|
in.AddError((out.Data).UnmarshalJSON(data))
|
||
|
}
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer3(out *jwriter.Writer, in WSRequest) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Type != "" {
|
||
|
const prefix string = ",\"type\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Type))
|
||
|
}
|
||
|
if (in.Data).IsDefined() {
|
||
|
const prefix string = ",\"data\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Raw((in.Data).MarshalJSON())
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v WSRequest) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer3(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v WSRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer3(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *WSRequest) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer3(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *WSRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer3(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer4(in *jlexer.Lexer, out *Userlist) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "users":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Users = nil
|
||
|
} else {
|
||
|
in.Delim('[')
|
||
|
if out.Users == nil {
|
||
|
if !in.IsDelim(']') {
|
||
|
out.Users = make([]string, 0, 4)
|
||
|
} else {
|
||
|
out.Users = []string{}
|
||
|
}
|
||
|
} else {
|
||
|
out.Users = (out.Users)[:0]
|
||
|
}
|
||
|
for !in.IsDelim(']') {
|
||
|
var v4 string
|
||
|
v4 = string(in.String())
|
||
|
out.Users = append(out.Users, v4)
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim(']')
|
||
|
}
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer4(out *jwriter.Writer, in Userlist) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if len(in.Users) != 0 {
|
||
|
const prefix string = ",\"users\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
{
|
||
|
out.RawByte('[')
|
||
|
for v5, v6 := range in.Users {
|
||
|
if v5 > 0 {
|
||
|
out.RawByte(',')
|
||
|
}
|
||
|
out.String(string(v6))
|
||
|
}
|
||
|
out.RawByte(']')
|
||
|
}
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Userlist) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer4(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Userlist) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer4(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Userlist) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer4(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Userlist) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer4(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer5(in *jlexer.Lexer, out *Topic) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "topic":
|
||
|
out.Topic = string(in.String())
|
||
|
case "nick":
|
||
|
out.Nick = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer5(out *jwriter.Writer, in Topic) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if in.Topic != "" {
|
||
|
const prefix string = ",\"topic\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Topic))
|
||
|
}
|
||
|
if in.Nick != "" {
|
||
|
const prefix string = ",\"nick\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Nick))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Topic) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer5(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Topic) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer5(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Topic) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer5(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Topic) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer5(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer6(in *jlexer.Lexer, out *ServerName) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "name":
|
||
|
out.Name = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer6(out *jwriter.Writer, in ServerName) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Name != "" {
|
||
|
const prefix string = ",\"name\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Name))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v ServerName) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer6(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v ServerName) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer6(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *ServerName) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer6(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *ServerName) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer6(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer7(in *jlexer.Lexer, out *Server) {
|
||
|
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 "status":
|
||
|
if data := in.Raw(); in.Ok() {
|
||
|
in.AddError((out.Status).UnmarshalJSON(data))
|
||
|
}
|
||
|
case "name":
|
||
|
out.Name = string(in.String())
|
||
|
case "host":
|
||
|
out.Host = string(in.String())
|
||
|
case "port":
|
||
|
out.Port = string(in.String())
|
||
|
case "tls":
|
||
|
out.TLS = bool(in.Bool())
|
||
|
case "password":
|
||
|
out.Password = string(in.String())
|
||
|
case "nick":
|
||
|
out.Nick = string(in.String())
|
||
|
case "username":
|
||
|
out.Username = string(in.String())
|
||
|
case "realname":
|
||
|
out.Realname = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer7(out *jwriter.Writer, in Server) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if true {
|
||
|
const prefix string = ",\"status\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Raw((in.Status).MarshalJSON())
|
||
|
}
|
||
|
if in.Name != "" {
|
||
|
const prefix string = ",\"name\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Name))
|
||
|
}
|
||
|
if in.Host != "" {
|
||
|
const prefix string = ",\"host\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Host))
|
||
|
}
|
||
|
if in.Port != "" {
|
||
|
const prefix string = ",\"port\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Port))
|
||
|
}
|
||
|
if in.TLS {
|
||
|
const prefix string = ",\"tls\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Bool(bool(in.TLS))
|
||
|
}
|
||
|
if in.Password != "" {
|
||
|
const prefix string = ",\"password\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Password))
|
||
|
}
|
||
|
if in.Nick != "" {
|
||
|
const prefix string = ",\"nick\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Nick))
|
||
|
}
|
||
|
if in.Username != "" {
|
||
|
const prefix string = ",\"username\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Username))
|
||
|
}
|
||
|
if in.Realname != "" {
|
||
|
const prefix string = ",\"realname\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Realname))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Server) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer7(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Server) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer7(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Server) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer7(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Server) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer7(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer8(in *jlexer.Lexer, out *SearchResult) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "results":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Results = nil
|
||
|
} else {
|
||
|
in.Delim('[')
|
||
|
if out.Results == nil {
|
||
|
if !in.IsDelim(']') {
|
||
|
out.Results = make([]storage.Message, 0, 1)
|
||
|
} else {
|
||
|
out.Results = []storage.Message{}
|
||
|
}
|
||
|
} else {
|
||
|
out.Results = (out.Results)[:0]
|
||
|
}
|
||
|
for !in.IsDelim(']') {
|
||
|
var v7 storage.Message
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchStorage(in, &v7)
|
||
|
out.Results = append(out.Results, v7)
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim(']')
|
||
|
}
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer8(out *jwriter.Writer, in SearchResult) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if len(in.Results) != 0 {
|
||
|
const prefix string = ",\"results\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
{
|
||
|
out.RawByte('[')
|
||
|
for v8, v9 := range in.Results {
|
||
|
if v8 > 0 {
|
||
|
out.RawByte(',')
|
||
|
}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchStorage(out, v9)
|
||
|
}
|
||
|
out.RawByte(']')
|
||
|
}
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v SearchResult) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer8(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v SearchResult) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer8(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *SearchResult) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer8(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *SearchResult) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer8(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchStorage(in *jlexer.Lexer, out *storage.Message) {
|
||
|
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 "from":
|
||
|
out.From = string(in.String())
|
||
|
case "content":
|
||
|
out.Content = string(in.String())
|
||
|
case "time":
|
||
|
out.Time = int64(in.Int64())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchStorage(out *jwriter.Writer, in storage.Message) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.From != "" {
|
||
|
const prefix string = ",\"from\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.From))
|
||
|
}
|
||
|
if in.Content != "" {
|
||
|
const prefix string = ",\"content\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Content))
|
||
|
}
|
||
|
if in.Time != 0 {
|
||
|
const prefix string = ",\"time\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Int64(int64(in.Time))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer9(in *jlexer.Lexer, out *SearchRequest) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "phrase":
|
||
|
out.Phrase = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer9(out *jwriter.Writer, in SearchRequest) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if in.Phrase != "" {
|
||
|
const prefix string = ",\"phrase\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Phrase))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v SearchRequest) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer9(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v SearchRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer9(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *SearchRequest) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer9(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *SearchRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer9(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer10(in *jlexer.Lexer, out *ReconnectSettings) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "skipVerify":
|
||
|
out.SkipVerify = bool(in.Bool())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer10(out *jwriter.Writer, in ReconnectSettings) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.SkipVerify {
|
||
|
const prefix string = ",\"skipVerify\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Bool(bool(in.SkipVerify))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v ReconnectSettings) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer10(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v ReconnectSettings) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer10(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *ReconnectSettings) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer10(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *ReconnectSettings) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer10(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer11(in *jlexer.Lexer, out *Raw) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "message":
|
||
|
out.Message = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer11(out *jwriter.Writer, in Raw) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Message != "" {
|
||
|
const prefix string = ",\"message\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Message))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Raw) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer11(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Raw) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer11(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Raw) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer11(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Raw) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer11(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer12(in *jlexer.Lexer, out *Quit) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "user":
|
||
|
out.User = string(in.String())
|
||
|
case "reason":
|
||
|
out.Reason = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer12(out *jwriter.Writer, in Quit) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.User != "" {
|
||
|
const prefix string = ",\"user\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.User))
|
||
|
}
|
||
|
if in.Reason != "" {
|
||
|
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 Quit) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer12(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Quit) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer12(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Quit) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer12(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Quit) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer12(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer13(in *jlexer.Lexer, out *Part) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "user":
|
||
|
out.User = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "channels":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Channels = nil
|
||
|
} else {
|
||
|
in.Delim('[')
|
||
|
if out.Channels == nil {
|
||
|
if !in.IsDelim(']') {
|
||
|
out.Channels = make([]string, 0, 4)
|
||
|
} else {
|
||
|
out.Channels = []string{}
|
||
|
}
|
||
|
} else {
|
||
|
out.Channels = (out.Channels)[:0]
|
||
|
}
|
||
|
for !in.IsDelim(']') {
|
||
|
var v10 string
|
||
|
v10 = string(in.String())
|
||
|
out.Channels = append(out.Channels, v10)
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim(']')
|
||
|
}
|
||
|
case "reason":
|
||
|
out.Reason = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer13(out *jwriter.Writer, in Part) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.User != "" {
|
||
|
const prefix string = ",\"user\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.User))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if len(in.Channels) != 0 {
|
||
|
const prefix string = ",\"channels\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
{
|
||
|
out.RawByte('[')
|
||
|
for v11, v12 := range in.Channels {
|
||
|
if v11 > 0 {
|
||
|
out.RawByte(',')
|
||
|
}
|
||
|
out.String(string(v12))
|
||
|
}
|
||
|
out.RawByte(']')
|
||
|
}
|
||
|
}
|
||
|
if in.Reason != "" {
|
||
|
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 Part) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer13(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Part) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer13(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Part) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer13(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Part) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer13(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer14(in *jlexer.Lexer, out *NickFail) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer14(out *jwriter.Writer, in NickFail) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v NickFail) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer14(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v NickFail) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer14(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *NickFail) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer14(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *NickFail) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer14(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer15(in *jlexer.Lexer, out *Nick) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "oldNick":
|
||
|
out.Old = string(in.String())
|
||
|
case "newNick":
|
||
|
out.New = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer15(out *jwriter.Writer, in Nick) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Old != "" {
|
||
|
const prefix string = ",\"oldNick\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Old))
|
||
|
}
|
||
|
if in.New != "" {
|
||
|
const prefix string = ",\"newNick\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.New))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Nick) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer15(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Nick) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer15(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Nick) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer15(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Nick) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer15(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer16(in *jlexer.Lexer, out *Mode) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "user":
|
||
|
out.User = string(in.String())
|
||
|
case "add":
|
||
|
out.Add = string(in.String())
|
||
|
case "remove":
|
||
|
out.Remove = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer16(out *jwriter.Writer, in Mode) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if in.User != "" {
|
||
|
const prefix string = ",\"user\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.User))
|
||
|
}
|
||
|
if in.Add != "" {
|
||
|
const prefix string = ",\"add\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Add))
|
||
|
}
|
||
|
if in.Remove != "" {
|
||
|
const prefix string = ",\"remove\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Remove))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Mode) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer16(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Mode) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer16(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Mode) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer16(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Mode) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer16(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer17(in *jlexer.Lexer, out *Messages) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "to":
|
||
|
out.To = string(in.String())
|
||
|
case "messages":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Messages = nil
|
||
|
} else {
|
||
|
in.Delim('[')
|
||
|
if out.Messages == nil {
|
||
|
if !in.IsDelim(']') {
|
||
|
out.Messages = make([]storage.Message, 0, 1)
|
||
|
} else {
|
||
|
out.Messages = []storage.Message{}
|
||
|
}
|
||
|
} else {
|
||
|
out.Messages = (out.Messages)[:0]
|
||
|
}
|
||
|
for !in.IsDelim(']') {
|
||
|
var v13 storage.Message
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchStorage(in, &v13)
|
||
|
out.Messages = append(out.Messages, v13)
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim(']')
|
||
|
}
|
||
|
case "prepend":
|
||
|
out.Prepend = bool(in.Bool())
|
||
|
case "next":
|
||
|
out.Next = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer17(out *jwriter.Writer, in Messages) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.To != "" {
|
||
|
const prefix string = ",\"to\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.To))
|
||
|
}
|
||
|
if len(in.Messages) != 0 {
|
||
|
const prefix string = ",\"messages\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
{
|
||
|
out.RawByte('[')
|
||
|
for v14, v15 := range in.Messages {
|
||
|
if v14 > 0 {
|
||
|
out.RawByte(',')
|
||
|
}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchStorage(out, v15)
|
||
|
}
|
||
|
out.RawByte(']')
|
||
|
}
|
||
|
}
|
||
|
if in.Prepend {
|
||
|
const prefix string = ",\"prepend\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Bool(bool(in.Prepend))
|
||
|
}
|
||
|
if in.Next != "" {
|
||
|
const prefix string = ",\"next\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Next))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Messages) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer17(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Messages) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer17(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Messages) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer17(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Messages) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer17(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer18(in *jlexer.Lexer, out *Message) {
|
||
|
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 "id":
|
||
|
out.ID = string(in.String())
|
||
|
case "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "from":
|
||
|
out.From = string(in.String())
|
||
|
case "to":
|
||
|
out.To = string(in.String())
|
||
|
case "content":
|
||
|
out.Content = string(in.String())
|
||
|
case "type":
|
||
|
out.Type = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer18(out *jwriter.Writer, in Message) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.ID != "" {
|
||
|
const prefix string = ",\"id\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.ID))
|
||
|
}
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.From != "" {
|
||
|
const prefix string = ",\"from\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.From))
|
||
|
}
|
||
|
if in.To != "" {
|
||
|
const prefix string = ",\"to\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.To))
|
||
|
}
|
||
|
if in.Content != "" {
|
||
|
const prefix string = ",\"content\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Content))
|
||
|
}
|
||
|
if in.Type != "" {
|
||
|
const prefix string = ",\"type\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Type))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Message) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer18(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Message) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer18(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Message) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer18(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer18(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer19(in *jlexer.Lexer, out *MOTD) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "title":
|
||
|
out.Title = string(in.String())
|
||
|
case "content":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Content = nil
|
||
|
} else {
|
||
|
in.Delim('[')
|
||
|
if out.Content == nil {
|
||
|
if !in.IsDelim(']') {
|
||
|
out.Content = make([]string, 0, 4)
|
||
|
} else {
|
||
|
out.Content = []string{}
|
||
|
}
|
||
|
} else {
|
||
|
out.Content = (out.Content)[:0]
|
||
|
}
|
||
|
for !in.IsDelim(']') {
|
||
|
var v16 string
|
||
|
v16 = string(in.String())
|
||
|
out.Content = append(out.Content, v16)
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim(']')
|
||
|
}
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer19(out *jwriter.Writer, in MOTD) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Title != "" {
|
||
|
const prefix string = ",\"title\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Title))
|
||
|
}
|
||
|
if len(in.Content) != 0 {
|
||
|
const prefix string = ",\"content\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
{
|
||
|
out.RawByte('[')
|
||
|
for v17, v18 := range in.Content {
|
||
|
if v17 > 0 {
|
||
|
out.RawByte(',')
|
||
|
}
|
||
|
out.String(string(v18))
|
||
|
}
|
||
|
out.RawByte(']')
|
||
|
}
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v MOTD) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer19(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v MOTD) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer19(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *MOTD) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer19(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *MOTD) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer19(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer20(in *jlexer.Lexer, out *Kick) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "user":
|
||
|
out.User = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer20(out *jwriter.Writer, in Kick) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if in.User != "" {
|
||
|
const prefix string = ",\"user\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.User))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Kick) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer20(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Kick) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer20(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Kick) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer20(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Kick) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer20(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer21(in *jlexer.Lexer, out *Join) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "user":
|
||
|
out.User = string(in.String())
|
||
|
case "channels":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Channels = nil
|
||
|
} else {
|
||
|
in.Delim('[')
|
||
|
if out.Channels == nil {
|
||
|
if !in.IsDelim(']') {
|
||
|
out.Channels = make([]string, 0, 4)
|
||
|
} else {
|
||
|
out.Channels = []string{}
|
||
|
}
|
||
|
} else {
|
||
|
out.Channels = (out.Channels)[:0]
|
||
|
}
|
||
|
for !in.IsDelim(']') {
|
||
|
var v19 string
|
||
|
v19 = string(in.String())
|
||
|
out.Channels = append(out.Channels, v19)
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim(']')
|
||
|
}
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer21(out *jwriter.Writer, in Join) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.User != "" {
|
||
|
const prefix string = ",\"user\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.User))
|
||
|
}
|
||
|
if len(in.Channels) != 0 {
|
||
|
const prefix string = ",\"channels\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
{
|
||
|
out.RawByte('[')
|
||
|
for v20, v21 := range in.Channels {
|
||
|
if v20 > 0 {
|
||
|
out.RawByte(',')
|
||
|
}
|
||
|
out.String(string(v21))
|
||
|
}
|
||
|
out.RawByte(']')
|
||
|
}
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Join) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer21(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Join) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer21(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Join) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer21(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Join) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer21(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer22(in *jlexer.Lexer, out *Invite) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "user":
|
||
|
out.User = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer22(out *jwriter.Writer, in Invite) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if in.User != "" {
|
||
|
const prefix string = ",\"user\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.User))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Invite) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer22(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Invite) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer22(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Invite) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer22(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Invite) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer22(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer23(in *jlexer.Lexer, out *FetchMessages) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "channel":
|
||
|
out.Channel = string(in.String())
|
||
|
case "next":
|
||
|
out.Next = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer23(out *jwriter.Writer, in FetchMessages) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Channel != "" {
|
||
|
const prefix string = ",\"channel\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Channel))
|
||
|
}
|
||
|
if in.Next != "" {
|
||
|
const prefix string = ",\"next\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Next))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v FetchMessages) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer23(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v FetchMessages) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer23(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *FetchMessages) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer23(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *FetchMessages) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer23(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer24(in *jlexer.Lexer, out *Error) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "message":
|
||
|
out.Message = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer24(out *jwriter.Writer, in Error) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Message != "" {
|
||
|
const prefix string = ",\"message\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Message))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Error) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer24(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Error) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer24(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Error) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer24(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer24(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer25(in *jlexer.Lexer, out *ConnectionUpdate) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "connected":
|
||
|
out.Connected = bool(in.Bool())
|
||
|
case "error":
|
||
|
out.Error = string(in.String())
|
||
|
case "errorType":
|
||
|
out.ErrorType = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer25(out *jwriter.Writer, in ConnectionUpdate) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Connected {
|
||
|
const prefix string = ",\"connected\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Bool(bool(in.Connected))
|
||
|
}
|
||
|
if in.Error != "" {
|
||
|
const prefix string = ",\"error\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Error))
|
||
|
}
|
||
|
if in.ErrorType != "" {
|
||
|
const prefix string = ",\"errorType\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.ErrorType))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v ConnectionUpdate) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer25(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v ConnectionUpdate) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer25(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *ConnectionUpdate) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer25(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *ConnectionUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer25(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer26(in *jlexer.Lexer, out *ClientCert) {
|
||
|
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 "cert":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Cert = nil
|
||
|
} else {
|
||
|
out.Cert = in.Bytes()
|
||
|
}
|
||
|
case "key":
|
||
|
if in.IsNull() {
|
||
|
in.Skip()
|
||
|
out.Key = nil
|
||
|
} else {
|
||
|
out.Key = in.Bytes()
|
||
|
}
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer26(out *jwriter.Writer, in ClientCert) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if len(in.Cert) != 0 {
|
||
|
const prefix string = ",\"cert\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Base64Bytes(in.Cert)
|
||
|
}
|
||
|
if len(in.Key) != 0 {
|
||
|
const prefix string = ",\"key\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.Base64Bytes(in.Key)
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v ClientCert) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer26(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v ClientCert) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer26(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *ClientCert) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer26(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *ClientCert) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer26(l, v)
|
||
|
}
|
||
|
func easyjson42239ddeDecodeGithubComKhliengDispatchServer27(in *jlexer.Lexer, out *Away) {
|
||
|
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 "server":
|
||
|
out.Server = string(in.String())
|
||
|
case "message":
|
||
|
out.Message = string(in.String())
|
||
|
default:
|
||
|
in.SkipRecursive()
|
||
|
}
|
||
|
in.WantComma()
|
||
|
}
|
||
|
in.Delim('}')
|
||
|
if isTopLevel {
|
||
|
in.Consumed()
|
||
|
}
|
||
|
}
|
||
|
func easyjson42239ddeEncodeGithubComKhliengDispatchServer27(out *jwriter.Writer, in Away) {
|
||
|
out.RawByte('{')
|
||
|
first := true
|
||
|
_ = first
|
||
|
if in.Server != "" {
|
||
|
const prefix string = ",\"server\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Server))
|
||
|
}
|
||
|
if in.Message != "" {
|
||
|
const prefix string = ",\"message\":"
|
||
|
if first {
|
||
|
first = false
|
||
|
out.RawString(prefix[1:])
|
||
|
} else {
|
||
|
out.RawString(prefix)
|
||
|
}
|
||
|
out.String(string(in.Message))
|
||
|
}
|
||
|
out.RawByte('}')
|
||
|
}
|
||
|
|
||
|
// MarshalJSON supports json.Marshaler interface
|
||
|
func (v Away) MarshalJSON() ([]byte, error) {
|
||
|
w := jwriter.Writer{}
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer27(&w, v)
|
||
|
return w.Buffer.BuildBytes(), w.Error
|
||
|
}
|
||
|
|
||
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||
|
func (v Away) MarshalEasyJSON(w *jwriter.Writer) {
|
||
|
easyjson42239ddeEncodeGithubComKhliengDispatchServer27(w, v)
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON supports json.Unmarshaler interface
|
||
|
func (v *Away) UnmarshalJSON(data []byte) error {
|
||
|
r := jlexer.Lexer{Data: data}
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer27(&r, v)
|
||
|
return r.Error()
|
||
|
}
|
||
|
|
||
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||
|
func (v *Away) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||
|
easyjson42239ddeDecodeGithubComKhliengDispatchServer27(l, v)
|
||
|
}
|