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

Function NewModuleKey

private/bufpkg/bufmodule/module_key.go:64–74  ·  view source on GitHub ↗

NewModuleKey returns a new ModuleKey. The Digest will be loaded lazily if needed. Note this means that NewModuleKey does *not* validate the digest. If you need to validate the digest, call Digest() and evaluate the returned error.

(
	moduleFullName bufparse.FullName,
	commitID uuid.UUID,
	getDigest func() (Digest, error),
)

Source from the content-addressed store, hash-verified

62// *not* validate the digest. If you need to validate the digest, call Digest() and evaluate
63// the returned error.
64func NewModuleKey(
65 moduleFullName bufparse.FullName,
66 commitID uuid.UUID,
67 getDigest func() (Digest, error),
68) (ModuleKey, error) {
69 return newModuleKey(
70 moduleFullName,
71 commitID,
72 getDigest,
73 )
74}
75
76// UniqueDigestTypeForModuleKeys returns the single DigestType for the Digests on the ModuleKeys.
77//

Calls 1

newModuleKeyFunction · 0.85

Tested by 1

mustNewModuleKeyFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…