(logger *slog.Logger, options ...MessageRefParserOption)
| 90 | } |
| 91 | |
| 92 | func newMessageRefParser(logger *slog.Logger, options ...MessageRefParserOption) *refParser { |
| 93 | messageRefParserOptions := newMessageRefParserOptions() |
| 94 | for _, option := range options { |
| 95 | option(messageRefParserOptions) |
| 96 | } |
| 97 | return &refParser{ |
| 98 | logger: logger, |
| 99 | fetchRefParser: internal.NewRefParser( |
| 100 | logger, |
| 101 | internal.WithRawRefProcessor(newProcessRawRefMessage(messageRefParserOptions.defaultMessageEncoding)), |
| 102 | internal.WithSingleFormat(formatBin), |
| 103 | internal.WithSingleFormat(formatBinpb), |
| 104 | internal.WithSingleFormat( |
| 105 | formatJSON, |
| 106 | internal.WithSingleCustomOptionKey(useProtoNamesKey), |
| 107 | internal.WithSingleCustomOptionKey(useEnumNumbersKey), |
| 108 | ), |
| 109 | internal.WithSingleFormat(formatTxtpb), |
| 110 | internal.WithSingleFormat( |
| 111 | formatYAML, |
| 112 | internal.WithSingleCustomOptionKey(useProtoNamesKey), |
| 113 | internal.WithSingleCustomOptionKey(useEnumNumbersKey), |
| 114 | ), |
| 115 | internal.WithSingleFormat( |
| 116 | formatBingz, |
| 117 | internal.WithSingleDefaultCompressionType( |
| 118 | internal.CompressionTypeGzip, |
| 119 | ), |
| 120 | ), |
| 121 | internal.WithSingleFormat( |
| 122 | formatJSONGZ, |
| 123 | internal.WithSingleDefaultCompressionType( |
| 124 | internal.CompressionTypeGzip, |
| 125 | ), |
| 126 | ), |
| 127 | ), |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | func newSourceRefParser(logger *slog.Logger) *refParser { |
| 132 | return &refParser{ |
no test coverage detected
searching dependent graphs…