Documentation ¶
Index ¶
- func AddLiteralBlockScalarToTags(yamlStr string) string
- func AddQuotesToDescription(yamlData string) string
- func CheckoutBranch(path, branchName string) error
- func CheckoutTag(path, tagName string) error
- func CloneRepo(url, path string) error
- func CompareSemVersions(op string, v1 *semver.Version, v2 *semver.Version) (bool, error)
- func CopyFile(src string, dst string) error
- func CreateSymlink(srcFile string, linkName string) error
- func CreateTempDirectory() (string, error)
- func DownloadBinaryFileToPath(urlStr string, filePath string) (string, error)
- func DownloadBinaryFileToPathWithBearerToken(urlStr string, token string, filePath string) (string, error)
- func DownloadBinaryFilesConcurrently(items []DownloadItem, maxWorkers int)
- func DownloadFile(urlStr string) (string, error)
- func DownloadJSONFilesConcurrently(items []DownloadItem, maxWorkers int)
- func EndsWithMetaMainYAML(filename string) bool
- func ExpandUser(path string) string
- func ExtractFilesFromTarGz(filepath string, filenamesToExtract []string) (map[string][]byte, error)
- func ExtractJSONFilesFromTarGz(tarGzPath string, jsonFileNames []string) (map[string][]byte, error)
- func ExtractRoleTarGz(tarGzPath, dest string) error
- func ExtractTarGz(tarGzPath, dest string) error
- func FileExists(filePath string) bool
- func FilterAndSortSemver(versions []string) ([]string, error)
- func FindMatchingFiles(directory string, pattern string) ([]string, error)
- func FixGalaxyIndentation(yamlData string) (string, error)
- func FixPlatformVersion(yamlStr string) string
- func FixRoleMetaMainYaml(yamlStr string) string
- func GetAbsPath(path string) (string, error)
- func GetCommitDate(repoPath string, commitHash string) (string, error)
- func GetGoroutineID() uint64
- func GetHighestSemver(versions []string) (string, error)
- func GetLatestCommitHash(repoPath string) (string, error)
- func IsDir(path string) bool
- func IsDirEmpty(dirPath string) (bool, error)
- func IsFile(path string) bool
- func IsLink(path string) bool
- func IsURL(str string) bool
- func IsURLGood(url string) bool
- func IsValidGitRepo(repoPath string) (bool, error)
- func ListFilenamesInTarGz(filepath string) ([]string, error)
- func ListTags(path string) ([]string, error)
- func ListTarGzFiles(dir string) ([]string, error)
- func MakeDirs(path string) error
- func ParseISODate(dateStr string) (string, error)
- func PrettyPrint(v interface{}) (string, error)
- func RemoveComments(yamlStr string) string
- func RemoveDependenciesLiteralIfNoDeps(yamlStr string) string
- func RemoveFirstPathElement(path string) string
- func ReplaceDependencyRoleWithName(yamlStr string) string
- func SplitSpec(input string) []string
- type DownloadItem
- type FileInfo
- type FileStore
- type GoroutineIDHook
- type InstallSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddQuotesToDescription ¶
Some descriptions might contain brackets which blows up the yaml parser if not properly quoted. For example:
[DRAFT] DISA STIG for Red Hat Virtualization Host (RHVH)
func CheckoutBranch ¶
func CheckoutTag ¶
func CompareSemVersions ¶
func CreateSymlink ¶
func CreateTempDirectory ¶
func DownloadBinaryFilesConcurrently ¶
func DownloadBinaryFilesConcurrently(items []DownloadItem, maxWorkers int)
func DownloadFile ¶
func DownloadJSONFilesConcurrently ¶
func DownloadJSONFilesConcurrently(items []DownloadItem, maxWorkers int)
func EndsWithMetaMainYAML ¶
func ExpandUser ¶
func ExtractFilesFromTarGz ¶
func ExtractRoleTarGz ¶
ExtractTarGz extracts a tar.gz file to the specified destination
func ExtractTarGz ¶
func FileExists ¶
func FilterAndSortSemver ¶
func FixGalaxyIndentation ¶
Some meta/main.yml files have improperly independented "dependencies" keys.
func FixPlatformVersion ¶
func GetAbsPath ¶
func GetGoroutineID ¶
func GetGoroutineID() uint64
GetGoroutineID gets the ID of the current goroutine.
func GetHighestSemver ¶
func GetLatestCommitHash ¶
func IsDirEmpty ¶
func IsValidGitRepo ¶
func ListFilenamesInTarGz ¶
func ListTarGzFiles ¶
func ParseISODate ¶
Helper function to parse and format date strings to ISO format
func PrettyPrint ¶
func RemoveComments ¶
func RemoveFirstPathElement ¶
Types ¶
type DownloadItem ¶
type FileStore ¶
type FileStore struct {
Files []FileInfo
}
cache known files on disk
func (*FileStore) FindByGlob ¶
FindByGlob finds and returns all FileInfo objects with paths matching the given glob pattern
type GoroutineIDHook ¶
type GoroutineIDHook struct{}
GoroutineIDHook is a logrus hook that adds the goroutine ID to log entries.
func (*GoroutineIDHook) Levels ¶
func (hook *GoroutineIDHook) Levels() []logrus.Level
type InstallSpec ¶
type InstallSpec struct { Namespace string Name string Version string Dependencies []InstallSpec }
func (InstallSpec) Equals ¶
func (spec InstallSpec) Equals(other InstallSpec) bool
Click to show internal directories.
Click to hide internal directories.