Documentation
¶
Index ¶
- func FormatAlerts(result []*ent.Alert) models.AddAlertsRequest
- func FormatDecisions(decisions []*ent.Decision) []*models.Decision
- func FormatOneAlert(alert *ent.Alert) *models.Alert
- func PrometheusBouncersHasEmptyDecision(c *gin.Context)
- func PrometheusBouncersHasNonEmptyDecision(c *gin.Context)
- func PrometheusBouncersMiddleware() gin.HandlerFunc
- func PrometheusMachinesMiddleware() gin.HandlerFunc
- func PrometheusMiddleware() gin.HandlerFunc
- type Controller
- func (c *Controller) AbortRemoteIf(option bool) gin.HandlerFunc
- func (c *Controller) CheckInAllowlist(gctx *gin.Context)
- func (c *Controller) CheckInAllowlistBulk(gctx *gin.Context)
- func (c *Controller) CreateAlert(gctx *gin.Context)
- func (c *Controller) CreateMachine(gctx *gin.Context)
- func (c *Controller) DeleteAlertByID(gctx *gin.Context)
- func (c *Controller) DeleteAlerts(gctx *gin.Context)
- func (c *Controller) DeleteDecisionById(gctx *gin.Context)
- func (c *Controller) DeleteDecisions(gctx *gin.Context)
- func (c *Controller) DeleteMachine(gctx *gin.Context)
- func (c *Controller) FindAlertByID(gctx *gin.Context)
- func (c *Controller) FindAlerts(gctx *gin.Context)
- func (c *Controller) GetAllowlist(gctx *gin.Context)
- func (c *Controller) GetAllowlists(gctx *gin.Context)
- func (c *Controller) GetDecision(gctx *gin.Context)
- func (c *Controller) HandleDBErrors(gctx *gin.Context, err error)
- func (c *Controller) HeartBeat(gctx *gin.Context)
- func (c *Controller) StreamDecision(gctx *gin.Context)
- func (c *Controller) StreamDecisionChunked(gctx *gin.Context, bouncerInfo *ent.Bouncer, streamStartTime time.Time, ...) error
- func (c *Controller) StreamDecisionNonChunked(gctx *gin.Context, bouncerInfo *ent.Bouncer, streamStartTime time.Time, ...) error
- func (c *Controller) UsageMetrics(gctx *gin.Context)
- type ControllerV1Config
- type RepeatedPrefixError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAlerts ¶
func FormatAlerts(result []*ent.Alert) models.AddAlertsRequest
FormatAlerts : Format results from the database to be swagger model compliant
func FormatDecisions ¶
Format decisions for the bouncers
func PrometheusBouncersMiddleware ¶
func PrometheusBouncersMiddleware() gin.HandlerFunc
func PrometheusMachinesMiddleware ¶
func PrometheusMachinesMiddleware() gin.HandlerFunc
func PrometheusMiddleware ¶
func PrometheusMiddleware() gin.HandlerFunc
Types ¶
type Controller ¶
type Controller struct { DBClient *database.Client APIKeyHeader string Middlewares *middlewares.Middlewares Profiles []*csprofiles.Runtime AlertsAddChan chan []*models.Alert DecisionDeleteChan chan []*models.Decision PluginChannel chan models.ProfileAlert ConsoleConfig csconfig.ConsoleConfig TrustedIPs []net.IPNet AutoRegisterCfg *csconfig.LocalAPIAutoRegisterCfg }
func New ¶
func New(cfg *ControllerV1Config) (*Controller, error)
func (*Controller) AbortRemoteIf ¶ added in v1.5.0
func (c *Controller) AbortRemoteIf(option bool) gin.HandlerFunc
func (*Controller) CheckInAllowlist ¶ added in v1.6.6
func (c *Controller) CheckInAllowlist(gctx *gin.Context)
func (*Controller) CheckInAllowlistBulk ¶ added in v1.6.9
func (c *Controller) CheckInAllowlistBulk(gctx *gin.Context)
func (*Controller) CreateAlert ¶
func (c *Controller) CreateAlert(gctx *gin.Context)
CreateAlert writes the alerts received in the body to the database
func (*Controller) CreateMachine ¶
func (c *Controller) CreateMachine(gctx *gin.Context)
func (*Controller) DeleteAlertByID ¶ added in v1.4.2
func (c *Controller) DeleteAlertByID(gctx *gin.Context)
DeleteAlertByID delete the alert associated to the ID
func (*Controller) DeleteAlerts ¶
func (c *Controller) DeleteAlerts(gctx *gin.Context)
DeleteAlerts deletes alerts from the database based on the specified filter
func (*Controller) DeleteDecisionById ¶
func (c *Controller) DeleteDecisionById(gctx *gin.Context)
func (*Controller) DeleteDecisions ¶
func (c *Controller) DeleteDecisions(gctx *gin.Context)
func (*Controller) DeleteMachine ¶ added in v1.6.9
func (c *Controller) DeleteMachine(gctx *gin.Context)
func (*Controller) FindAlertByID ¶
func (c *Controller) FindAlertByID(gctx *gin.Context)
FindAlertByID returns the alert associated with the ID
func (*Controller) FindAlerts ¶
func (c *Controller) FindAlerts(gctx *gin.Context)
FindAlerts: returns alerts from the database based on the specified filter
func (*Controller) GetAllowlist ¶ added in v1.6.6
func (c *Controller) GetAllowlist(gctx *gin.Context)
func (*Controller) GetAllowlists ¶ added in v1.6.6
func (c *Controller) GetAllowlists(gctx *gin.Context)
func (*Controller) GetDecision ¶
func (c *Controller) GetDecision(gctx *gin.Context)
func (*Controller) HandleDBErrors ¶
func (c *Controller) HandleDBErrors(gctx *gin.Context, err error)
func (*Controller) HeartBeat ¶ added in v1.4.0
func (c *Controller) HeartBeat(gctx *gin.Context)
func (*Controller) StreamDecision ¶
func (c *Controller) StreamDecision(gctx *gin.Context)
func (*Controller) StreamDecisionChunked ¶ added in v1.5.0
func (*Controller) StreamDecisionNonChunked ¶ added in v1.5.0
func (*Controller) UsageMetrics ¶ added in v1.6.3
func (c *Controller) UsageMetrics(gctx *gin.Context)
UsageMetrics receives metrics from log processors and remediation components
type ControllerV1Config ¶ added in v1.4.0
type ControllerV1Config struct { DbClient *database.Client ProfilesCfg []*csconfig.ProfileCfg AlertsAddChan chan []*models.Alert DecisionDeleteChan chan []*models.Decision PluginChannel chan models.ProfileAlert ConsoleConfig csconfig.ConsoleConfig TrustedIPs []net.IPNet AutoRegisterCfg *csconfig.LocalAPIAutoRegisterCfg }
type RepeatedPrefixError ¶ added in v1.6.3
RepeatedPrefixError wraps an error and removes the repeating prefix from its message
func (RepeatedPrefixError) Error ¶ added in v1.6.3
func (e RepeatedPrefixError) Error() string
func (RepeatedPrefixError) Unwrap ¶ added in v1.6.3
func (e RepeatedPrefixError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.