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

Method GetModuleForOpaqueID

private/bufpkg/bufmodule/module_set.go:58–58  ·  view source on GitHub ↗

GetModuleForOpaqueID gets the Module for the OpaqueID, if it exists. Returns nil if there is no Module with the given OpaqueID. However, as long as the OpaqueID came from a Module contained within Modules(), this will always return a non-nil value.

(opaqueID string)

Source from the content-addressed store, hash-verified

56 // as the OpaqueID came from a Module contained within Modules(), this will always
57 // return a non-nil value.
58 GetModuleForOpaqueID(opaqueID string) Module
59 // GetModuleForBucketID gets the Module for the BucketID, if it exists.
60 //
61 // Returns nil if there is no Module with the given BucketID.

Callers 10

TestBasicFunction · 0.65
TestModuleCycleErrorFunction · 0.65
TestNoProtoFilesErrorFunction · 0.65
TestProtoFileTargetPathFunction · 0.65
TestTypesFromMainModuleFunction · 0.65
testBasicFunction · 0.65
TestDuplicatePathFunction · 0.65
testLicenseAndDocFunction · 0.65

Implementers 1

moduleSetprivate/bufpkg/bufmodule/module_set.go

Calls

no outgoing calls

Tested by 10

TestBasicFunction · 0.52
TestModuleCycleErrorFunction · 0.52
TestNoProtoFilesErrorFunction · 0.52
TestProtoFileTargetPathFunction · 0.52
TestTypesFromMainModuleFunction · 0.52
testBasicFunction · 0.52
TestDuplicatePathFunction · 0.52
testLicenseAndDocFunction · 0.52