Documentation
¶
Index ¶
- Constants
- func Decode(raw []byte) (*sapientv2.SapientMessage, error)
- func MessageType(msg *sapientv2.SapientMessage) string
- func Validate(msg *sapientv2.SapientMessage) error
- func ValidateDetectionReportTaxonomy(report *sapientv2.DetectionReport, reg *sapientv2.Registration, ...) error
- func ValidateRegistrationTaxonomy(reg *sapientv2.Registration) error
- type Metadata
- type TaxonomyValidationOptions
Constants ¶
const ( StandardVersion = "BSI_Flex_335_v2.0" RegistrationICDVersion = "BSI Flex 335 v2.0" )
const CoreTaxonomyNamespace = "sapient_core"
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(raw []byte) (*sapientv2.SapientMessage, error)
Decode unmarshals a BSI Flex 335 v2.0 SapientMessage.
func MessageType ¶
func MessageType(msg *sapientv2.SapientMessage) string
func Validate ¶
func Validate(msg *sapientv2.SapientMessage) error
func ValidateDetectionReportTaxonomy ¶
func ValidateDetectionReportTaxonomy(report *sapientv2.DetectionReport, reg *sapientv2.Registration, opts TaxonomyValidationOptions) error
ValidateDetectionReportTaxonomy checks DetectionReport classification and subclass fields against Table 72, Table 73, Table 96, and any taxonomy extensions declared by the supplied Registration.
func ValidateRegistrationTaxonomy ¶
func ValidateRegistrationTaxonomy(reg *sapientv2.Registration) error
ValidateRegistrationTaxonomy checks Registration taxonomy declarations from Tables 43 and 44 plus class/subclass hierarchy levels from Table 42.
Types ¶
type Metadata ¶
type Metadata struct {
MessageType string
NodeID string
DestinationID string
ReportID string
ObjectID string
TaskID string
AlertID string
Timestamp time.Time
}
func ExtractMetadata ¶
func ExtractMetadata(msg *sapientv2.SapientMessage) Metadata
type TaxonomyValidationOptions ¶
TaxonomyValidationOptions controls semantic checks that go beyond protobuf field presence. The Dstl harness covers mandatory fields here but does not enforce all Clause 7 hierarchy semantics, so callers opt into stricter checks where they have enough context to do it correctly.