Skip to content

Commit

Permalink
Clarify docs for Module.OpaqueID and Module.BucketID (#3077)
Browse files Browse the repository at this point in the history
  • Loading branch information
bufdev authored Jun 13, 2024
1 parent 8f14893 commit 6c45bb8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions private/bufpkg/bufmodule/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ type Module interface {
// An OpaqueID can be used to denote expected uniqueness of content; if two Modules
// have different IDs, they should be expected to be logically different Modules.
//
// This ID's structure should not be relied upon, and is not a globally-unique identifier.
// An OpaqueID can be used as a human-readable identifier of the Module, suitable for printing
// to a console. However, the OpaqueID may contain information on local directory structure, so
// do not log or print it in contexts where such information may be sensitive.
//
// An OpaqueID's structure should not be relied upon, and is not a globally-unique identifier.
// It's uniqueness property only applies to the lifetime of the Module, and only within
// Modules commonly built from a ModuleSetBuilder.
//
Expand All @@ -61,10 +65,13 @@ type Module interface {
//
// A BucketID will be unique within a given ModuleSet.
//
// This ID's structure should not be relied upon, and is not a globally-unique identifier.
// A BucketID's structure should not be relied upon, and is not a globally-unique identifier.
// It's uniqueness property only applies to the lifetime of the Module, and only within
// Modules commonly built from a ModuleSetBuilder.
//
// A BucketID may contain information on local directory structure, so do not log or print it
// in contexts where such information may be sensitive.
//
// May be empty if a Module was not constructed with a Bucket via a ModuleSetProvider.
BucketID() string
// ModuleFullName returns the full name of the Module.
Expand Down

0 comments on commit 6c45bb8

Please sign in to comment.