Documentation
¶
Overview ¶
Package magika provides AI-based file type classification using the Google Magika Rust CLI. The Rust CLI is production-ready with the model embedded in the binary, unlike the experimental Go library which requires ONNX Runtime and separate model assets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MagikaVersion = "1.0.2"
MagikaVersion is the version of the Magika CLI (set at build time via ldflags)
Functions ¶
func GetVersionInfo ¶
func GetVersionInfo() string
GetVersionInfo returns a formatted string with Magika version info
func HasMagikaSupport ¶
func HasMagikaSupport() bool
HasMagikaSupport returns true when Magika support is compiled in
Types ¶
type Result ¶
type Result struct {
Label string
MimeType string
Group string
Description string
IsText bool
Score float64
}
Result holds the Magika classification result for a file.
func ClassifyBytes ¶
ClassifyBytes classifies file content from a byte slice. Writes data to a temp file, runs magika, then removes the temp file.
Click to show internal directories.
Click to hide internal directories.