# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
CommitWithExpectedDigest returns a new CommitOption that will compare the Digest of the ModuleKey provided at construction with this digest whenever any lazy method is called.
DigestEqual returns true if the given Digests are considered equal.
FileInfoPaths is a convenience function that returns the paths of the FileInfos.
FileType returns the FileType for the given path.
GetDocFile gets the singular documentation File for the Module, if it exists.
GetDocStorageReadBucket gets a storage.ReadBucket that just contains the documentation file(s).
GetFileInfos is a convenience function that walks the ModuleReadBucket and gets all the FileInfos.
GetFilePaths is a convenience function that gets all the target and non-target file paths for the ModuleReadBucket.
GetLicenseFile gets the license File for the Module, if it exists.
GetLicenseStorageReadBucket gets a storage.ReadBucket that just contains the license file(s).
GetTargetFileInfos is a convenience function that walks the ModuleReadBucket and gets all the FileInfos where IsTargetFile() is set to true.
GetTargetFilePaths is a convenience function that gets all the target file paths for the ModuleReadBucket.
IsValidModuleFilePath returns true if the given file path is a valid Module file path.
LocalModuleWithDescription returns a new LocalModuleOption that adds the given description to the Module.
LocalModuleWithFullName returns a new LocalModuleOption that adds the given FullName to the result Module.
LocalModuleWithFullName returns a new LocalModuleOption that adds the given FullName and CommitID to the result Module.
LocalModuleWithProtoFileTargetPath returns a new LocalModuleOption that specifically targets a single .proto file, and optionally targets all other .proto files that are in the same package.
LocalModuleWithTargetPaths returns a new LocalModuleOption that specifically targets the given paths, and specifically excludes the given paths.
LocalModuleWithV1Beta1OrV1BufLockObjectData returns a new LocalModuleOption that attaches the original source buf.local file associated with this Module for v1 or v1beta1 buf.lock-backed Modules.
LocalModuleWithV1Beta1OrV1BufYAMLObjectData returns a new LocalModuleOption that attaches the original source buf.yaml file associated with this module for v1 or v1beta1 buf.yaml-backed Modules.
ModuleDirectModuleDeps is a convenience function that returns only the direct dependencies of the Module.
ModuleKeyToCommitKey converts a ModuleKey to a CommitKey.
ModuleKeyToRegistryCommitID converts the ModuleKey to a RegistryCommitID.
ModuleReadBucketToStorageReadBucket converts the given ModuleReadBucket to a storage.ReadBucket.
ModuleReadBucketWithOnlyFileTypes returns a new ModuleReadBucket that only contains the given FileTypes.
ModuleReadBucketWithOnlyProtoFiles is a convenience function that returns a new ModuleReadBucket that only contains the .proto files.
ModuleReadBucketWithOnlyTargetFiles returns a new ModuleReadBucket that only contains target Files.
ModuleSetLocalModules is a convenience function that returns the local Modules from a ModuleSet.
ModuleSetLocalOpaqueIDs is a convenience function that returns a slice of the OpaqueIDs of the local Modules in the ModuleSet.
ModuleSetNonTargetModules is a convenience function that returns the non-target Modules from a ModuleSet.
ModuleSetNonTargetOpaqueIDs is a convenience function that returns a slice of the OpaqueIDs of the non-target Modules in the ModuleSet.
ModuleSetOpaqueIDs is a convenience function that returns a slice of the OpaqueIDs of the Modules in the ModuleSet.
ModuleSetRemoteModules is a convenience function that returns the remote Modules from a ModuleSet.
ModuleSetRemoteOpaqueIDs is a convenience function that returns a slice of the OpaqueIDs of the remote Modules in the ModuleSet.
ModuleSetTargetLocalModulesAndTransitiveLocalDeps is a convenience function that returns the targeted local Modules of the ModuleSet, and their transitive local dependencies.
ModuleSetTargetModules is a convenience function that returns the target Modules from a ModuleSet.
ModuleSetTargetOpaqueIDs is a convenience function that returns a slice of the OpaqueIDs of the target Modules in the ModuleSet.
ModuleSetToDAG gets a DAG of the given ModuleSet.
ModuleSetToDAGWithRemoteOnly returns a new ModuleSetToDAGOption that specifies the graph should be built with only remote modules.
ModuleSetToModuleReadBucketWithOnlyProtoFiles converts the ModuleSet to a ModuleReadBucket that contains all the .proto files of the target and non-target Modules of the ModuleSet.
ModuleSetToModuleReadBucketWithOnlyProtoFilesForTargetModules converts the ModuleSet to a ModuleReadBucket that contains all the .proto files of the target Modules of the ModuleSet.
ModuleToModuleKey returns a new ModuleKey for the given Module.
NewCommit returns a new Commit.
NewCommitKey returns a new CommitKey.
NewDigest creates a new Digest.
NewModuleData returns a new ModuleData.
NewModuleKey returns a new ModuleKey.
NewModuleSetBuilder returns a new ModuleSetBuilder.
NewModuleSetForRemoteModule is a convenience function that build a ModuleSet for for a single remote Module based on ModuleKey.
No description provided by the author
NewRegistryCommitID returns a new RegistryCommitID.
NewUploadOptions returns a new UploadOptions.
ParseDigest parses a Digest from its string representation.
ParseDigestType parses a DigestType from its string representation.
ParseFileType parses the file type from its string representation.
ParseModuleVisibility parses the ModuleVisibility from the string.
RemoteDepsForModules returns the remote dependencies of the local Modules.
RemoteDepsForModuleSet returns the remote dependencies of the local Modules in the ModuleSet.
RemoteModuleWithTargetPaths returns a new RemoteModuleOption that specifically targets the given paths, and specifically excludes the given paths.
UniqueDigestTypeForCommitKeys returns the single DigestType for the Digests on the CommitKeys.
UniqueDigestTypeForModuleKeys returns the single DigestType for the Digests on the ModuleKeys.
UploadWithCreateIfNotExist returns a new UploadOption that will result in the Modules being created on the registry with the given visibility and default label if they do not exist.
UploadWithExcludeUnnamed returns a new UploadOption that will exclude unnamed modules.
UploadWithLabels returns a new UploadOption that adds the given labels.
UploadWithSourceControlURL returns a new UploadOption that will set the source control url for the module contents uploaded.
UploadWithTags returns a new UploadOption that adds the given tags.
WalkFileInfosWithOnlyTargetFiles returns a new WalkFileInfosOption that only walks the target files.
# Constants
DigestTypeB4 represents the b4 module digest type.
DigestTypeB5 represents the b5 digest type.
No description provided by the author
No description provided by the author
No description provided by the author
ModuleVisibilityPublic says the Module is private on the registry.
ModuleVisibilityPublic says the Module is public on the registry.
# Variables
AllDigestTypes are all known DigestTypes.
ErrNoTargetProtoFiles is the error to return if no target .proto files were found in situations where they were expected to be found.
NopCommitProvider is a no-op CommitProvider.
NopGraphProvider is a no-op GraphProvider.
NopModuleDataProvider is a no-op ModuleDataProvider.
NopUploader is a no-op Uploader.
# Structs
DigestMismatchError is the error returned if the Digest of a downloaded Module or Commit does not match the expected digest in a buf.lock file.
DuplicateProtoPathError is the error returned if a .proto file with the same path is detected in two or more Modules.
ImportNotExistError is the error returned from ModuleDeps() if an import does not exist.
ModuleCycleError is the error returned if a cycle is detected in module dependencies.
NoProtoFilesError is the error returned if a Module has no .proto files.
RegistryCommitID is the pair of a Commit ID with the registry the commit belongs to.
# Interfaces
Commit represents a Commit for a Module on the BSR.
CommitKey provides identifying information for a Commit when calling the CommitProvider.
CommitProvider provides Commits for ModuleKeys or CommitIDs.
Digest is a digest of some content.
File is a file within a Module.
FileInfo is the file info for a Module file.
GraphProvider provides directed acyclic graphs for ModuleKeys.
Module presents a BSR module.
ModuleData presents raw Module data read by ModuleKey.
ModuleDataProvider provides ModulesDatas.
ModuleDep is the dependency of a Module.
ModuleKey provides identifying information for a Module.
ModuleKeyProvider provides ModuleKeys for ModuleRefs.
ModuleReadBucket is an object analogous to storage.ReadBucket that supplements ObjectInfos and Objects with the data on the Module that supplied them.
ModuleSet is a set of Modules constructed by a ModuleBuilder.
ModuleSetBuilder builds ModuleSets.
ObjectData is individual file data.
RemoteDep is a remote dependency of some local Module in a ModuleSet.
Uploader uploads ModuleSets.
UploadOptions are the possible options for upload.
# Type aliases
CommitOption is an option for a new Commit.
DigestType is a type of digest.
No description provided by the author
LocalModuleOption is an option for AddLocalModule.
ModuleSetToDAGOption is an option for ModuleSetToDAG.
ModuleVisibility is the visibility of a Module on a registry.
RemoteModuleOption is an option for AddRemoteModule.
UploadOption is an option for an Upload.
WalkFileInfosOption is an option for WalkFileInfos.