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

Function newSourceRefParser

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

Source from the content-addressed store, hash-verified

129}
130
131func newSourceRefParser(logger *slog.Logger) *refParser {
132 return &refParser{
133 logger: logger,
134 fetchRefParser: internal.NewRefParser(
135 logger,
136 internal.WithRawRefProcessor(processRawRefSource),
137 internal.WithArchiveFormat(
138 formatTar,
139 internal.ArchiveTypeTar,
140 ),
141 internal.WithArchiveFormat(
142 formatTargz,
143 internal.ArchiveTypeTar,
144 internal.WithArchiveDefaultCompressionType(
145 internal.CompressionTypeGzip,
146 ),
147 ),
148 internal.WithArchiveFormat(
149 formatZip,
150 internal.ArchiveTypeZip,
151 ),
152 internal.WithGitFormat(formatGit),
153 internal.WithDirFormat(formatDir),
154 internal.WithProtoFileFormat(formatProtoFile),
155 ),
156 }
157}
158
159func newDirRefParser(logger *slog.Logger) *refParser {
160 return &refParser{

Callers 1

NewSourceRefParserFunction · 0.85

Calls 7

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…