mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
27 lines
432 B
Go
27 lines
432 B
Go
package syftjson
|
|
|
|
import "github.com/anchore/syft/syft/format"
|
|
|
|
func Format(appConfig interface{}) format.Format {
|
|
return format.NewFormat(
|
|
format.JSONOption,
|
|
Encoder(appConfig),
|
|
Decoder(),
|
|
Validator(),
|
|
)
|
|
}
|
|
|
|
func Encoder(appConfig interface{}) format.Encoder {
|
|
return &encoder{
|
|
appConfig: appConfig,
|
|
}
|
|
}
|
|
|
|
func Decoder() format.Decoder {
|
|
return &decoder{}
|
|
}
|
|
|
|
func Validator() format.Validator {
|
|
return &validator{}
|
|
}
|