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