MCPcopy Create free account
hub / github.com/bufbuild/buf / newSourceOrModuleRefParser

Function newSourceOrModuleRefParser

private/buf/buffetch/ref_parser.go:193–220  ·  view source on GitHub ↗
(logger *slog.Logger)

Source from the content-addressed store, hash-verified

191}
192
193func newSourceOrModuleRefParser(logger *slog.Logger) *refParser {
194 return &refParser{
195 logger: logger,
196 fetchRefParser: internal.NewRefParser(
197 logger,
198 internal.WithRawRefProcessor(processRawRefSourceOrModule),
199 internal.WithArchiveFormat(
200 formatTar,
201 internal.ArchiveTypeTar,
202 ),
203 internal.WithArchiveFormat(
204 formatTargz,
205 internal.ArchiveTypeTar,
206 internal.WithArchiveDefaultCompressionType(
207 internal.CompressionTypeGzip,
208 ),
209 ),
210 internal.WithArchiveFormat(
211 formatZip,
212 internal.ArchiveTypeZip,
213 ),
214 internal.WithGitFormat(formatGit),
215 internal.WithDirFormat(formatDir),
216 internal.WithModuleFormat(formatMod),
217 internal.WithProtoFileFormat(formatProtoFile),
218 ),
219 }
220}
221
222func (a *refParser) GetRef(
223 ctx context.Context,

Callers 1

Calls 8

NewRefParserFunction · 0.92
WithRawRefProcessorFunction · 0.92
WithArchiveFormatFunction · 0.92
WithGitFormatFunction · 0.92
WithDirFormatFunction · 0.92
WithModuleFormatFunction · 0.92
WithProtoFileFormatFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…