Documentation
¶
Index ¶
- Constants
- func IdentifyAllWithJSON(paths []string) (string, error)
- func IdentifyAllWithJSONOptions(paths []string, opts IdentifyOptions) (string, error)
- func IdentifyDirWithJSON(path string, opts IdentifyDirOptions) (string, error)
- func IdentifyWithJSON(path string) (string, error)
- func Version() string
- type IdentifyDirOptions
- type IdentifyOptions
- type Result
- type Scanner
- func (s *Scanner) Identify(path string) (*Result, error)
- func (s *Scanner) IdentifyAll(paths []string) ([]*Result, error)
- func (s *Scanner) IdentifyAllWithJSON(paths []string) (string, error)
- func (s *Scanner) IdentifyAllWithJSONOptions(paths []string, opts IdentifyOptions) (string, error)
- func (s *Scanner) IdentifyAllWithOptions(paths []string, opts IdentifyOptions) ([]*Result, error)
- func (s *Scanner) IdentifyDirWithJSON(path string, opts IdentifyDirOptions) (string, error)
- func (s *Scanner) IdentifyWithJSON(path string) (string, error)
- func (s *Scanner) Profile() string
- func (s *Scanner) Signature() string
- type ScannerOptions
Constants ¶
View Source
const ( ProfileDefault = "default" ProfileArchivematica = "archivematica" )
Variables ¶
This section is empty.
Functions ¶
func IdentifyAllWithJSON ¶ added in v0.9.0
func IdentifyAllWithJSONOptions ¶ added in v0.15.0
func IdentifyAllWithJSONOptions(paths []string, opts IdentifyOptions) (string, error)
func IdentifyDirWithJSON ¶ added in v0.15.0
func IdentifyDirWithJSON(path string, opts IdentifyDirOptions) (string, error)
func IdentifyWithJSON ¶ added in v0.9.0
Types ¶
type IdentifyDirOptions ¶ added in v0.15.0
type IdentifyOptions ¶ added in v0.15.0
type IdentifyOptions struct {
Workers int
}
type Result ¶
func IdentifyAll ¶
func IdentifyAllWithOptions ¶ added in v0.15.0
func IdentifyAllWithOptions(paths []string, opts IdentifyOptions) ([]*Result, error)
type Scanner ¶ added in v0.17.0
type Scanner struct {
// contains filtered or unexported fields
}
Scanner identifies files using one immutable Siegfried signature database.
A Scanner may be reused by multiple goroutines. Its Siegfried engine is fully loaded before NewScanner returns and is never mutated afterward.
func NewScanner ¶ added in v0.17.0
func NewScanner(opts ScannerOptions) (*Scanner, error)
NewScanner constructs a Scanner and eagerly loads its signature database.
func (*Scanner) IdentifyAll ¶ added in v0.17.0
func (*Scanner) IdentifyAllWithJSON ¶ added in v0.17.0
func (*Scanner) IdentifyAllWithJSONOptions ¶ added in v0.17.0
func (s *Scanner) IdentifyAllWithJSONOptions(paths []string, opts IdentifyOptions) (string, error)
func (*Scanner) IdentifyAllWithOptions ¶ added in v0.17.0
func (s *Scanner) IdentifyAllWithOptions(paths []string, opts IdentifyOptions) ([]*Result, error)
func (*Scanner) IdentifyDirWithJSON ¶ added in v0.17.0
func (s *Scanner) IdentifyDirWithJSON(path string, opts IdentifyDirOptions) (string, error)
func (*Scanner) IdentifyWithJSON ¶ added in v0.17.0
type ScannerOptions ¶ added in v0.17.0
ScannerOptions selects the signature database used by a Scanner.
Profile and Signature are mutually exclusive. An empty Profile selects the default profile. Signature names a complete external Siegfried database.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
signatures
Package signatures provides signature databases bundled with pygfried.
|
Package signatures provides signature databases bundled with pygfried. |
|
signatures/cmd/update
command
Command update refreshes pygfried's bundled Archivematica signature database from the exact Siegfried module version selected in go.mod.
|
Command update refreshes pygfried's bundled Archivematica signature database from the exact Siegfried module version selected in go.mod. |
Click to show internal directories.
Click to hide internal directories.
