Documentation
¶
Overview ¶
Package proto provides protobuf related utilities for the SCALIBR binary.
Index ¶
- Variables
- func InventoryToProto(inv *inventory.Inventory) (*spb.Inventory, error)
- func InventoryToStruct(invProto *spb.Inventory) *inventory.Inventory
- func PluginStatusToProto(s *plugin.Status) *spb.PluginStatus
- func ScanResultToProto(r *scalibr.ScanResult) (*spb.ScanResult, error)
- func ValidExtension(path string) error
- func Write(filePath string, outputProto proto.Message) error
- func WriteWithFormat(filePath string, outputProto proto.Message, format string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAdvisoryIDMissing = errors.New("advisory ID missing in finding")
ErrAdvisoryIDMissing will be returned if the Advisory ID is not set on a finding.
View Source
var ErrAdvisoryMissing = errors.New("advisory missing in finding")
ErrAdvisoryMissing will be returned if the Advisory is not set on a finding.
Functions ¶
func InventoryToProto ¶ added in v0.3.0
InventoryToProto converts a Inventory go struct into the equivalent proto.
func InventoryToStruct ¶ added in v0.3.0
InventoryToStruct converts a ScanResult proto into the equivalent go struct.
func PluginStatusToProto ¶ added in v0.3.0
func PluginStatusToProto(s *plugin.Status) *spb.PluginStatus
PluginStatusToProto converts a plugin.Status go struct into the equivalent proto.
func ScanResultToProto ¶
func ScanResultToProto(r *scalibr.ScanResult) (*spb.ScanResult, error)
ScanResultToProto converts a ScanResult go struct into the equivalent proto.
func ValidExtension ¶
ValidExtension returns an error if the file extension is not a proto file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.