Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { BasicResource `yaml:",inline"` Name string `json:",omitempty" yaml:"Name"` Description string `json:",omitempty" yaml:"Description"` Expression string `json:",omitempty" valid:"nonzero" yaml:"Expression"` Action string `json:",omitempty" valid:"regexp=^(|http://|https://|file://).*$" yaml:"Action"` Trigger string `json:",omitempty" valid:"regexp=^(graph|duration:.+|)$" yaml:"Trigger"` CreateTime time.Time }
Alert is a set of parameters, the Alert Action will Trigger according to its Expression.
type BasicResource ¶ added in v0.19.0
type BasicResource struct {
UUID string `yaml:"UUID"`
}
BasicResource is a resource with a unique identifier
func (*BasicResource) ID ¶ added in v0.19.0
func (b *BasicResource) ID() string
ID returns the alert ID
type Capture ¶
type Capture struct { BasicResource `yaml:",inline"` GremlinQuery string `json:"GremlinQuery,omitempty" valid:"isGremlinExpr" yaml:"GremlinQuery"` BPFFilter string `json:"BPFFilter,omitempty" valid:"isBPFFilter" yaml:"BPFFilter"` Name string `json:"Name,omitempty" yaml:"Name"` Description string `json:"Description,omitempty" yaml:"Description"` Type string `json:"Type,omitempty" yaml:"Type"` Count int `json:"Count" yaml:"Count"` PCAPSocket string `json:"PCAPSocket,omitempty" yaml:"PCAPSocket"` Port int `json:"Port,omitempty" yaml:"Port"` RawPacketLimit int `json:"RawPacketLimit,omitempty" valid:"isValidRawPacketLimit" yaml:"RawPacketLimit"` HeaderSize int `json:"HeaderSize,omitempty" valid:"isValidCaptureHeaderSize" yaml:"HeaderSize"` ExtraTCPMetric bool `json:"ExtraTCPMetric" yaml:"ExtraTCPMetric"` IPDefrag bool `json:"IPDefrag" yaml:"IPDefrag"` ReassembleTCP bool `json:"ReassembleTCP" yaml:"ReassembleTCP"` LayerKeyMode string `json:"LayerKeyMode,omitempty" valid:"isValidLayerKeyMode" yaml:"LayerKeyMode"` ExtraLayers flow.ExtraLayers `json:"ExtraLayers,omitempty" yaml:"ExtraLayers"` }
Capture describes a capture API
func NewCapture ¶
NewCapture creates a new capture
type EdgeRule ¶ added in v0.19.1
type EdgeRule struct { BasicResource `yaml:",inline"` Name string `yaml:"Name"` Description string `yaml:"Description"` Src string `valid:"isGremlinExpr" yaml:"Src"` Dst string `valid:"isGremlinExpr" yaml:"Dst"` Metadata graph.Metadata `yaml:"Metadata"` }
EdgeRule describes a edge rule
type NodeRule ¶ added in v0.19.1
type NodeRule struct { BasicResource `yaml:",inline"` Name string `yaml:"Name"` Description string `yaml:"Description"` Metadata graph.Metadata `yaml:"Metadata"` Action string `valid:"regexp=^(create|update)$" yaml:"Action"` Query string `valid:"isGremlinOrEmpty" yaml:"Query"` }
NodeRule describes a node rule
type PacketInjection ¶ added in v0.17.0
type PacketInjection struct { BasicResource `yaml:",inline"` Src string `yaml:"Src"` Dst string `yaml:"Dst"` SrcIP string `yaml:"SrcIP"` DstIP string `yaml:"DstIP"` SrcMAC string `yaml:"SrcMAC"` DstMAC string `yaml:"DstMAC"` SrcPort int64 `yaml:"SrcPort"` DstPort int64 `yaml:"DstPort"` Type string `yaml:"Type"` Payload string `yaml:"Payload"` TrackingID string ICMPID int64 `yaml:"ICMPID"` Count int64 `yaml:"Count"` Interval int64 `yaml:"Interval"` Increment bool `yaml:"Increment"` IncrementPayload int64 `yaml:"IncrementPayload"` StartTime time.Time Pcap []byte `yaml:"Pcap"` }
PacketInjection packet injector API parameters
func (*PacketInjection) Validate ¶ added in v0.17.0
func (pi *PacketInjection) Validate() error
Validate verifies the packet injection type is supported
type TopologyParam ¶
type TopologyParam struct {
GremlinQuery string `json:"GremlinQuery,omitempty" valid:"isGremlinExpr" yaml:"GremlinQuery"`
}
TopologyParam topology API parameter
type Workflow ¶ added in v0.19.0
type Workflow struct { BasicResource `yaml:",inline"` Name string `yaml:"Name" valid:"nonzero"` Description string `yaml:"Description"` Parameters []WorkflowParam `yaml:"Parameters"` Source string `valid:"isValidWorkflow" yaml:"Source"` }
Workflow describes a workflow
type WorkflowChoice ¶ added in v0.19.0
WorkflowChoice describes one value within a choice
type WorkflowParam ¶ added in v0.19.0
type WorkflowParam struct { Name string `yaml:"Name"` Description string `yaml:"Description"` Type string `yaml:"Type"` Default interface{} `yaml:"Default"` Values []WorkflowChoice `yaml:"Values"` }
WorkflowParam describes a workflow parameter
Click to show internal directories.
Click to hide internal directories.