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

Method GetSourceRefForInputConfig

private/buf/buffetch/ref_parser.go:388–402  ·  view source on GitHub ↗
(
	ctx context.Context,
	inputConfig bufconfig.InputConfig,
)

Source from the content-addressed store, hash-verified

386}
387
388func (a *refParser) GetSourceRefForInputConfig(
389 ctx context.Context,
390 inputConfig bufconfig.InputConfig,
391) (SourceRef, error) {
392 parsedRef, err := a.getParsedRefForInputConfig(ctx, inputConfig, sourceFormats)
393 if err != nil {
394 return nil, err
395 }
396 parsedBucketRef, ok := parsedRef.(internal.ParsedBucketRef)
397 if !ok {
398 // this should never happen
399 return nil, fmt.Errorf("invalid ParsedRef type for source: %T", parsedRef)
400 }
401 return newSourceRef(parsedBucketRef), nil
402}
403
404func (a *refParser) GetDirRef(
405 ctx context.Context,

Callers

nothing calls this directly

Calls 2

newSourceRefFunction · 0.85

Tested by

no test coverage detected