loader

package
v0.0.0-...-a3af1b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBytesFromScanTarget

func GetBytesFromScanTarget(target ScanTarget) ([]byte, error)

GetBytesFromScanTarget : Receives a ScanTarget struct, returns a byte slice of file contents (filesystem) or patch data (git)

func ValidateContent

func ValidateContent(path string) bool

ValidateContent ensures that the contents of the text are valid binary encodings

Types

type ScanTarget

type ScanTarget struct {
	Path string
	Type string
}

ScanTarget : Struct to abstract loading of filesystem and git commit history targets

func EnumerateRepositoryFileChanges

func EnumerateRepositoryFileChanges(parent string, commitDepth int) ([]ScanTarget, error)

EnumerateRepositoryFileChanges : Enumerate the commmits in a target repository and return the assembled ScanTargets

func GetTargets

func GetTargets(parent string, commitDepth int) []ScanTarget

GetTargets returns all files that are children of the target path

func LoadGitTargets

func LoadGitTargets(commit *gitobject.Commit, parent string) ([]ScanTarget, error)

LoadGitTargets : Loads content from a provided git hash and parent directory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL