Documentation ¶
Index ¶
- Variables
- func NewWorkflowRuntime(g *graph.Graph, tr *traversal.GremlinTraversalParser, server *api.Server) (*js.Runtime, error)
- func RegisterConfigAPI(r *shttp.Server, authBackend shttp.AuthenticationBackend)
- func RegisterPcapAPI(r *shttp.Server, store storage.Storage, ...)
- func RegisterWorkflowCallAPI(s *shttp.Server, authBackend shttp.AuthenticationBackend, ...) error
- type AlertAPIHandler
- type AlertResourceHandler
- type CaptureAPIHandler
- type CaptureResourceHandler
- type EdgeAPIHandler
- func (h *EdgeAPIHandler) Create(resource rest.Resource, createOpts *rest.CreateOptions) error
- func (h *EdgeAPIHandler) Decorate(resource rest.Resource)
- func (h *EdgeAPIHandler) Delete(id string) error
- func (h *EdgeAPIHandler) Get(id string) (rest.Resource, bool)
- func (h *EdgeAPIHandler) Index() map[string]rest.Resource
- func (h *EdgeAPIHandler) Name() string
- func (h *EdgeAPIHandler) New() rest.Resource
- func (h *EdgeAPIHandler) Update(id string, resource rest.Resource) (rest.Resource, bool, error)
- type EdgeResourceHandler
- type EdgeRuleAPI
- type EdgeRuleResourceHandler
- type NodeAPIHandler
- func (h *NodeAPIHandler) Create(resource rest.Resource, createOpts *rest.CreateOptions) error
- func (h *NodeAPIHandler) Decorate(resource rest.Resource)
- func (h *NodeAPIHandler) Delete(id string) error
- func (h *NodeAPIHandler) Get(id string) (rest.Resource, bool)
- func (h *NodeAPIHandler) Index() map[string]rest.Resource
- func (h *NodeAPIHandler) Name() string
- func (h *NodeAPIHandler) New() rest.Resource
- func (h *NodeAPIHandler) Update(id string, resource rest.Resource) (rest.Resource, bool, error)
- type NodeResourceHandler
- type NodeRuleAPI
- type NodeRuleResourceHandler
- type PacketInjectorAPI
- type PcapAPI
- type WorkflowAPIHandler
- type WorkflowCallAPIHandler
- type WorkflowResourceHandler
Constants ¶
This section is empty.
Variables ¶
var TopologyMarshallers = api.TopologyMarshallers{
"text/vnd.graphviz": dotMarshaller,
"application/vnd.tcpdump.pcap": pcapMarshaller,
}
TopologyMarshallers hold the dot and pcap marshallers
Functions ¶
func NewWorkflowRuntime ¶ added in v0.23.0
func NewWorkflowRuntime(g *graph.Graph, tr *traversal.GremlinTraversalParser, server *api.Server) (*js.Runtime, error)
NewWorkflowRuntime returns a new Workflow runtime
func RegisterConfigAPI ¶
func RegisterConfigAPI(r *shttp.Server, authBackend shttp.AuthenticationBackend)
RegisterConfigAPI registers a configuration endpoint (read only) in API server
func RegisterPcapAPI ¶
func RegisterPcapAPI(r *shttp.Server, store storage.Storage, authBackend shttp.AuthenticationBackend)
RegisterPcapAPI registers a new pcap injector API
func RegisterWorkflowCallAPI ¶ added in v0.23.0
func RegisterWorkflowCallAPI(s *shttp.Server, authBackend shttp.AuthenticationBackend, apiServer *api.Server, g *graph.Graph, tr *traversal.GremlinTraversalParser) error
RegisterWorkflowCallAPI registers a new workflow call api handler
Types ¶
type AlertAPIHandler ¶
type AlertAPIHandler struct {
rest.BasicAPIHandler
}
AlertAPIHandler aims to exposes the Alert API.
func RegisterAlertAPI ¶
func RegisterAlertAPI(apiServer *api.Server, authBackend shttp.AuthenticationBackend) (*AlertAPIHandler, error)
RegisterAlertAPI registers an Alert's API to a designated API Server
type AlertResourceHandler ¶
type AlertResourceHandler struct {
rest.ResourceHandler
}
AlertResourceHandler aims to creates and manage a new Alert.
func (*AlertResourceHandler) Name ¶
func (a *AlertResourceHandler) Name() string
Name returns resource name "alert"
func (*AlertResourceHandler) New ¶
func (a *AlertResourceHandler) New() rest.Resource
New creates a new alert
type CaptureAPIHandler ¶
type CaptureAPIHandler struct { rest.BasicAPIHandler Graph *graph.Graph }
CaptureAPIHandler based on BasicAPIHandler
func RegisterCaptureAPI ¶
func RegisterCaptureAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) (*CaptureAPIHandler, error)
RegisterCaptureAPI registers an new resource, capture
func (*CaptureAPIHandler) Create ¶
func (c *CaptureAPIHandler) Create(r rest.Resource, opts *rest.CreateOptions) error
Create tests that resource GremlinQuery does not exists already
func (*CaptureAPIHandler) Decorate ¶
func (c *CaptureAPIHandler) Decorate(resource rest.Resource)
Decorate populates the capture resource
type CaptureResourceHandler ¶
type CaptureResourceHandler struct {
rest.ResourceHandler
}
CaptureResourceHandler describes a capture ressouce handler
func (*CaptureResourceHandler) Name ¶
func (c *CaptureResourceHandler) Name() string
Name returns "capture"
func (*CaptureResourceHandler) New ¶
func (c *CaptureResourceHandler) New() rest.Resource
New creates a new capture resource
type EdgeAPIHandler ¶ added in v0.27.0
type EdgeAPIHandler struct {
// contains filtered or unexported fields
}
EdgeAPIHandler aims to exposes the Alert API.
func RegisterEdgeAPI ¶ added in v0.27.0
func RegisterEdgeAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) (*EdgeAPIHandler, error)
RegisterEdgeAPI registers the edge API
func (*EdgeAPIHandler) Create ¶ added in v0.27.0
func (h *EdgeAPIHandler) Create(resource rest.Resource, createOpts *rest.CreateOptions) error
Create adds the specified edge to the graph
func (*EdgeAPIHandler) Decorate ¶ added in v0.27.0
func (h *EdgeAPIHandler) Decorate(resource rest.Resource)
Decorate the specified edge
func (*EdgeAPIHandler) Delete ¶ added in v0.27.0
func (h *EdgeAPIHandler) Delete(id string) error
Delete the edge with the specified id from the graph
func (*EdgeAPIHandler) Get ¶ added in v0.27.0
func (h *EdgeAPIHandler) Get(id string) (rest.Resource, bool)
Get returns a edge with the specified id
func (*EdgeAPIHandler) Index ¶ added in v0.27.0
func (h *EdgeAPIHandler) Index() map[string]rest.Resource
Index returns the list of existing edges
func (*EdgeAPIHandler) Name ¶ added in v0.27.0
func (h *EdgeAPIHandler) Name() string
Name returns resource name "edge"
func (*EdgeAPIHandler) New ¶ added in v0.27.0
func (h *EdgeAPIHandler) New() rest.Resource
New creates a new edge
type EdgeResourceHandler ¶ added in v0.27.0
type EdgeResourceHandler struct {
rest.ResourceHandler
}
EdgeResourceHandler aims to creates and manage a new Alert.
type EdgeRuleAPI ¶ added in v0.19.1
type EdgeRuleAPI struct { rest.BasicAPIHandler Graph *graph.Graph }
EdgeRuleAPI based on BasicAPIHandler
func RegisterEdgeRuleAPI ¶ added in v0.19.1
func RegisterEdgeRuleAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) (*EdgeRuleAPI, error)
RegisterEdgeRuleAPI registers an EdgeRule's API to a designated API Server
type EdgeRuleResourceHandler ¶ added in v0.19.1
type EdgeRuleResourceHandler struct {
rest.ResourceHandler
}
EdgeRuleResourceHandler describes a edge rule resource handler
func (*EdgeRuleResourceHandler) Name ¶ added in v0.19.1
func (erh *EdgeRuleResourceHandler) Name() string
Name returns resource name "edgerule"
func (*EdgeRuleResourceHandler) New ¶ added in v0.19.1
func (erh *EdgeRuleResourceHandler) New() rest.Resource
New creates a new EdgeRule
type NodeAPIHandler ¶ added in v0.27.0
type NodeAPIHandler struct {
// contains filtered or unexported fields
}
NodeAPIHandler aims to exposes the Alert API.
func RegisterNodeAPI ¶ added in v0.27.0
func RegisterNodeAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) (*NodeAPIHandler, error)
RegisterNodeAPI registers the node API
func (*NodeAPIHandler) Create ¶ added in v0.27.0
func (h *NodeAPIHandler) Create(resource rest.Resource, createOpts *rest.CreateOptions) error
Create adds the specified node to the graph
func (*NodeAPIHandler) Decorate ¶ added in v0.27.0
func (h *NodeAPIHandler) Decorate(resource rest.Resource)
Decorate the specified node
func (*NodeAPIHandler) Delete ¶ added in v0.27.0
func (h *NodeAPIHandler) Delete(id string) error
Delete the node with the specified id from the graph
func (*NodeAPIHandler) Get ¶ added in v0.27.0
func (h *NodeAPIHandler) Get(id string) (rest.Resource, bool)
Get returns a node with the specified id
func (*NodeAPIHandler) Index ¶ added in v0.27.0
func (h *NodeAPIHandler) Index() map[string]rest.Resource
Index returns the list of existing nodes
func (*NodeAPIHandler) Name ¶ added in v0.27.0
func (h *NodeAPIHandler) Name() string
Name returns resource name "node"
func (*NodeAPIHandler) New ¶ added in v0.27.0
func (h *NodeAPIHandler) New() rest.Resource
New creates a new node
type NodeResourceHandler ¶ added in v0.27.0
type NodeResourceHandler struct {
rest.ResourceHandler
}
NodeResourceHandler aims to creates and manage a new Alert.
type NodeRuleAPI ¶ added in v0.19.1
type NodeRuleAPI struct { rest.BasicAPIHandler Graph *graph.Graph }
NodeRuleAPI based on BasicAPIHandler
func RegisterNodeRuleAPI ¶ added in v0.19.1
func RegisterNodeRuleAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) (*NodeRuleAPI, error)
RegisterNodeRuleAPI register a new node rule api handler
type NodeRuleResourceHandler ¶ added in v0.19.1
type NodeRuleResourceHandler struct {
rest.ResourceHandler
}
NodeRuleResourceHandler describes a node resource handler
func (*NodeRuleResourceHandler) Name ¶ added in v0.19.1
func (nrh *NodeRuleResourceHandler) Name() string
Name returns resource name "noderule"
func (*NodeRuleResourceHandler) New ¶ added in v0.19.1
func (nrh *NodeRuleResourceHandler) New() rest.Resource
New creates a new node rule
type PacketInjectorAPI ¶
type PacketInjectorAPI struct { rest.BasicAPIHandler Graph *graph.Graph }
PacketInjectorAPI exposes the packet injector API
func RegisterPacketInjectorAPI ¶
func RegisterPacketInjectorAPI(g *graph.Graph, apiServer *api.Server, authBackend shttp.AuthenticationBackend) (*PacketInjectorAPI, error)
RegisterPacketInjectorAPI registers a new packet injector resource in the API
func (*PacketInjectorAPI) Create ¶
func (pi *PacketInjectorAPI) Create(r rest.Resource, opts *rest.CreateOptions) error
Create allocates a new packet injection
type PcapAPI ¶
type PcapAPI struct {
// contains filtered or unexported fields
}
PcapAPI exposes the pcap injector API
type WorkflowAPIHandler ¶ added in v0.19.0
type WorkflowAPIHandler struct {
rest.BasicAPIHandler
}
WorkflowAPIHandler based on BasicAPIHandler
func RegisterWorkflowAPI ¶ added in v0.19.0
func RegisterWorkflowAPI(apiServer *api.Server, authBackend shttp.AuthenticationBackend) (*WorkflowAPIHandler, error)
RegisterWorkflowAPI registers a new workflow api handler
func (*WorkflowAPIHandler) Create ¶ added in v0.19.0
func (w *WorkflowAPIHandler) Create(r rest.Resource, opts *rest.CreateOptions) error
Create tests whether the resource is a duplicate or is unique
type WorkflowCallAPIHandler ¶ added in v0.23.0
type WorkflowCallAPIHandler struct {
// contains filtered or unexported fields
}
WorkflowCallAPIHandler based on BasicAPIHandler
type WorkflowResourceHandler ¶ added in v0.19.0
type WorkflowResourceHandler struct { }
WorkflowResourceHandler describes a workflow resource handler
func (*WorkflowResourceHandler) Name ¶ added in v0.19.0
func (w *WorkflowResourceHandler) Name() string
Name return "workflow"
func (*WorkflowResourceHandler) New ¶ added in v0.19.0
func (w *WorkflowResourceHandler) New() rest.Resource
New creates a new workflow resource