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. easyjson:json
type BasicResource ¶ added in v0.19.0
type BasicResource struct {
UUID string `yaml:"UUID"`
}
BasicResource is a resource with a unique identifier easyjson:json
func (*BasicResource) GetName ¶ added in v0.24.0
func (b *BasicResource) GetName() string
GetName returns the resource name
func (*BasicResource) ID ¶ added in v0.19.0
func (b *BasicResource) ID() string
ID returns the resource ID
func (*BasicResource) SetID ¶ added in v0.19.0
func (b *BasicResource) SetID(i string)
SetID sets the resource 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" valid:"isValidCaptureType" yaml:"Type"` Count int `json:"Count" yaml:"Count"` Port int `json:"Port,omitempty" yaml:"Port"` SamplingRate uint32 `json:"SamplingRate" yaml:"SamplingRate"` PollingInterval uint32 `json:"PollingInterval" yaml:"PollingInterval"` 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"` Target string `json:"Target,omitempty" valid:"isValidAddress" yaml:"Target"` TargetType string `json:"TargetType,omitempty" yaml:"TargetType"` }
Capture describes a capture API easyjson:json
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 easyjson:json
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 easyjson:json
type PacketInjection ¶ added in v0.17.0
type PacketInjection struct { BasicResource `yaml:",inline"` Src string `yaml:"Src"` Dst string `yaml:"Dst"` SrcIP string `valid:"isIPOrCIDR" yaml:"SrcIP"` DstIP string `valid:"isIPOrCIDR" yaml:"DstIP"` SrcMAC string `valid:"isMAC" yaml:"SrcMAC"` DstMAC string `valid:"isMAC" yaml:"DstMAC"` SrcPort uint16 `yaml:"SrcPort"` DstPort uint16 `yaml:"DstPort"` Type string `yaml:"Type"` Payload string `yaml:"Payload"` ICMPID uint16 `yaml:"ICMPID"` Count uint64 `yaml:"Count"` Interval uint64 `yaml:"Interval"` Increment bool `yaml:"Increment"` IncrementPayload int64 `yaml:"IncrementPayload"` StartTime time.Time Pcap []byte `yaml:"Pcap"` TTL uint8 `yaml:"TTL"` }
PacketInjection packet injector API parameters easyjson:json
func (*PacketInjection) GetName ¶ added in v0.24.0
func (pi *PacketInjection) GetName() string
GetName returns the resource name
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 easyjson:json
type Workflow ¶ added in v0.19.0
type Workflow struct { BasicResource `yaml:",inline"` Name string `yaml:"Name" valid:"nonzero"` Title string `yaml:"Title"` Abstract string `yaml:"Abstract"` Description string `yaml:"Description"` Parameters []WorkflowParam `yaml:"Parameters"` Source string `valid:"isValidWorkflow" yaml:"Source"` }
Workflow describes a workflow easyjson:json
type WorkflowCall ¶ added in v0.23.0
type WorkflowCall struct {
Params []interface{}
}
WorkflowCall describes workflow call
type WorkflowChoice ¶ added in v0.19.0
WorkflowChoice describes one value within a choice easyjson:json
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 easyjson:json