Documentation
¶
Index ¶
- func DeleteAgent(c *gin.Context)
- func GetPipeline(c *gin.Context)
- func ListRuleTables(c *gin.Context)
- func LoginUser(c *gin.Context)
- func RegisterUser(c *gin.Context)
- func SearchRules(c *gin.Context)
- func Tables(db *surrealdb.DB) (tables []string)
- func UpdateAgent(c *gin.Context)
- func UpdatePipeline(c *gin.Context)
- func UpdateRules(c *gin.Context)
- func UpdateUser(c *gin.Context)
- type AgentConfigUpdate
- type AgentDel
- type Conditions
- type ErrorResponse
- type Result
- type Rule
- type RuleFile
- type SurrealRule
- type UpdateRule
- type UpdateUserJSON
- type UserLogin
- type UserRegister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteAgent ¶
delete an agent based on name using a surrealdb token.
func GetPipeline ¶
func RegisterUser ¶
stuff for updating rules, enrichments, agents (all things management)
func UpdateAgent ¶
update an agent's config based on name and using surrealDB token.
func UpdatePipeline ¶
func UpdateRules ¶
Types ¶
type AgentConfigUpdate ¶
type Conditions ¶
type Conditions struct {
Contains []string `yaml:"contains,omitempty"` // contains can be regex or NOT
NotContains []string `yaml:"not_contains,omitempty"` // can be regex or NOT
Equals []any `yaml:"equals,omitempty"`
NotEquals []any `yaml:"not_equals,omitempty"`
LessThan []any `yaml:"less_than,omitempty"`
GreaterThan []any `yaml:"greater_than,omitempty"`
Field string `yaml:"field"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error" example:"Invalid input"`
}
--- api output default types ---
type Rule ¶
type Rule struct {
Streams []string `yaml:"streams"`
Conditions Conditions `yaml:"conditions"`
Level int `yaml:"level"`
Description string `yaml:"description"`
ID string `yaml:"id"`
Groups []string `yaml:"groups"`
}
yaml stuff
type SurrealRule ¶
type UpdateRule ¶
type UpdateRule struct {
Table string `json:"table"`
RuleData string `json:"rule_data"` // base64 data (easier to deal with)
}
update rule based on filename/table name
type UpdateUserJSON ¶
type UserRegister ¶
Click to show internal directories.
Click to hide internal directories.