Documentation
¶
Index ¶
- Constants
- Variables
- func Cache2Disk(command, cacheScope, src string, compress, md5Check bool, ...) error
- func ExecuteCommand(command string) error
- func GenerateMd5(path string) (map[string]string, error)
- func MD5All(root string) (map[string]string, error)
- func Unzip(src string, dest string) ([]string, error)
- func Zip(source, target string) error
- type SDError
- type SDStore
Constants ¶
const CompressFormatTarZst = ".tar.zst"
const CompressFormatZip = ".zip"
const Md5helperModule = "md5helper"
const ZiphelperModule = "ziphelper"
Variables ¶
var ExecCommand = exec.Command
ExecCommand : os exec command
Functions ¶
func Cache2Disk ¶ added in v0.0.39
func Cache2Disk(command, cacheScope, src string, compress, md5Check bool, cacheMaxSizeInMB int64) error
cache directories and files to/from shared storage param - command set, get or remove param - cacheScope pipeline, event, job param - src source directory param - compress compress and store cache param - md5Check compare md5 and store cache param - cacheMaxSizeInMB max cache size limit allowed in MB return - nil / error success - return nil; error - return error description
func ExecuteCommand ¶ added in v0.0.57
ExecuteCommand : Execute shell commands return output => executing shell command succeeds return error => for any error
func GenerateMd5 ¶ added in v0.0.48
GenerateMd5 reads files for given path, generates Md5 and returns ms5map or error param - path file or folder path return - md5map / error success - return md5map; error - return error description
func MD5All ¶ added in v0.0.7
MD5All reads all the files in the file tree rooted at root and returns a map from file path to the MD5 sum of the file's contents. If the directory walk fails or any read operation fails, MD5All returns an error. In that case, MD5All does not wait for inflight read operations to complete.
func Unzip ¶ added in v0.0.6
Unzip is repurposed from https://github.com/mholt/archiver/pull/92/files To include support for symbolic links
func Zip ¶ added in v0.0.18
Zip is repurposed from https://github.com/mholt/archiver/pull/92/files To include support for symbolic links
Types ¶
type SDError ¶
type SDError struct {
StatusCode int `json:"statusCode"`
Reason string `json:"error"`
Message string `json:"message"`
}
SDError is an error response from the Screwdriver API