Documentation ¶
Overview ¶
Package ghasum provides functionality for working with and manipulating gha.sum files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInitialized is the error used when ghasum is not expected to be // initialized but is. ErrInitialized = errors.New("ghasum is already initialized") // ErrNotInitialized is the error used when ghasum is expected to be // initialized but is not. ErrNotInitialized = errors.New("ghasum has not yet been initialized") // ErrNotInitialized is the error used when the ghasum checksum file could not // be created. ErrSumfileCreate = errors.New("could not create a checksum file") // ErrNotInitialized is the error used when the ghasum checksum file could not // be encoded. ErrSumfileEncode = errors.New("could not encode the checksum file") // ErrNotInitialized is the error used when the ghasum checksum file could not // be opened. ErrSumfileOpen = errors.New("could not open the checksum file") // ErrNotInitialized is the error used when a ghasum checksum file could not // be decoded. ErrSumfileDecode = errors.New("could not decode the checksum file") // ErrNotInitialized is the error used when the ghasum checksum file could not // be read. ErrSumfileRead = errors.New("could not read from the checksum file") // ErrNotInitialized is the error used when the ghasum checksum file could not // be removed. ErrSumfileRemove = errors.New("could not remove the checksum file") // ErrNotInitialized is the error used when the ghasum checksum file could not // be unlocked after usage. ErrSumfileUnlock = errors.New("could not unlock the checksum file") // ErrNotInitialized is the error used when the ghasum checksum file could not // be written to. ErrSumfileWrite = errors.New("could not write to the checksum file") )
Functions ¶
func Initialize ¶
Initialize will initialize ghasum for the repository specified in the given configuration.
Types ¶
type Config ¶
type Config struct { // Repo is a pointer to the file system hierarchy of the target repository // for the operation. Repo fs.FS // Path is the absolute or relate path to the target repository for the // operation. // // This must be provided in addition to Repo because that does not allow for // non-read file system operation. Path string // Workflow is the file path (relative to Path) of the workflow that is the // subject of the operation. If this has the zero value all workflows in the // Repo will collectively be the subject of the operation instead. Workflow string // Job is the id (also known as key) of the job that is the subject of the // operation. If this has the zero value all jobs in the Workflow will // collectively be the subject of the operation instead. (If Workflow has // the zero value this value is ignored.) Job string // Cache is the cache that should be used for the operation. Cache cache.Cache }
Config is the configuration for a ghasum operation.
type Problem ¶
type Problem string
Problem represents an issue detected when verifying ghasum checksums.
Click to show internal directories.
Click to hide internal directories.