Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrVersionNotFound = errors.New("version not found") ErrFileNotFound = errors.New("file not found") ErrModuleNotInstalled = errors.New("module not installed") )
var (
ErrModuleNotFoundInLockFile = errors.New("module not found in lock file")
)
var (
ErrRequestedVersionNotGenerated = errors.New("requested version is not generated")
)
Functions ¶
This section is empty.
Types ¶
type CacheDownloadPaths ¶ added in v0.4.0
type CacheDownloadPaths struct { // CacheDownload path to dir with downloaded cache CacheDownloadDir string // ArchiveFile full path to downloaded archive of module ArchiveFile string // ArchiveHashFile full path to file with hash of archive ArchiveHashFile string // ModuleInfoFile full path to file with info about downloaded module ModuleInfoFile string }
CacheDownloadPaths collects cache download paths to: * archive * file with archive hash * info about downloaded module
type GeneratedVersionParts ¶ added in v0.4.0
func (GeneratedVersionParts) GetVersionString ¶ added in v0.4.0
func (g GeneratedVersionParts) GetVersionString() string
type LockFileInfo ¶ added in v0.4.0
type LockFileInfo struct { Name string Version string Hash ModuleHash }
LockFileInfo contains information about module from lock file
type Module ¶
type Module struct { Name string // Full path on remote repository Version RequestedVersion // Version obtained from config (Omitted if version was omitted) }
Module contain requested dependency name and its version
type ModuleConfig ¶
type ModuleConfig struct { // Directories contains dirs with proto files (buf.work.yaml) Directories []string }
ModuleConfig contains module config such as dirs from buf.work.yaml
type ModuleHash ¶ added in v0.4.0
type ModuleHash string
ModuleHash alias for module's hash used in lock file for verification
type RequestedVersion ¶ added in v0.4.0
type RequestedVersion string
RequestedVersion for installing
const ( // If version was omitted Omitted RequestedVersion = "" )
func (RequestedVersion) GetParts ¶ added in v0.4.0
func (v RequestedVersion) GetParts() (GeneratedVersionParts, error)
GetParts return parts of GeneratedVersion if RequestedVersion is not generated return error
func (RequestedVersion) IsGenerated ¶ added in v0.4.0
func (v RequestedVersion) IsGenerated() bool
IsGenerated check if requested was generated and it's not a commit's tag like v0.0.0-20240222234643-814bf88cf225 in go mod
func (RequestedVersion) IsOmitted ¶ added in v0.4.0
func (v RequestedVersion) IsOmitted() bool
IsOmitted check if requested version is omitted