Created
November 3, 2022 16:59
-
-
Save rflpazini/1ba3e8c58aac6bccd779c2db28d6968b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. | |
package config | |
import ( | |
json "encoding/json" | |
jwtauth "github.com/Pluto-tv/lib-auth-go/jwtauth" | |
circuitbreaker "github.com/Pluto-tv/lib-client-go/circuitbreaker" | |
httpclient "github.com/Pluto-tv/lib-client-go/httpclient" | |
httpserver "github.com/Pluto-tv/lib-server-go/httpserver" | |
httperror "github.com/Pluto-tv/lib-server-go/httpserver/httperror" | |
middleware "github.com/Pluto-tv/lib-server-go/httpserver/middleware" | |
global "github.com/Pluto-tv/lib-server-go/httpserver/middleware/global" | |
healthcheck "github.com/Pluto-tv/lib-server-go/httpserver/routegroup/healthcheck" | |
instrumentation "github.com/Pluto-tv/lib-server-go/instrumentation" | |
logging "github.com/Pluto-tv/lib-server-go/logging" | |
origin "github.com/Pluto-tv/lib-server-go/origin" | |
easyjson "github.com/mailru/easyjson" | |
jlexer "github.com/mailru/easyjson/jlexer" | |
jwriter "github.com/mailru/easyjson/jwriter" | |
time "time" | |
) | |
// suppress unused package warning | |
var ( | |
_ *json.RawMessage | |
_ *jlexer.Lexer | |
_ *jwriter.Writer | |
_ easyjson.Marshaler | |
) | |
func easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig(in *jlexer.Lexer, out *Config) { | |
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 "server": | |
if in.IsNull() { | |
in.Skip() | |
out.Server = nil | |
} else { | |
if out.Server == nil { | |
out.Server = new(httpserver.Config) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserver(in, out.Server) | |
} | |
case "common": | |
if in.IsNull() { | |
in.Skip() | |
out.Common = nil | |
} else { | |
if out.Common == nil { | |
out.Common = new(Common) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig1(in, out.Common) | |
} | |
case "jwt": | |
if in.IsNull() { | |
in.Skip() | |
out.JWT = nil | |
} else { | |
if out.JWT == nil { | |
out.JWT = new(SessionJWTConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig2(in, out.JWT) | |
} | |
case "mongoDB": | |
if in.IsNull() { | |
in.Skip() | |
out.MongoDB = nil | |
} else { | |
if out.MongoDB == nil { | |
out.MongoDB = new(MongoDB) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig3(in, out.MongoDB) | |
} | |
case "sns": | |
if in.IsNull() { | |
in.Skip() | |
out.SNS = nil | |
} else { | |
if out.SNS == nil { | |
out.SNS = new(SNS) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig4(in, out.SNS) | |
} | |
case "rest": | |
if in.IsNull() { | |
in.Skip() | |
out.Rest = nil | |
} else { | |
if out.Rest == nil { | |
out.Rest = new(Rest) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig5(in, out.Rest) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig(out *jwriter.Writer, in Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"server\":" | |
out.RawString(prefix[1:]) | |
if in.Server == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserver(out, *in.Server) | |
} | |
} | |
{ | |
const prefix string = ",\"common\":" | |
out.RawString(prefix) | |
if in.Common == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig1(out, *in.Common) | |
} | |
} | |
{ | |
const prefix string = ",\"jwt\":" | |
out.RawString(prefix) | |
if in.JWT == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig2(out, *in.JWT) | |
} | |
} | |
{ | |
const prefix string = ",\"mongoDB\":" | |
out.RawString(prefix) | |
if in.MongoDB == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig3(out, *in.MongoDB) | |
} | |
} | |
{ | |
const prefix string = ",\"sns\":" | |
out.RawString(prefix) | |
if in.SNS == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig4(out, *in.SNS) | |
} | |
} | |
{ | |
const prefix string = ",\"rest\":" | |
out.RawString(prefix) | |
if in.Rest == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig5(out, *in.Rest) | |
} | |
} | |
out.RawByte('}') | |
} | |
// MarshalJSON supports json.Marshaler interface | |
func (v Config) MarshalJSON() ([]byte, error) { | |
w := jwriter.Writer{} | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig(&w, v) | |
return w.Buffer.BuildBytes(), w.Error | |
} | |
// MarshalEasyJSON supports easyjson.Marshaler interface | |
func (v Config) MarshalEasyJSON(w *jwriter.Writer) { | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig(w, v) | |
} | |
// UnmarshalJSON supports json.Unmarshaler interface | |
func (v *Config) UnmarshalJSON(data []byte) error { | |
r := jlexer.Lexer{Data: data} | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig(&r, v) | |
return r.Error() | |
} | |
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface | |
func (v *Config) UnmarshalEasyJSON(l *jlexer.Lexer) { | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig(l, v) | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig5(in *jlexer.Lexer, out *Rest) { | |
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 "geo": | |
if in.IsNull() { | |
in.Skip() | |
out.Geo = nil | |
} else { | |
if out.Geo == nil { | |
out.Geo = new(Geo) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig6(in, out.Geo) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig5(out *jwriter.Writer, in Rest) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"geo\":" | |
out.RawString(prefix[1:]) | |
if in.Geo == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig6(out, *in.Geo) | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig6(in *jlexer.Lexer, out *Geo) { | |
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 "locationEndpoint": | |
if in.IsNull() { | |
in.Skip() | |
out.LocationEndpoint = nil | |
} else { | |
if out.LocationEndpoint == nil { | |
out.LocationEndpoint = new(httpclient.Endpoint) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibClientGoHttpclient(in, out.LocationEndpoint) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig6(out *jwriter.Writer, in Geo) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"locationEndpoint\":" | |
out.RawString(prefix[1:]) | |
if in.LocationEndpoint == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibClientGoHttpclient(out, *in.LocationEndpoint) | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibClientGoHttpclient(in *jlexer.Lexer, out *httpclient.Endpoint) { | |
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 "name": | |
out.Name = string(in.String()) | |
case "scheme": | |
out.Scheme = string(in.String()) | |
case "host": | |
out.Host = string(in.String()) | |
case "path": | |
out.Path = string(in.String()) | |
case "method": | |
out.Method = string(in.String()) | |
case "timeoutMs": | |
out.TimeoutMs = time.Duration(in.Int64()) | |
case "attemptTimeoutMs": | |
out.AttemptTimeoutMs = time.Duration(in.Int64()) | |
case "eventChBufferSize": | |
out.EventChBufferSize = int(in.Int()) | |
case "debug": | |
out.Debug = bool(in.Bool()) | |
case "circuitBreaker": | |
easyjson6615c02eDecodeGithubComPlutoTvLibClientGoCircuitbreaker(in, &out.CircuitBreaker) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibClientGoHttpclient(out *jwriter.Writer, in httpclient.Endpoint) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"name\":" | |
out.RawString(prefix[1:]) | |
out.String(string(in.Name)) | |
} | |
{ | |
const prefix string = ",\"scheme\":" | |
out.RawString(prefix) | |
out.String(string(in.Scheme)) | |
} | |
{ | |
const prefix string = ",\"host\":" | |
out.RawString(prefix) | |
out.String(string(in.Host)) | |
} | |
{ | |
const prefix string = ",\"path\":" | |
out.RawString(prefix) | |
out.String(string(in.Path)) | |
} | |
{ | |
const prefix string = ",\"method\":" | |
out.RawString(prefix) | |
out.String(string(in.Method)) | |
} | |
{ | |
const prefix string = ",\"timeoutMs\":" | |
out.RawString(prefix) | |
out.Int64(int64(in.TimeoutMs)) | |
} | |
{ | |
const prefix string = ",\"attemptTimeoutMs\":" | |
out.RawString(prefix) | |
out.Int64(int64(in.AttemptTimeoutMs)) | |
} | |
{ | |
const prefix string = ",\"eventChBufferSize\":" | |
out.RawString(prefix) | |
out.Int(int(in.EventChBufferSize)) | |
} | |
{ | |
const prefix string = ",\"debug\":" | |
out.RawString(prefix) | |
out.Bool(bool(in.Debug)) | |
} | |
{ | |
const prefix string = ",\"circuitBreaker\":" | |
out.RawString(prefix) | |
easyjson6615c02eEncodeGithubComPlutoTvLibClientGoCircuitbreaker(out, in.CircuitBreaker) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibClientGoCircuitbreaker(in *jlexer.Lexer, out *circuitbreaker.Config) { | |
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 "enabled": | |
out.Enabled = bool(in.Bool()) | |
case "tripThreshold": | |
out.TripThreshold = uint(in.Uint()) | |
case "resetIntervalMs": | |
out.ResetIntervalMs = time.Duration(in.Int64()) | |
case "standardFailurePolicy": | |
if in.IsNull() { | |
in.Skip() | |
out.StandardFailurePolicy = nil | |
} else { | |
if out.StandardFailurePolicy == nil { | |
out.StandardFailurePolicy = new(circuitbreaker.StandardFailurePolicyConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibClientGoCircuitbreaker1(in, out.StandardFailurePolicy) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibClientGoCircuitbreaker(out *jwriter.Writer, in circuitbreaker.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"enabled\":" | |
out.RawString(prefix[1:]) | |
out.Bool(bool(in.Enabled)) | |
} | |
{ | |
const prefix string = ",\"tripThreshold\":" | |
out.RawString(prefix) | |
out.Uint(uint(in.TripThreshold)) | |
} | |
{ | |
const prefix string = ",\"resetIntervalMs\":" | |
out.RawString(prefix) | |
out.Int64(int64(in.ResetIntervalMs)) | |
} | |
{ | |
const prefix string = ",\"standardFailurePolicy\":" | |
out.RawString(prefix) | |
if in.StandardFailurePolicy == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibClientGoCircuitbreaker1(out, *in.StandardFailurePolicy) | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibClientGoCircuitbreaker1(in *jlexer.Lexer, out *circuitbreaker.StandardFailurePolicyConfig) { | |
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 "ignoreReqTimeout": | |
out.IgnoreReqTimeout = bool(in.Bool()) | |
case "ignoreReqCancel": | |
out.IgnoreReqCancel = bool(in.Bool()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibClientGoCircuitbreaker1(out *jwriter.Writer, in circuitbreaker.StandardFailurePolicyConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"ignoreReqTimeout\":" | |
out.RawString(prefix[1:]) | |
out.Bool(bool(in.IgnoreReqTimeout)) | |
} | |
{ | |
const prefix string = ",\"ignoreReqCancel\":" | |
out.RawString(prefix) | |
out.Bool(bool(in.IgnoreReqCancel)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig4(in *jlexer.Lexer, out *SNS) { | |
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 "region": | |
out.Region = string(in.String()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig4(out *jwriter.Writer, in SNS) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"region\":" | |
out.RawString(prefix[1:]) | |
out.String(string(in.Region)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig3(in *jlexer.Lexer, out *MongoDB) { | |
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 "database": | |
out.Database = string(in.String()) | |
case "timeout": | |
out.Timeout = int(in.Int()) | |
case "watchlistColl": | |
out.WatchlistColl = string(in.String()) | |
case "seriesColl": | |
out.SeriesColl = string(in.String()) | |
case "channelsColl": | |
out.ChannelsColl = string(in.String()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig3(out *jwriter.Writer, in MongoDB) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"database\":" | |
if first { | |
first = false | |
out.RawString(prefix[1:]) | |
} else { | |
out.RawString(prefix) | |
} | |
out.String(string(in.Database)) | |
} | |
{ | |
const prefix string = ",\"timeout\":" | |
out.RawString(prefix) | |
out.Int(int(in.Timeout)) | |
} | |
{ | |
const prefix string = ",\"watchlistColl\":" | |
out.RawString(prefix) | |
out.String(string(in.WatchlistColl)) | |
} | |
{ | |
const prefix string = ",\"seriesColl\":" | |
out.RawString(prefix) | |
out.String(string(in.SeriesColl)) | |
} | |
{ | |
const prefix string = ",\"channelsColl\":" | |
out.RawString(prefix) | |
out.String(string(in.ChannelsColl)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig2(in *jlexer.Lexer, out *SessionJWTConfig) { | |
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 "auth": | |
if in.IsNull() { | |
in.Skip() | |
out.Auth = nil | |
} else { | |
if out.Auth == nil { | |
out.Auth = new(jwtauth.Config) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibAuthGoJwtauth(in, out.Auth) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig2(out *jwriter.Writer, in SessionJWTConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"auth\":" | |
out.RawString(prefix[1:]) | |
if in.Auth == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibAuthGoJwtauth(out, *in.Auth) | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibAuthGoJwtauth(in *jlexer.Lexer, out *jwtauth.Config) { | |
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 "name": | |
out.Name = string(in.String()) | |
case "issuer": | |
out.Issuer = string(in.String()) | |
case "audience": | |
out.Audience = string(in.String()) | |
case "authHeader": | |
out.AuthHeader = string(in.String()) | |
case "tokenPrefix": | |
out.TokenPrefix = string(in.String()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibAuthGoJwtauth(out *jwriter.Writer, in jwtauth.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"name\":" | |
out.RawString(prefix[1:]) | |
out.String(string(in.Name)) | |
} | |
{ | |
const prefix string = ",\"issuer\":" | |
out.RawString(prefix) | |
out.String(string(in.Issuer)) | |
} | |
{ | |
const prefix string = ",\"audience\":" | |
out.RawString(prefix) | |
out.String(string(in.Audience)) | |
} | |
{ | |
const prefix string = ",\"authHeader\":" | |
out.RawString(prefix) | |
out.String(string(in.AuthHeader)) | |
} | |
{ | |
const prefix string = ",\"tokenPrefix\":" | |
out.RawString(prefix) | |
out.String(string(in.TokenPrefix)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvServiceWatchlistPkgConfig1(in *jlexer.Lexer, out *Common) { | |
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 "runtimeEnv": | |
out.RuntimeEnv = string(in.String()) | |
case "maxOffsetPercentage": | |
out.MaxOffsetPercentage = int(in.Int()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvServiceWatchlistPkgConfig1(out *jwriter.Writer, in Common) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"runtimeEnv\":" | |
out.RawString(prefix[1:]) | |
out.String(string(in.RuntimeEnv)) | |
} | |
{ | |
const prefix string = ",\"maxOffsetPercentage\":" | |
out.RawString(prefix) | |
out.Int(int(in.MaxOffsetPercentage)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserver(in *jlexer.Lexer, out *httpserver.Config) { | |
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 "port": | |
out.Port = int(in.Int()) | |
case "idleTimeoutMSec": | |
out.IdleTimeoutMSec = int(in.Int()) | |
case "readHeaderTimeoutMSec": | |
out.ReadHeaderTimeoutMSec = int(in.Int()) | |
case "readTimeoutMSec": | |
out.ReadTimeoutMSec = int(in.Int()) | |
case "writeTimeoutMSec": | |
out.WriteTimeoutMSec = int(in.Int()) | |
case "httpError": | |
if in.IsNull() { | |
in.Skip() | |
out.HTTPError = nil | |
} else { | |
if out.HTTPError == nil { | |
out.HTTPError = new(httperror.Config) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverHttperror(in, out.HTTPError) | |
} | |
case "middleware": | |
if in.IsNull() { | |
in.Skip() | |
out.Middleware = nil | |
} else { | |
if out.Middleware == nil { | |
out.Middleware = new(middleware.Config) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddleware(in, out.Middleware) | |
} | |
case "instrumentation": | |
if in.IsNull() { | |
in.Skip() | |
out.Instrumentation = nil | |
} else { | |
if out.Instrumentation == nil { | |
out.Instrumentation = new(instrumentation.Config) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoInstrumentation(in, out.Instrumentation) | |
} | |
case "log": | |
if in.IsNull() { | |
in.Skip() | |
out.Log = nil | |
} else { | |
if out.Log == nil { | |
out.Log = new(logging.Config) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoLogging(in, out.Log) | |
} | |
case "healthcheck": | |
if in.IsNull() { | |
in.Skip() | |
out.Healthcheck = nil | |
} else { | |
if out.Healthcheck == nil { | |
out.Healthcheck = new(healthcheck.Config) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverRoutegroupHealthcheck(in, out.Healthcheck) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserver(out *jwriter.Writer, in httpserver.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"port\":" | |
out.RawString(prefix[1:]) | |
out.Int(int(in.Port)) | |
} | |
{ | |
const prefix string = ",\"idleTimeoutMSec\":" | |
out.RawString(prefix) | |
out.Int(int(in.IdleTimeoutMSec)) | |
} | |
{ | |
const prefix string = ",\"readHeaderTimeoutMSec\":" | |
out.RawString(prefix) | |
out.Int(int(in.ReadHeaderTimeoutMSec)) | |
} | |
{ | |
const prefix string = ",\"readTimeoutMSec\":" | |
out.RawString(prefix) | |
out.Int(int(in.ReadTimeoutMSec)) | |
} | |
{ | |
const prefix string = ",\"writeTimeoutMSec\":" | |
out.RawString(prefix) | |
out.Int(int(in.WriteTimeoutMSec)) | |
} | |
{ | |
const prefix string = ",\"httpError\":" | |
out.RawString(prefix) | |
if in.HTTPError == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverHttperror(out, *in.HTTPError) | |
} | |
} | |
{ | |
const prefix string = ",\"middleware\":" | |
out.RawString(prefix) | |
if in.Middleware == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddleware(out, *in.Middleware) | |
} | |
} | |
{ | |
const prefix string = ",\"instrumentation\":" | |
out.RawString(prefix) | |
if in.Instrumentation == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoInstrumentation(out, *in.Instrumentation) | |
} | |
} | |
{ | |
const prefix string = ",\"log\":" | |
out.RawString(prefix) | |
if in.Log == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoLogging(out, *in.Log) | |
} | |
} | |
{ | |
const prefix string = ",\"healthcheck\":" | |
out.RawString(prefix) | |
if in.Healthcheck == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverRoutegroupHealthcheck(out, *in.Healthcheck) | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverRoutegroupHealthcheck(in *jlexer.Lexer, out *healthcheck.Config) { | |
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 "showConfig": | |
out.ShowConfig = bool(in.Bool()) | |
case "showLibrary": | |
out.ShowLibrary = bool(in.Bool()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverRoutegroupHealthcheck(out *jwriter.Writer, in healthcheck.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"showConfig\":" | |
out.RawString(prefix[1:]) | |
out.Bool(bool(in.ShowConfig)) | |
} | |
{ | |
const prefix string = ",\"showLibrary\":" | |
out.RawString(prefix) | |
out.Bool(bool(in.ShowLibrary)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoLogging(in *jlexer.Lexer, out *logging.Config) { | |
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 "level": | |
out.Level = string(in.String()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoLogging(out *jwriter.Writer, in logging.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"level\":" | |
out.RawString(prefix[1:]) | |
out.String(string(in.Level)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoInstrumentation(in *jlexer.Lexer, out *instrumentation.Config) { | |
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 "metric": | |
if in.IsNull() { | |
in.Skip() | |
out.Metric = nil | |
} else { | |
if out.Metric == nil { | |
out.Metric = new(instrumentation.MetricConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoInstrumentation1(in, out.Metric) | |
} | |
case "trace": | |
if in.IsNull() { | |
in.Skip() | |
out.Trace = nil | |
} else { | |
if out.Trace == nil { | |
out.Trace = new(instrumentation.TraceConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoInstrumentation2(in, out.Trace) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoInstrumentation(out *jwriter.Writer, in instrumentation.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"metric\":" | |
out.RawString(prefix[1:]) | |
if in.Metric == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoInstrumentation1(out, *in.Metric) | |
} | |
} | |
{ | |
const prefix string = ",\"trace\":" | |
out.RawString(prefix) | |
if in.Trace == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoInstrumentation2(out, *in.Trace) | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoInstrumentation2(in *jlexer.Lexer, out *instrumentation.TraceConfig) { | |
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 "debug": | |
out.Debug = bool(in.Bool()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoInstrumentation2(out *jwriter.Writer, in instrumentation.TraceConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"debug\":" | |
out.RawString(prefix[1:]) | |
out.Bool(bool(in.Debug)) | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoInstrumentation1(in *jlexer.Lexer, out *instrumentation.MetricConfig) { | |
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 "boundaries": | |
if in.IsNull() { | |
in.Skip() | |
out.Boundaries = nil | |
} else { | |
in.Delim('[') | |
if out.Boundaries == nil { | |
if !in.IsDelim(']') { | |
out.Boundaries = make([]float64, 0, 8) | |
} else { | |
out.Boundaries = []float64{} | |
} | |
} else { | |
out.Boundaries = (out.Boundaries)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v1 float64 | |
v1 = float64(in.Float64()) | |
out.Boundaries = append(out.Boundaries, v1) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "excludeStatusCodes": | |
if in.IsNull() { | |
in.Skip() | |
out.ExcludeStatusCodes = nil | |
} else { | |
in.Delim('[') | |
if out.ExcludeStatusCodes == nil { | |
if !in.IsDelim(']') { | |
out.ExcludeStatusCodes = make([]int, 0, 8) | |
} else { | |
out.ExcludeStatusCodes = []int{} | |
} | |
} else { | |
out.ExcludeStatusCodes = (out.ExcludeStatusCodes)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v2 int | |
v2 = int(in.Int()) | |
out.ExcludeStatusCodes = append(out.ExcludeStatusCodes, v2) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoInstrumentation1(out *jwriter.Writer, in instrumentation.MetricConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"boundaries\":" | |
out.RawString(prefix[1:]) | |
if in.Boundaries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v3, v4 := range in.Boundaries { | |
if v3 > 0 { | |
out.RawByte(',') | |
} | |
out.Float64(float64(v4)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"excludeStatusCodes\":" | |
out.RawString(prefix) | |
if in.ExcludeStatusCodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v5, v6 := range in.ExcludeStatusCodes { | |
if v5 > 0 { | |
out.RawByte(',') | |
} | |
out.Int(int(v6)) | |
} | |
out.RawByte(']') | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddleware(in *jlexer.Lexer, out *middleware.Config) { | |
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 "handlerFuncChain": | |
if in.IsNull() { | |
in.Skip() | |
out.HandlerFuncChain = nil | |
} else { | |
in.Delim('[') | |
if out.HandlerFuncChain == nil { | |
if !in.IsDelim(']') { | |
out.HandlerFuncChain = make([]string, 0, 4) | |
} else { | |
out.HandlerFuncChain = []string{} | |
} | |
} else { | |
out.HandlerFuncChain = (out.HandlerFuncChain)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v7 string | |
v7 = string(in.String()) | |
out.HandlerFuncChain = append(out.HandlerFuncChain, v7) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "cors": | |
if in.IsNull() { | |
in.Skip() | |
out.CORS = nil | |
} else { | |
if out.CORS == nil { | |
out.CORS = new(global.CORSConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal(in, out.CORS) | |
} | |
case "httpLog": | |
if in.IsNull() { | |
in.Skip() | |
out.HTTPLog = nil | |
} else { | |
if out.HTTPLog == nil { | |
out.HTTPLog = new(global.HTTPLogConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal1(in, out.HTTPLog) | |
} | |
case "otelTrace": | |
if in.IsNull() { | |
in.Skip() | |
out.OtelTrace = nil | |
} else { | |
if out.OtelTrace == nil { | |
out.OtelTrace = new(global.OtelTraceConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal2(in, out.OtelTrace) | |
} | |
case "requestIP": | |
if in.IsNull() { | |
in.Skip() | |
out.RequestIP = nil | |
} else { | |
if out.RequestIP == nil { | |
out.RequestIP = new(global.RequestIPConfig) | |
} | |
easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal3(in, out.RequestIP) | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddleware(out *jwriter.Writer, in middleware.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"handlerFuncChain\":" | |
out.RawString(prefix[1:]) | |
if in.HandlerFuncChain == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v8, v9 := range in.HandlerFuncChain { | |
if v8 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v9)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"cors\":" | |
out.RawString(prefix) | |
if in.CORS == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal(out, *in.CORS) | |
} | |
} | |
{ | |
const prefix string = ",\"httpLog\":" | |
out.RawString(prefix) | |
if in.HTTPLog == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal1(out, *in.HTTPLog) | |
} | |
} | |
{ | |
const prefix string = ",\"otelTrace\":" | |
out.RawString(prefix) | |
if in.OtelTrace == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal2(out, *in.OtelTrace) | |
} | |
} | |
{ | |
const prefix string = ",\"requestIP\":" | |
out.RawString(prefix) | |
if in.RequestIP == nil { | |
out.RawString("null") | |
} else { | |
easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal3(out, *in.RequestIP) | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal3(in *jlexer.Lexer, out *global.RequestIPConfig) { | |
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 "headerNames": | |
if in.IsNull() { | |
in.Skip() | |
out.HeaderNames = nil | |
} else { | |
in.Delim('[') | |
if out.HeaderNames == nil { | |
if !in.IsDelim(']') { | |
out.HeaderNames = make([]string, 0, 4) | |
} else { | |
out.HeaderNames = []string{} | |
} | |
} else { | |
out.HeaderNames = (out.HeaderNames)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v10 string | |
v10 = string(in.String()) | |
out.HeaderNames = append(out.HeaderNames, v10) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal3(out *jwriter.Writer, in global.RequestIPConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"headerNames\":" | |
out.RawString(prefix[1:]) | |
if in.HeaderNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v11, v12 := range in.HeaderNames { | |
if v11 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v12)) | |
} | |
out.RawByte(']') | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal2(in *jlexer.Lexer, out *global.OtelTraceConfig) { | |
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 "ignorePaths": | |
if in.IsNull() { | |
in.Skip() | |
out.IgnorePaths = nil | |
} else { | |
in.Delim('[') | |
if out.IgnorePaths == nil { | |
if !in.IsDelim(']') { | |
out.IgnorePaths = make([]string, 0, 4) | |
} else { | |
out.IgnorePaths = []string{} | |
} | |
} else { | |
out.IgnorePaths = (out.IgnorePaths)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v13 string | |
v13 = string(in.String()) | |
out.IgnorePaths = append(out.IgnorePaths, v13) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "ignoreMethods": | |
if in.IsNull() { | |
in.Skip() | |
out.IgnoreMethods = nil | |
} else { | |
in.Delim('[') | |
if out.IgnoreMethods == nil { | |
if !in.IsDelim(']') { | |
out.IgnoreMethods = make([]string, 0, 4) | |
} else { | |
out.IgnoreMethods = []string{} | |
} | |
} else { | |
out.IgnoreMethods = (out.IgnoreMethods)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v14 string | |
v14 = string(in.String()) | |
out.IgnoreMethods = append(out.IgnoreMethods, v14) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal2(out *jwriter.Writer, in global.OtelTraceConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"ignorePaths\":" | |
out.RawString(prefix[1:]) | |
if in.IgnorePaths == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v15, v16 := range in.IgnorePaths { | |
if v15 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v16)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"ignoreMethods\":" | |
out.RawString(prefix) | |
if in.IgnoreMethods == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v17, v18 := range in.IgnoreMethods { | |
if v17 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v18)) | |
} | |
out.RawByte(']') | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal1(in *jlexer.Lexer, out *global.HTTPLogConfig) { | |
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 "ignorePaths": | |
if in.IsNull() { | |
in.Skip() | |
out.IgnorePaths = nil | |
} else { | |
in.Delim('[') | |
if out.IgnorePaths == nil { | |
if !in.IsDelim(']') { | |
out.IgnorePaths = make([]string, 0, 4) | |
} else { | |
out.IgnorePaths = []string{} | |
} | |
} else { | |
out.IgnorePaths = (out.IgnorePaths)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v19 string | |
v19 = string(in.String()) | |
out.IgnorePaths = append(out.IgnorePaths, v19) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "ignoreMethods": | |
if in.IsNull() { | |
in.Skip() | |
out.IgnoreMethods = nil | |
} else { | |
in.Delim('[') | |
if out.IgnoreMethods == nil { | |
if !in.IsDelim(']') { | |
out.IgnoreMethods = make([]string, 0, 4) | |
} else { | |
out.IgnoreMethods = []string{} | |
} | |
} else { | |
out.IgnoreMethods = (out.IgnoreMethods)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v20 string | |
v20 = string(in.String()) | |
out.IgnoreMethods = append(out.IgnoreMethods, v20) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "obfuscatedHeaderKeys": | |
if in.IsNull() { | |
in.Skip() | |
out.ObfuscatedHeaderKeys = nil | |
} else { | |
in.Delim('[') | |
if out.ObfuscatedHeaderKeys == nil { | |
if !in.IsDelim(']') { | |
out.ObfuscatedHeaderKeys = make([]string, 0, 4) | |
} else { | |
out.ObfuscatedHeaderKeys = []string{} | |
} | |
} else { | |
out.ObfuscatedHeaderKeys = (out.ObfuscatedHeaderKeys)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v21 string | |
v21 = string(in.String()) | |
out.ObfuscatedHeaderKeys = append(out.ObfuscatedHeaderKeys, v21) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "obfuscatedQueryKeys": | |
if in.IsNull() { | |
in.Skip() | |
out.ObfuscatedQueryKeys = nil | |
} else { | |
in.Delim('[') | |
if out.ObfuscatedQueryKeys == nil { | |
if !in.IsDelim(']') { | |
out.ObfuscatedQueryKeys = make([]string, 0, 4) | |
} else { | |
out.ObfuscatedQueryKeys = []string{} | |
} | |
} else { | |
out.ObfuscatedQueryKeys = (out.ObfuscatedQueryKeys)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v22 string | |
v22 = string(in.String()) | |
out.ObfuscatedQueryKeys = append(out.ObfuscatedQueryKeys, v22) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "optionalFields": | |
if in.IsNull() { | |
in.Skip() | |
out.OptionalFields = nil | |
} else { | |
in.Delim('[') | |
if out.OptionalFields == nil { | |
if !in.IsDelim(']') { | |
out.OptionalFields = make([]string, 0, 4) | |
} else { | |
out.OptionalFields = []string{} | |
} | |
} else { | |
out.OptionalFields = (out.OptionalFields)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v23 string | |
v23 = string(in.String()) | |
out.OptionalFields = append(out.OptionalFields, v23) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal1(out *jwriter.Writer, in global.HTTPLogConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"ignorePaths\":" | |
out.RawString(prefix[1:]) | |
if in.IgnorePaths == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v24, v25 := range in.IgnorePaths { | |
if v24 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v25)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"ignoreMethods\":" | |
out.RawString(prefix) | |
if in.IgnoreMethods == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v26, v27 := range in.IgnoreMethods { | |
if v26 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v27)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"obfuscatedHeaderKeys\":" | |
out.RawString(prefix) | |
if in.ObfuscatedHeaderKeys == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v28, v29 := range in.ObfuscatedHeaderKeys { | |
if v28 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v29)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"obfuscatedQueryKeys\":" | |
out.RawString(prefix) | |
if in.ObfuscatedQueryKeys == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v30, v31 := range in.ObfuscatedQueryKeys { | |
if v30 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v31)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"optionalFields\":" | |
out.RawString(prefix) | |
if in.OptionalFields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v32, v33 := range in.OptionalFields { | |
if v32 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v33)) | |
} | |
out.RawByte(']') | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal(in *jlexer.Lexer, out *global.CORSConfig) { | |
isTopLevel := in.IsStart() | |
if in.IsNull() { | |
if isTopLevel { | |
in.Consumed() | |
} | |
in.Skip() | |
return | |
} | |
out.Config = new(origin.Config) | |
in.Delim('{') | |
for !in.IsDelim('}') { | |
key := in.UnsafeFieldName(false) | |
in.WantColon() | |
if in.IsNull() { | |
in.Skip() | |
in.WantComma() | |
continue | |
} | |
switch key { | |
case "includePaths": | |
if in.IsNull() { | |
in.Skip() | |
out.IncludePaths = nil | |
} else { | |
in.Delim('[') | |
if out.IncludePaths == nil { | |
if !in.IsDelim(']') { | |
out.IncludePaths = make([]string, 0, 4) | |
} else { | |
out.IncludePaths = []string{} | |
} | |
} else { | |
out.IncludePaths = (out.IncludePaths)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v34 string | |
v34 = string(in.String()) | |
out.IncludePaths = append(out.IncludePaths, v34) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "defaultOrigin": | |
out.DefaultOrigin = string(in.String()) | |
case "allowPlutoOrigin": | |
out.AllowPlutoOrigin = bool(in.Bool()) | |
case "allowSmartTVOrigin": | |
out.AllowSmartTVOrigin = bool(in.Bool()) | |
case "allowFloatingPlayerOrigin": | |
out.AllowFloatingPlayerOrigin = bool(in.Bool()) | |
case "allowedMethods": | |
if in.IsNull() { | |
in.Skip() | |
out.AllowedMethods = nil | |
} else { | |
in.Delim('[') | |
if out.AllowedMethods == nil { | |
if !in.IsDelim(']') { | |
out.AllowedMethods = make([]string, 0, 4) | |
} else { | |
out.AllowedMethods = []string{} | |
} | |
} else { | |
out.AllowedMethods = (out.AllowedMethods)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v35 string | |
v35 = string(in.String()) | |
out.AllowedMethods = append(out.AllowedMethods, v35) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "allowedHeaders": | |
if in.IsNull() { | |
in.Skip() | |
out.AllowedHeaders = nil | |
} else { | |
in.Delim('[') | |
if out.AllowedHeaders == nil { | |
if !in.IsDelim(']') { | |
out.AllowedHeaders = make([]string, 0, 4) | |
} else { | |
out.AllowedHeaders = []string{} | |
} | |
} else { | |
out.AllowedHeaders = (out.AllowedHeaders)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v36 string | |
v36 = string(in.String()) | |
out.AllowedHeaders = append(out.AllowedHeaders, v36) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "exposeHeaders": | |
if in.IsNull() { | |
in.Skip() | |
out.ExposeHeaders = nil | |
} else { | |
in.Delim('[') | |
if out.ExposeHeaders == nil { | |
if !in.IsDelim(']') { | |
out.ExposeHeaders = make([]string, 0, 4) | |
} else { | |
out.ExposeHeaders = []string{} | |
} | |
} else { | |
out.ExposeHeaders = (out.ExposeHeaders)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v37 string | |
v37 = string(in.String()) | |
out.ExposeHeaders = append(out.ExposeHeaders, v37) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
case "defaultProtocol": | |
out.DefaultProtocol = string(in.String()) | |
case "allowedExternalOrigins": | |
if in.IsNull() { | |
in.Skip() | |
out.AllowedExternalOrigins = nil | |
} else { | |
in.Delim('[') | |
if out.AllowedExternalOrigins == nil { | |
if !in.IsDelim(']') { | |
out.AllowedExternalOrigins = make([]string, 0, 4) | |
} else { | |
out.AllowedExternalOrigins = []string{} | |
} | |
} else { | |
out.AllowedExternalOrigins = (out.AllowedExternalOrigins)[:0] | |
} | |
for !in.IsDelim(']') { | |
var v38 string | |
v38 = string(in.String()) | |
out.AllowedExternalOrigins = append(out.AllowedExternalOrigins, v38) | |
in.WantComma() | |
} | |
in.Delim(']') | |
} | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverMiddlewareGlobal(out *jwriter.Writer, in global.CORSConfig) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"includePaths\":" | |
out.RawString(prefix[1:]) | |
if in.IncludePaths == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v39, v40 := range in.IncludePaths { | |
if v39 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v40)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"defaultOrigin\":" | |
out.RawString(prefix) | |
out.String(string(in.DefaultOrigin)) | |
} | |
{ | |
const prefix string = ",\"allowPlutoOrigin\":" | |
out.RawString(prefix) | |
out.Bool(bool(in.AllowPlutoOrigin)) | |
} | |
{ | |
const prefix string = ",\"allowSmartTVOrigin\":" | |
out.RawString(prefix) | |
out.Bool(bool(in.AllowSmartTVOrigin)) | |
} | |
{ | |
const prefix string = ",\"allowFloatingPlayerOrigin\":" | |
out.RawString(prefix) | |
out.Bool(bool(in.AllowFloatingPlayerOrigin)) | |
} | |
{ | |
const prefix string = ",\"allowedMethods\":" | |
out.RawString(prefix) | |
if in.AllowedMethods == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v41, v42 := range in.AllowedMethods { | |
if v41 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v42)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"allowedHeaders\":" | |
out.RawString(prefix) | |
if in.AllowedHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v43, v44 := range in.AllowedHeaders { | |
if v43 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v44)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"exposeHeaders\":" | |
out.RawString(prefix) | |
if in.ExposeHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v45, v46 := range in.ExposeHeaders { | |
if v45 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v46)) | |
} | |
out.RawByte(']') | |
} | |
} | |
{ | |
const prefix string = ",\"defaultProtocol\":" | |
out.RawString(prefix) | |
out.String(string(in.DefaultProtocol)) | |
} | |
{ | |
const prefix string = ",\"allowedExternalOrigins\":" | |
out.RawString(prefix) | |
if in.AllowedExternalOrigins == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { | |
out.RawString("null") | |
} else { | |
out.RawByte('[') | |
for v47, v48 := range in.AllowedExternalOrigins { | |
if v47 > 0 { | |
out.RawByte(',') | |
} | |
out.String(string(v48)) | |
} | |
out.RawByte(']') | |
} | |
} | |
out.RawByte('}') | |
} | |
func easyjson6615c02eDecodeGithubComPlutoTvLibServerGoHttpserverHttperror(in *jlexer.Lexer, out *httperror.Config) { | |
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 "withDetailErrorResponse": | |
out.WithDetailErrorResponse = bool(in.Bool()) | |
default: | |
in.SkipRecursive() | |
} | |
in.WantComma() | |
} | |
in.Delim('}') | |
if isTopLevel { | |
in.Consumed() | |
} | |
} | |
func easyjson6615c02eEncodeGithubComPlutoTvLibServerGoHttpserverHttperror(out *jwriter.Writer, in httperror.Config) { | |
out.RawByte('{') | |
first := true | |
_ = first | |
{ | |
const prefix string = ",\"withDetailErrorResponse\":" | |
out.RawString(prefix[1:]) | |
out.Bool(bool(in.WithDetailErrorResponse)) | |
} | |
out.RawByte('}') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment