sapient

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StandardVersion        = "BSI_Flex_335_v2.0"
	RegistrationICDVersion = "BSI Flex 335 v2.0"
)
View Source
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

type TaxonomyValidationOptions struct {
	EnforceProbabilitySum   bool
	RequireLowestKnownLevel bool
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL