obfuscate_easyjson.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package obfuscate
  3. import (
  4. json "encoding/json"
  5. easyjson "github.com/mailru/easyjson"
  6. jlexer "github.com/mailru/easyjson/jlexer"
  7. jwriter "github.com/mailru/easyjson/jwriter"
  8. )
  9. // suppress unused package warning
  10. var (
  11. _ *json.RawMessage
  12. _ *jlexer.Lexer
  13. _ *jwriter.Writer
  14. _ easyjson.Marshaler
  15. )
  16. func easyjson4ef41860DecodeGithubComDataDogDatadogAgentPkgObfuscate(in *jlexer.Lexer, out *SQLConfig) {
  17. isTopLevel := in.IsStart()
  18. if in.IsNull() {
  19. if isTopLevel {
  20. in.Consumed()
  21. }
  22. in.Skip()
  23. return
  24. }
  25. in.Delim('{')
  26. for !in.IsDelim('}') {
  27. key := in.UnsafeFieldName(false)
  28. in.WantColon()
  29. if in.IsNull() {
  30. in.Skip()
  31. in.WantComma()
  32. continue
  33. }
  34. switch key {
  35. case "TableNames":
  36. out.TableNames = bool(in.Bool())
  37. case "replace_digits":
  38. out.ReplaceDigits = bool(in.Bool())
  39. case "KeepSQLAlias":
  40. out.KeepSQLAlias = bool(in.Bool())
  41. case "DollarQuotedFunc":
  42. out.DollarQuotedFunc = bool(in.Bool())
  43. case "Cache":
  44. out.Cache = bool(in.Bool())
  45. default:
  46. in.SkipRecursive()
  47. }
  48. in.WantComma()
  49. }
  50. in.Delim('}')
  51. if isTopLevel {
  52. in.Consumed()
  53. }
  54. }
  55. func easyjson4ef41860EncodeGithubComDataDogDatadogAgentPkgObfuscate(out *jwriter.Writer, in SQLConfig) {
  56. out.RawByte('{')
  57. first := true
  58. _ = first
  59. {
  60. const prefix string = ",\"TableNames\":"
  61. out.RawString(prefix[1:])
  62. out.Bool(bool(in.TableNames))
  63. }
  64. {
  65. const prefix string = ",\"replace_digits\":"
  66. out.RawString(prefix)
  67. out.Bool(bool(in.ReplaceDigits))
  68. }
  69. {
  70. const prefix string = ",\"KeepSQLAlias\":"
  71. out.RawString(prefix)
  72. out.Bool(bool(in.KeepSQLAlias))
  73. }
  74. {
  75. const prefix string = ",\"DollarQuotedFunc\":"
  76. out.RawString(prefix)
  77. out.Bool(bool(in.DollarQuotedFunc))
  78. }
  79. {
  80. const prefix string = ",\"Cache\":"
  81. out.RawString(prefix)
  82. out.Bool(bool(in.Cache))
  83. }
  84. out.RawByte('}')
  85. }
  86. // MarshalEasyJSON supports easyjson.Marshaler interface
  87. func (v SQLConfig) MarshalEasyJSON(w *jwriter.Writer) {
  88. easyjson4ef41860EncodeGithubComDataDogDatadogAgentPkgObfuscate(w, v)
  89. }
  90. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  91. func (v *SQLConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
  92. easyjson4ef41860DecodeGithubComDataDogDatadogAgentPkgObfuscate(l, v)
  93. }