jar

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileSize

func FileSize(path string) (int64, error)

func HashDir added in v0.9.4

func HashDir(path string) []byte

func HashFile added in v0.9.4

func HashFile(path string) []byte

func IsDirectory

func IsDirectory(path string) (bool, error)

Types

type FileError

type FileError struct {
	ID FileErrorID
}

func NewFileError

func NewFileError(fEID FileErrorID) (fe FileError)

func (FileError) Error

func (m FileError) Error() string

type FileErrorID

type FileErrorID int
const (
	FileErrorNone FileErrorID = iota
	FileErrorEmpty
	FileErrorNoZip
	FileErrorNoFile
	FileErrorUnknown
)

func (FileErrorID) String

func (fEID FileErrorID) String() string

type FileErrors

type FileErrors []FileError

func (FileErrors) MaxID

func (fes FileErrors) MaxID() (maxID FileErrorID)

type Jar

type Jar struct {
	// contains filtered or unexported fields
}

func NewJar

func NewJar(name string, debug bool, scanTypes *ScanTypes, myExcludes Paths) *Jar

func (Jar) CheckFile

func (j Jar) CheckFile(path string) ([]byte, error)

func (Jar) CheckFileInZip added in v0.9.3

func (j Jar) CheckFileInZip(file *zip.File) ([]byte, error)

func (*Jar) CheckPath added in v0.9.3

func (j *Jar) CheckPath()

func (*Jar) CheckZip added in v0.9.3

func (j *Jar) CheckZip(pathToFile string, rd io.ReaderAt, size int64, depth int)

func (Jar) Excluded added in v0.9.4

func (j Jar) Excluded() bool

func (*Jar) Hash added in v0.9.4

func (j *Jar) Hash() string

func (Jar) PrintStates added in v0.9.4

func (j Jar) PrintStates(logOk bool, logJarHash bool, logLibHash bool, logVersion bool)

type Jars added in v0.9.4

type Jars map[string]*Jar

type Paths added in v0.9.3

type Paths struct {
	// contains filtered or unexported fields
}

func NewPaths added in v0.9.4

func NewPaths(paths []string) (p Paths, err error)

func (*Paths) Contains added in v0.9.3

func (ps *Paths) Contains(p string) bool

func (*Paths) Matches added in v0.9.3

func (ps *Paths) Matches(p string) bool

type ScanType added in v0.9.4

type ScanType struct {
	// contains filtered or unexported fields
}

func (*ScanType) AddHash added in v0.9.4

func (st *ScanType) AddHash(hash string)

func (*ScanType) AddVersion added in v0.9.4

func (st *ScanType) AddVersion(version version.Version)

func (ScanType) Clone added in v0.9.4

func (st ScanType) Clone() ScanType

func (ScanType) LowestVersion added in v0.9.4

func (st ScanType) LowestVersion() *version.Version

type ScanTypes added in v0.9.4

type ScanTypes struct {
	// contains filtered or unexported fields
}

func NewScanTypes added in v0.9.4

func NewScanTypes() *ScanTypes

func (*ScanTypes) Add added in v0.9.4

func (sts *ScanTypes) Add(name string, classes []string, poms []string, versionHashes map[string]string) error

func (ScanTypes) Clone added in v0.9.4

func (sts ScanTypes) Clone() *ScanTypes

func (ScanTypes) Len added in v0.9.4

func (sts ScanTypes) Len() int

func (ScanTypes) Matches added in v0.9.4

func (sts ScanTypes) Matches(path string) bool

Jump to

Keyboard shortcuts

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