package
0.0.0-20230306131847-26f457599b8d
Repository: https://github.com/xiaoyawei/buf.git
Documentation: pkg.go.dev
# Functions
DependencyModulePinsForBucket reads the module dependencies from the lock file in the bucket.
IsCommitModuleReference returns true if the ModuleReference references a commit.
IsCommitReference returns whether the provided reference is a commit.
ModuleIdentityForString returns a new ModuleIdentity for the given string.
ModuleOwnerForString returns a new ModuleOwner for the given string.
ModulePinEqual returns true if a equals b.
ModuleReferenceEqual returns true if a equals b.
ModuleReferenceForString returns a new ModuleReference for the given string.
NewFileInfo returns a new FileInfo.
NewModuleIdentity returns a new ModuleIdentity.
NewModuleOwner returns a new ModuleOwner.
NewModulePin returns a new validated ModulePin.
NewModulePinForProto returns a new ModulePin for the given proto ModulePin.
NewModulePinsForProtos maps the Protobuf equivalent into the internal representation.
NewModuleReference returns a new validated ModuleReference.
NewModuleReferenceForProto returns a new ModuleReference for the given proto ModuleReference.
NewModuleReferencesForProtos maps the Protobuf equivalent into the internal representation.
NewProtoModulePinForModulePin returns a new proto ModulePin for the given ModulePin.
NewProtoModulePinsForModulePins maps the given module pins into the protobuf representation.
NewProtoModuleReferenceForModuleReference returns a new proto ModuleReference for the given ModuleReference.
NewProtoModuleReferencesForModuleReferences maps the given module references into the protobuf representation.
PutDependencyModulePinsToBucket writes the module dependencies to the write bucket in the form of a lock file.
SortFileInfos sorts the FileInfos by Path.
SortFileInfosByExternalPath sorts the FileInfos by ExternalPath.
SortModulePins sorts the ModulePins.
ValidateBranch verifies the given repository branch is well-formed.
ValidateCommit verifies the given commit is well-formed.
ValidateModuleFilePath validates that the module file path is not empty.
ValidateModulePinsUniqueByIdentity returns an error if the module pins contain any duplicates.
ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates.
ValidateOrganization verifies the given organization name is well-formed.
ValidateOwner verifies the given owner name is well-formed.
ValidateProtoModulePin verifies the given module pin is well-formed.
ValidateProtoModuleReference verifies the given module reference is well-formed.
ValidateReference validates that the given ModuleReference reference is well-formed.
ValidateRemoteHasNoPaths validates that the given remote address contains no paths/subdirectories after the root It performs client-side validation only, and is limited to fields we do not think will change in the future.
ValidateRemoteNotEmpty validates that the given remote address is not an empty string It performs client-side validation only, and is limited to fields we do not think will change in the future.
ValidateRepository verifies the given repository name is well-formed.
ValidateTag verifies the given tag is well-formed.
ValidateUser verifies the given user name is well-formed.
# Constants
Main is the default reference used if no other reference is specified.
# Interfaces
FileInfo contains module file info.
ModuleIdentity is a module identity.
ModuleOwner is a module owner.
ModulePin is a module pin.
ModuleReference is a module reference.