alert

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_NOTIFY_FINDING_NUM = 3
)
View Source
const (
	MAX_NOTIFY_FINDING_TAG_NUM = 15
)
View Source
const (
	MAX_NOTIFY_RULE_NUM = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertService

type AlertService struct {
	// contains filtered or unexported fields
}

func NewAlertService

func NewAlertService(maxAnalyzeAPICall int64, baseURL string, findingClient finding.FindingServiceClient, projectClient project.ProjectServiceClient, repository db.AlertRepository) *AlertService

func (*AlertService) AnalyzeAlert

func (a *AlertService) AnalyzeAlert(ctx context.Context, req *alert.AnalyzeAlertRequest) (*empty.Empty, error)

func (*AlertService) AnalyzeAlertAll

func (a *AlertService) AnalyzeAlertAll(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

func (*AlertService) AnalyzeAlertByCondition

func (a *AlertService) AnalyzeAlertByCondition(ctx context.Context, alertCondition *model.AlertCondition, project *projectproto.Project) error

func (*AlertService) DeleteAlert

func (a *AlertService) DeleteAlert(ctx context.Context, req *alert.DeleteAlertRequest) (*empty.Empty, error)

func (*AlertService) DeleteAlertByAnalyze

func (a *AlertService) DeleteAlertByAnalyze(ctx context.Context, alertCondition *model.AlertCondition) error

func (*AlertService) DeleteAlertCondNotification

func (a *AlertService) DeleteAlertCondNotification(ctx context.Context, req *alert.DeleteAlertCondNotificationRequest) (*empty.Empty, error)

func (*AlertService) DeleteAlertCondRule

func (a *AlertService) DeleteAlertCondRule(ctx context.Context, req *alert.DeleteAlertCondRuleRequest) (*empty.Empty, error)

func (*AlertService) DeleteAlertCondition

func (a *AlertService) DeleteAlertCondition(ctx context.Context, req *alert.DeleteAlertConditionRequest) (*empty.Empty, error)

func (*AlertService) DeleteAlertHistory

func (a *AlertService) DeleteAlertHistory(ctx context.Context, req *alert.DeleteAlertHistoryRequest) (*empty.Empty, error)

func (*AlertService) DeleteAlertRule

func (a *AlertService) DeleteAlertRule(ctx context.Context, req *alert.DeleteAlertRuleRequest) (*empty.Empty, error)

func (*AlertService) DeleteNotification

func (a *AlertService) DeleteNotification(ctx context.Context, req *alert.DeleteNotificationRequest) (*empty.Empty, error)

func (*AlertService) DeleteRelAlertFinding

func (a *AlertService) DeleteRelAlertFinding(ctx context.Context, req *alert.DeleteRelAlertFindingRequest) (*empty.Empty, error)

func (*AlertService) GetAlert

func (*AlertService) GetAlertCondRule

func (*AlertService) GetAlertCondition

func (*AlertService) GetAlertHistory

func (*AlertService) GetAlertRule

func (*AlertService) GetNotification

func (*AlertService) GetRelAlertFinding

func (*AlertService) ListAlert

func (*AlertService) ListAlertCondRule

func (*AlertService) ListAlertCondition

func (*AlertService) ListAlertHistory

func (*AlertService) ListAlertRule

func (*AlertService) ListNotification

func (*AlertService) ListRelAlertFinding

func (*AlertService) NotificationAlert

func (a *AlertService) NotificationAlert(
	ctx context.Context,
	alertCondition *model.AlertCondition,
	alert *model.Alert,
	rules *[]model.AlertRule,
	project *projectproto.Project,
	findingIDs *[]uint64,
) error

func (*AlertService) PutAlert

func (*AlertService) PutAlertCondRule

func (*AlertService) PutAlertCondition

func (*AlertService) PutAlertHistory

func (*AlertService) PutAlertRule

func (*AlertService) PutNotification

func (*AlertService) PutRelAlertFinding

func (*AlertService) RegistAlertByAnalyze

func (a *AlertService) RegistAlertByAnalyze(ctx context.Context, alertCondition *model.AlertCondition, findingIDs []uint64) (*model.Alert, error)

func (*AlertService) TestNotification

func (a *AlertService) TestNotification(ctx context.Context, req *alert.TestNotificationRequest) (*empty.Empty, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL