Documentation
¶
Overview ¶
Package message defines versioned, policy-neutral queue contracts.
Index ¶
Constants ¶
View Source
const ( SpecVersion = "1.0" ScanJobSchemaVersion = "1.0" ScanControlSchemaVersion = "1.0" ScanRequested = "sirius.scan.requested" ScanCancelRequested = "sirius.scan.cancel.requested" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct {
SpecVersion string `json:"spec_version"`
ID string `json:"id"`
Type string `json:"type"`
Source string `json:"source"`
SchemaVersion string `json:"schema_version"`
CorrelationID string `json:"correlation_id,omitempty"`
CausationID string `json:"causation_id,omitempty"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
CreatedAt time.Time `json:"created_at"`
ResourceScope *scope.ResourceScope `json:"resource_scope,omitempty"`
Payload json.RawMessage `json:"payload"`
}
Envelope carries a stable message identity, optional attribution, and a separately versioned payload. Scope authorization belongs to the publisher.
func (Envelope) ValidateScanControl ¶
func (e Envelope) ValidateScanControl() (ScanControl, error)
ValidateScanControl validates an exact-ID cancellation request.
func (Envelope) ValidateScanJob ¶
ValidateScanJob rejects unsupported contract versions before interpreting a payload. Additional JSON fields remain valid within v1.
type ScanControl ¶
type ScanJob ¶
type ScanJob struct {
ScanID string `json:"scan_id"`
Targets []ScanTarget `json:"targets"`
Options ScanOptions `json:"options"`
Priority int `json:"priority,omitempty"`
CallbackURL string `json:"callback_url,omitempty"`
StateMode string `json:"state_mode,omitempty"`
}
type ScanOptions ¶
type ScanOptions struct {
TemplateID string `json:"template_id"`
PortRange string `json:"port_range"`
Aggressive bool `json:"aggressive"`
ExcludePorts []string `json:"exclude_ports"`
ScanTypes []string `json:"scan_types"`
MaxRetries int `json:"max_retries"`
Parallel bool `json:"parallel"`
FingerprintProbes []string `json:"fingerprint_probes,omitempty"`
FingerprintTimeout string `json:"fingerprint_timeout,omitempty"`
DisableICMP bool `json:"disable_icmp,omitempty"`
}
type ScanTarget ¶
Click to show internal directories.
Click to hide internal directories.