package
0.0.2
Repository: https://github.com/alis-exchange/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.
IsDigestChanged returns true if the error indicates an unexpected digest change.
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.
SortModuleReferences sorts the ModuleReferences lexicographically by their identity.
ValidateModuleFilePath validates that the module file path is not empty.
ValidateModulePinsConsistentDigests verifies that module pins to the same commit don't change digests.
ValidateModulePinsUniqueByIdentity returns an error if the module pins contain any duplicates.
ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates.
ValidateProtoModulePin verifies the given module pin is well-formed.
ValidateProtoModuleReference verifies the given module 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.

# 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.