Documentation ¶
Overview ¶
Package types defines the API resource types
swagger:meta
Index ¶
- Constants
- type Alert
- type BasicResource
- func (b *BasicResource) GetName() string
- func (b *BasicResource) ID() string
- func (v BasicResource) MarshalEasyJSON(w *jwriter.Writer)
- func (v BasicResource) MarshalJSON() ([]byte, error)
- func (b *BasicResource) SetID(i string)
- func (v *BasicResource) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *BasicResource) UnmarshalJSON(data []byte) error
- type Capture
- type EdgeRule
- type NodeRule
- type PacketInjection
- func (pi *PacketInjection) GetName() string
- func (v PacketInjection) MarshalEasyJSON(w *jwriter.Writer)
- func (v PacketInjection) MarshalJSON() ([]byte, error)
- func (v *PacketInjection) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *PacketInjection) UnmarshalJSON(data []byte) error
- func (pi *PacketInjection) Validate() error
- type Resource
- type TopologyParams
- type Workflow
- type WorkflowCall
- type WorkflowChoice
- type WorkflowParam
Constants ¶
const ( // PIModeUniqPerNode use a unique packet identifier per source node PIModeUniqPerNode = "unique" // PIModeRandom use random packet identifier for each packet PIModeRandom = "random" // PITypeICMP4 icmpv4 packet PITypeICMP4 = "icmp4" // PITypeICMP6 icmpv6 packet PITypeICMP6 = "icmp6" // PITypeTCP4 ipv4 + tcp packet PITypeTCP4 = "tcp4" // PITypeTCP6 ipv6 + tcp packet PITypeTCP6 = "tcp6" // PITypeUDP4 ipv4 + udp packet PITypeUDP4 = "udp4" // PITypeUDP6 ipv6 + udp packet PITypeUDP6 = "udp6" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { // swagger:allOf BasicResource `yaml:",inline"` // Alert name Name string `json:",omitempty" yaml:"Name"` // Alert description Description string `json:",omitempty" yaml:"Description"` // Gremlin or JavaScript expression evaluated to trigger the alarm Expression string `json:",omitempty" valid:"nonzero" yaml:"Expression"` // Action to execute when the alert is triggered. // Can be either an empty string, or a URL (use 'file://' for local scripts) Action string `json:",omitempty" valid:"regexp=^(|http://|https://|file://).*$" yaml:"Action"` // Event that triggers the alert evaluation Trigger string `json:",omitempty" valid:"regexp=^(graph|duration:.+|)$" yaml:"Trigger"` CreateTime time.Time }
Alert object
Alerts provide a way to be notified when a Gremlin expression is evaluated to true.
easyjson:json swagger:model Alert
func (Alert) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Alert) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*Alert) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Alert) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type BasicResource ¶ added in v0.19.0
type BasicResource struct {
UUID string `yaml:"UUID"`
}
BasicResource is a resource with a unique identifier easyjson:json swagger:ignore
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) MarshalEasyJSON ¶ added in v0.26.0
func (v BasicResource) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (BasicResource) MarshalJSON ¶ added in v0.26.0
func (v BasicResource) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*BasicResource) SetID ¶ added in v0.19.0
func (b *BasicResource) SetID(i string)
SetID sets the resource ID
func (*BasicResource) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *BasicResource) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*BasicResource) UnmarshalJSON ¶ added in v0.26.0
func (v *BasicResource) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Capture ¶
type Capture struct { // swagger:allOf BasicResource `yaml:",inline"` // Gremlin Query // required: true GremlinQuery string `json:"GremlinQuery,omitempty" valid:"isGremlinExpr" yaml:"GremlinQuery"` // BPF filter BPFFilter string `json:"BPFFilter,omitempty" valid:"isBPFFilter" yaml:"BPFFilter"` // Capture name Name string `json:"Name,omitempty" yaml:"Name"` // Capture description Description string `json:"Description,omitempty" yaml:"Description"` // Capture type. Can be afpacket, pcap, ebpf, sflow, pcapsocket, ovsmirror, dpdk, ovssflow or ovsnetflow Type string `json:"Type,omitempty" valid:"isValidCaptureType" yaml:"Type"` // Number of active captures // swagger:ignore Count int `json:"Count" yaml:"Count"` // SFlow port Port int `json:"Port,omitempty" yaml:"Port"` // Sampling rate for SFlow flows. 0: no flow samples SamplingRate uint32 `json:"SamplingRate" yaml:"SamplingRate"` // Polling interval for SFlow counters, 0: no counter samples PollingInterval uint32 `json:"PollingInterval" yaml:"PollingInterval"` // Maximum number of raw packets captured, 0: no packet, -1: unlimited RawPacketLimit int `json:"RawPacketLimit,omitempty" valid:"isValidRawPacketLimit" yaml:"RawPacketLimit"` // Packet header size to consider HeaderSize int `json:"HeaderSize,omitempty" valid:"isValidCaptureHeaderSize" yaml:"HeaderSize"` // Add additional TCP metrics to flows ExtraTCPMetric bool `json:"ExtraTCPMetric" yaml:"ExtraTCPMetric"` // Defragment IPv4 packets IPDefrag bool `json:"IPDefrag" yaml:"IPDefrag"` // Reassemble TCP packets ReassembleTCP bool `json:"ReassembleTCP" yaml:"ReassembleTCP"` // First layer used by flow key calculation, L2 or L3 LayerKeyMode string `json:"LayerKeyMode,omitempty" valid:"isValidLayerKeyMode" yaml:"LayerKeyMode"` // List of extra layers to be added to the flow, available: DNS|DHCPv4|VRRP ExtraLayers flow.ExtraLayers `json:"ExtraLayers,omitempty" yaml:"ExtraLayers"` // sFlow/NetFlow target, if empty the agent will be used Target string `json:"Target,omitempty" valid:"isValidAddress" yaml:"Target"` // target type (netflowv5, erspanv1), ignored in case of sFlow/NetFlow capture TargetType string `json:"TargetType,omitempty" yaml:"TargetType"` }
Capture object
Captures provide a way to capture network traffic on the nodes matching a Gremlin expression.
easyjson:json swagger:model Capture
func NewCapture ¶
NewCapture creates a new capture
func (Capture) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Capture) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*Capture) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Capture) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type EdgeRule ¶ added in v0.19.1
type EdgeRule struct { // swagger:allOf BasicResource `yaml:",inline"` // Edge rule name Name string `yaml:"Name"` // Edge rule description Description string `yaml:"Description"` // Gremlin expression of the edges source nodes Src string `valid:"isGremlinExpr" yaml:"Src"` // Gremlin expression of the edges destination nodes Dst string `valid:"isGremlinExpr" yaml:"Dst"` // Metadata of the edges to create Metadata graph.Metadata `yaml:"Metadata"` }
EdgeRule object
Edge rules allow the dynamic creation of links between nodes of the graph.
easyjson:json swagger:model
func (EdgeRule) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (EdgeRule) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*EdgeRule) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EdgeRule) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type NodeRule ¶ added in v0.19.1
type NodeRule struct { // swagger:allOf BasicResource `yaml:",inline"` // Node rule name Name string `yaml:"Name"` // Node rule description Description string `yaml:"Description"` // Metadata of the nodes to create Metadata graph.Metadata `yaml:"Metadata"` // 'create' to create nodes, 'update' to updates nodes Action string `valid:"regexp=^(create|update)$" yaml:"Action"` // Gremlin expression of the nodes to update Query string `valid:"isGremlinOrEmpty" yaml:"Query"` }
NodeRule object
Node rules allow the dynamic creation of nodes in the graph.
easyjson:json swagger:model
func (NodeRule) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (NodeRule) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*NodeRule) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*NodeRule) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type PacketInjection ¶ added in v0.17.0
type PacketInjection struct { // swagger:allOf 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"` Mode string `yaml:"Mode"` IncrementPayload int64 `yaml:"IncrementPayload"` StartTime time.Time Pcap []byte `yaml:"Pcap"` TTL uint8 `yaml:"TTL"` }
PacketInjection packet injector API parameters easyjson:json swagger:model
func (*PacketInjection) GetName ¶ added in v0.24.0
func (pi *PacketInjection) GetName() string
GetName returns the resource name
func (PacketInjection) MarshalEasyJSON ¶ added in v0.26.0
func (v PacketInjection) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PacketInjection) MarshalJSON ¶ added in v0.26.0
func (v PacketInjection) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PacketInjection) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *PacketInjection) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PacketInjection) UnmarshalJSON ¶ added in v0.26.0
func (v *PacketInjection) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*PacketInjection) Validate ¶ added in v0.17.0
func (pi *PacketInjection) Validate() error
Validate verifies the packet injection type is supported
type TopologyParams ¶ added in v0.25.0
type TopologyParams struct {
GremlinQuery string `json:"GremlinQuery,omitempty" valid:"isGremlinExpr" yaml:"GremlinQuery"`
}
TopologyParams topology query parameters easyjson:json swagger:model
func (TopologyParams) MarshalEasyJSON ¶ added in v0.26.0
func (v TopologyParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (TopologyParams) MarshalJSON ¶ added in v0.26.0
func (v TopologyParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*TopologyParams) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *TopologyParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*TopologyParams) UnmarshalJSON ¶ added in v0.26.0
func (v *TopologyParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Workflow ¶ added in v0.19.0
type Workflow struct { // swagger:allOf BasicResource `yaml:",inline"` // Workflow name Name string `yaml:"Name" valid:"nonzero"` // Workflow title Title string `yaml:"Title"` // Workflow abstract Abstract string `yaml:"Abstract"` // Workflow description Description string `yaml:"Description"` // Workflow parameters Parameters []WorkflowParam `yaml:"Parameters"` Source string `valid:"isValidWorkflow" yaml:"Source"` }
Workflow object
Workflow allows to automate actions using JavaScript.
easyjson:json swagger:model
func (Workflow) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Workflow) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*Workflow) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Workflow) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type WorkflowCall ¶ added in v0.23.0
type WorkflowCall struct {
Params []interface{}
}
WorkflowCall describes workflow call swagger:model
type WorkflowChoice ¶ added in v0.19.0
WorkflowChoice describes one value within a choice easyjson:json swagger:model
func (WorkflowChoice) MarshalEasyJSON ¶ added in v0.26.0
func (v WorkflowChoice) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (WorkflowChoice) MarshalJSON ¶ added in v0.26.0
func (v WorkflowChoice) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*WorkflowChoice) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *WorkflowChoice) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*WorkflowChoice) UnmarshalJSON ¶ added in v0.26.0
func (v *WorkflowChoice) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 swagger:model
func (WorkflowParam) MarshalEasyJSON ¶ added in v0.26.0
func (v WorkflowParam) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (WorkflowParam) MarshalJSON ¶ added in v0.26.0
func (v WorkflowParam) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*WorkflowParam) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *WorkflowParam) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*WorkflowParam) UnmarshalJSON ¶ added in v0.26.0
func (v *WorkflowParam) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface