loader

package
v0.0.0-...-961fe65 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 13 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