Versions in this module Expand all Collapse all v1 v1.0.0 Mar 1, 2024 Changes in this version + const ELF + const MachO + const PE + const RelocationReadOnlyFull + const RelocationReadOnlyNone + const RelocationReadOnlyPartial + type ContentResolver interface + FileContentsByLocation func(Location) (io.ReadCloser, error) + type CoordinateSet struct + func NewCoordinateSet(coordinates ...Coordinates) (s CoordinateSet) + func (s *CoordinateSet) Add(coordinates ...Coordinates) + func (s CoordinateSet) Contains(l Coordinates) bool + func (s CoordinateSet) Hash() (uint64, error) + func (s CoordinateSet) Paths() []string + func (s CoordinateSet) Remove(coordinates ...Coordinates) + func (s CoordinateSet) ToSlice() []Coordinates + type Coordinates struct + FileSystemID string + RealPath string + func (c Coordinates) ID() artifact.ID + func (c Coordinates) String() string + type Digest struct + Algorithm string + Value string + type ELFSecurityFeatures struct + ClangFortifySource *bool + DynamicSharedObject bool + LlvmControlFlowIntegrity *bool + LlvmSafeStack *bool + NoExecutable bool + PositionIndependentExecutable bool + RelocationReadOnly RelocationReadOnly + StackCanary *bool + SymbolTableStripped bool + type Executable struct + Format ExecutableFormat + SecurityFeatures *ELFSecurityFeatures + type ExecutableFormat string + type License struct + LicenseEvidence *LicenseEvidence + SPDXExpression string + Type license.Type + Value string + func NewLicense(value string) License + type LicenseEvidence struct + Confidence int + Extent int + Offset int + type Location struct + func NewLocation(realPath string) Location + func NewLocationFromCoordinates(coordinates Coordinates) Location + func NewLocationFromDirectory(responsePath string, ref file.Reference) Location + func NewLocationFromImage(accessPath string, ref file.Reference, img *image.Image) Location + func NewVirtualLocation(realPath, accessPath string) Location + func NewVirtualLocationFromCoordinates(coordinates Coordinates, accessPath string) Location + func NewVirtualLocationFromDirectory(responsePath, responseAccessPath string, ref file.Reference) Location + func (l Location) Equals(other Location) bool + func (l Location) Path() string + func (l Location) String() string + func (l Location) WithAnnotation(key, value string) Location + func (l Location) WithoutAnnotations() Location + type LocationData struct + AccessPath string + func (l LocationData) Reference() file.Reference + type LocationMetadata struct + Annotations map[string]string + type LocationReadCloser struct + func NewLocationReadCloser(location Location, reader io.ReadCloser) LocationReadCloser + type LocationResolver interface + AllLocations func(ctx context.Context) <-chan Location + type LocationSet struct + func NewLocationSet(locations ...Location) (s LocationSet) + func (s *LocationSet) Add(locations ...Location) + func (s *LocationSet) CoordinateSet() CoordinateSet + func (s *LocationSet) Empty() bool + func (s LocationSet) Contains(l Location) bool + func (s LocationSet) Hash() (uint64, error) + func (s LocationSet) Remove(locations ...Location) + func (s LocationSet) ToSlice() []Location + type Locations []Location + func (l Locations) Len() int + func (l Locations) Less(i, j int) bool + func (l Locations) Swap(i, j int) + type Metadata = file.Metadata + type MetadataResolver interface + FileMetadataByLocation func(Location) (Metadata, error) + type MockResolver struct + func NewMockResolverForPaths(paths ...string) *MockResolver + func NewMockResolverForPathsWithMetadata(metadata map[Coordinates]Metadata) *MockResolver + func (r MockResolver) AllLocations(ctx context.Context) <-chan Location + func (r MockResolver) FileContentsByLocation(location Location) (io.ReadCloser, error) + func (r MockResolver) FileMetadataByLocation(l Location) (Metadata, error) + func (r MockResolver) FilesByBasename(filenames ...string) ([]Location, error) + func (r MockResolver) FilesByBasenameGlob(_ ...string) ([]Location, error) + func (r MockResolver) FilesByExtension(extensions ...string) ([]Location, error) + func (r MockResolver) FilesByGlob(patterns ...string) ([]Location, error) + func (r MockResolver) FilesByMIMEType(types ...string) ([]Location, error) + func (r MockResolver) FilesByPath(paths ...string) ([]Location, error) + func (r MockResolver) HasPath(path string) bool + func (r MockResolver) RelativeFileByPath(_ Location, path string) *Location + func (r MockResolver) String() string + func (r MockResolver) Write(_ Location, _ io.Reader) error + type PathResolver interface + FilesByGlob func(patterns ...string) ([]Location, error) + FilesByMIMEType func(types ...string) ([]Location, error) + FilesByPath func(paths ...string) ([]Location, error) + HasPath func(string) bool + RelativeFileByPath func(_ Location, path string) *Location + type RelocationReadOnly string + type Resolver interface + type SearchResult struct + Classification string + Length int64 + LineNumber int64 + LineOffset int64 + SeekPosition int64 + Value string + func (s SearchResult) String() string + type Selection string + const AllFilesSelection + const FilesOwnedByPackageSelection + const NoFilesSelection + type WritableResolver interface + Write func(location Location, reader io.Reader) error