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

Function ModuleToModuleKey

private/bufpkg/bufmodule/module.go:204–212  ·  view source on GitHub ↗

ModuleToModuleKey returns a new ModuleKey for the given Module. The given Module must have a FullName and CommitID, otherwise this will return error.

(module Module, digestType DigestType)

Source from the content-addressed store, hash-verified

202//
203// The given Module must have a FullName and CommitID, otherwise this will return error.
204func ModuleToModuleKey(module Module, digestType DigestType) (ModuleKey, error) {
205 return newModuleKey(
206 module.FullName(),
207 module.CommitID(),
208 func() (Digest, error) {
209 return module.Digest(digestType)
210 },
211 )
212}
213
214// ModuleDirectModuleDeps is a convenience function that returns only the direct dependencies of the Module.
215func ModuleDirectModuleDeps(module Module) ([]ModuleDep, error) {

Callers 5

PruneFunction · 0.92
addModuleToGraphRecFunction · 0.92

Calls 4

newModuleKeyFunction · 0.85
FullNameMethod · 0.65
CommitIDMethod · 0.65
DigestMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…