payload

package module
v0.86.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package payload defines the JSON payload we send to the events platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalFields

type AdditionalFields = map[string]any

AdditionalFields contains additional configured fields

type DPI added in v0.86.0

type DPI struct {
	ApplicationID          uint64 `json:"application_id,omitempty"`
	ApplicationName        string `json:"application_name,omitempty"`
	ApplicationDescription string `json:"application_description,omitempty"`
	Category               string `json:"category,omitempty"`
	SubCategory            string `json:"sub_category,omitempty"`
	ApplicationGroup       string `json:"application_group,omitempty"`
	P2PTechnology          string `json:"p2p_technology,omitempty"`
	TunnelTechnology       string `json:"tunnel_technology,omitempty"`
	EncryptedTechnology    string `json:"encrypted_technology,omitempty"`
	TrafficClass           string `json:"traffic_class,omitempty"`
	BusinessRelevance      string `json:"business_relevance,omitempty"`
	ApplicationSet         string `json:"application_set,omitempty"`
	ApplicationFamily      string `json:"application_family,omitempty"`
}

DPI contains deep packet inspection application enrichment

type Device

type Device struct {
	Namespace string `json:"namespace"`
}

Device contains device details (device sending NetFlow flows)

type Endpoint

type Endpoint struct {
	IP                 string `json:"ip"`
	Port               string `json:"port"` // Port number can be zero/positive or `*` (ephemeral port)
	Mac                string `json:"mac"`
	Mask               string `json:"mask"`
	ReverseDNSHostname string `json:"reverse_dns_hostname,omitempty"`
}

Endpoint contains source or destination endpoint details

type Exporter

type Exporter struct {
	IP string `json:"ip"`
}

Exporter contains NetFlow exporter details

type FlowPayload

type FlowPayload struct {
	FlushTimestamp   int64            `json:"flush_timestamp"`
	FlowType         string           `json:"type"`
	SamplingRate     uint64           `json:"sampling_rate"`
	Direction        string           `json:"direction"`
	Start            uint64           `json:"start"` // in seconds
	End              uint64           `json:"end"`   // in seconds
	Bytes            uint64           `json:"bytes"`
	Packets          uint64           `json:"packets"`
	EtherType        string           `json:"ether_type,omitempty"`
	IPProtocol       string           `json:"ip_protocol"`
	TOS              uint32           `json:"tos"`
	DSCP             uint32           `json:"dscp"`
	DSCPName         string           `json:"dscp_name"`
	Device           Device           `json:"device"`
	Exporter         Exporter         `json:"exporter"`
	Source           Endpoint         `json:"source"`
	Destination      Endpoint         `json:"destination"`
	Ingress          ObservationPoint `json:"ingress"`
	Egress           ObservationPoint `json:"egress"`
	Host             string           `json:"host"`
	TCPFlags         []string         `json:"tcp_flags,omitempty"`
	NextHop          NextHop          `json:"next_hop,omitempty"`
	DPI              DPI              `json:"dpi"`
	AdditionalFields AdditionalFields `json:"additional_fields,omitempty"`
}

FlowPayload contains network devices flows

func (FlowPayload) MarshalJSON

func (p FlowPayload) MarshalJSON() ([]byte, error)

MarshalJSON Custom marshaller that moves AdditionalFields to the root of the payload

type Interface

type Interface struct {
	Index uint32 `json:"index"`
}

Interface contains interface details

type NextHop

type NextHop struct {
	IP string `json:"ip"`
}

NextHop contains next hop details

type ObservationPoint

type ObservationPoint struct {
	Interface Interface `json:"interface"`
}

ObservationPoint contains ingress or egress observation point

Jump to

Keyboard shortcuts

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