v6

package
v0.0.0-...-9e37d8c Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALARM_STAT_AGGREGATE_GROUP_ID    string = "_id"
	ALARM_STAT_AGGREGATE_GROUP_COUNT string = "count"
)

############################### Variable ###############################

View Source
const (
	AlarmSupportLanguageCn = "CN"
	AlarmSupportLangageEn  = "EN"
)
View Source
const (
	RadfnAlarmStatus     = "__alarm_status"
	RadfnAlarmHitWhite   = "__hit_wl"
	RadfnAlarmWhiteCheck = "__checked"

	RadfnEventName   = "event_name"
	RadfnAgentId     = "agent_id"
	RadfnHostname    = "hostname"
	RadfnHostInIpv4  = "in_ipv4_list"
	RadfnHostOutIpv4 = "ex_ipv4_list"
	RadfnHostInIpv6  = "in_ipv6_list"
	RadfnHostOutIpv6 = "ex_ipv6_list"
	RadfnInsertTime  = "__insert_time"
	RadfnRuleName    = "rule_name"
	RadfnLevel       = "HarmLevel"
	RadfnAlertType   = "alert_type_us"
	RadfnReasonHash  = "stack_trace_hash"
)
View Source
const (
	HeaderLang = "Accept-Language"
	LangCN     = "zh-CN"
	LangEN     = "en-US"
)
View Source
const FlushVulnPkgInfoLock = "FlushVulnPkgInfoLock"

定时清空agent软件包信息

View Source
const KubeDefFilterItemNum int = 50
View Source
const (
	MaxComponentSize = 512 * 1024 * 1024
)
View Source
const (
	RedisKoVersionKey = "mutex_ko_%s"
)

Variables

View Source
var AlarmSupportLangage = map[string]string{
	"en-US": AlarmSupportLangageEn,
	"zh-CN": AlarmSupportLanguageCn,
}
View Source
var AlarmTypeCnToEn = map[string]string{
	"暴力破解": "bruteforce",
	"提权攻击": "privilege_escalation",
	"后门驻留": "persistent",
	"变形木马": "evasion",
	"恶意破坏": "purpose",
	"静态检测": "static_scan",
	"杀伤链":  "killchain",
}

############################### Data Struct ###############################

View Source
var AlarmTypeEnToCn = map[string]string{
	"bruteforce":                 "暴力破解",
	"privilege_escalation":       "提权攻击",
	"persistent":                 "后门驻留",
	"evasion":                    "变形木马",
	"purpose":                    "恶意破坏",
	"static_scan":                "静态检测",
	"killchain":                  "杀伤链",
	"initial_access":             "试探入侵",
	"execution":                  "代码执行",
	"credential_access":          "账密盗用",
	"discovery":                  "资产探测",
	"collection":                 "信息收集",
	"lateral_movement":           "横向移动",
	"command_control":            "隐蔽隧道",
	"exfiltration":               "信息外渗",
	"custom":                     "用户自定义",
	"Code Execution":             "代码执行",
	"Abnormal File Read/Write":   "异常文件读写",
	"Abnormal Network Connect":   "异常网络",
	"Path Traversal":             "目录遍历",
	"Abnormal Behavior Sequence": "异常行为序列",
	"Abnormal Runtime Behavior":  "异常行为",
	"SQL Injection":              "SQL注入",
}
View Source
var FPType = map[string]int32{"port": 5051, "process": 5050, "user": 5052, "cron": 5053, "service": 5054, "software": 5055, "container": 5056, "integrity": 5057, "app": 5060, "kmod": 5062}
View Source
var UTC_OFFSET = "+0800"
View Source
var VirusDetectionDataTypeList = []string{"6000", "6001", "6002", "6003", "6005", "6010"}

Functions

func AddOneAlarm

func AddOneAlarm(c *gin.Context)

func AddOneNoticeConfig

func AddOneNoticeConfig(c *gin.Context)

func AddTags

func AddTags(ctx *gin.Context)

func AgentRisk

func AgentRisk(c *gin.Context)

主机风险分布

func AlertList

func AlertList(c *gin.Context)

func AlertStatistics

func AlertStatistics(c *gin.Context)

func BaselineRisk

func BaselineRisk(c *gin.Context)

基线风险统计

func ChangeOneNoticeRunConfig

func ChangeOneNoticeRunConfig(c *gin.Context)

func CheckNoticeMsgConfig

func CheckNoticeMsgConfig(msg_type string, notice_type string, config *outputer.NoticeMsgConfig, needTest bool) error

********************************* function *********************************

func ChecklistWhiten

func ChecklistWhiten(c *gin.Context)

检查项加白

func ClusterDownload

func ClusterDownload(c *gin.Context)

导出集群数据

func CombineRaspAlarmCondition

func CombineRaspAlarmCondition(cond *RaspAlarmQueryFilter, isQueryWhite bool) bson.A

func CompleteAlarmSummaryContent

func CompleteAlarmSummaryContent(raw *alarm.AlarmDbDataInfo, dst *AlarmSummaryContent) error

func CompleteAssetHostInfo

func CompleteAssetHostInfo(raw *alarm.AlarmDbDataInfo, dst *AlarmAssetHost) error

func CompleteAssetInfo

func CompleteAssetInfo(c *gin.Context, raw *alarm.AlarmDbDataInfo, dst *AlarmAssetInfo) error

func ContainerDownload

func ContainerDownload(c *gin.Context)

导出容器负载数据

func ControlAgent

func ControlAgent(c *gin.Context)

控制agent更新重启

func CreatFileScanTaskForVirus

func CreatFileScanTaskForVirus(c *gin.Context)

********************************* scan task *********************************

func CreateComponent

func CreateComponent(c *gin.Context)

func CreatePageResponse

func CreatePageResponse(c *gin.Context, code int, data interface{}, page common.PageResponse)

CreatePageResponse 创建分页返回数据

func CreatePolicy

func CreatePolicy(c *gin.Context)

func CreateRebootAgentTask

func CreateRebootAgentTask(c *gin.Context)

func CreateResponse

func CreateResponse(c *gin.Context, code int, data interface{})

CreateResponse 创建返回数据

func CreateSyncConfigTask

func CreateSyncConfigTask(c *gin.Context)

func DelClusterConfig

func DelClusterConfig(c *gin.Context)

删除集群配置

func DelOneNoticeConfig

func DelOneNoticeConfig(c *gin.Context)

func DelRaspConfig

func DelRaspConfig(c *gin.Context)

删除rasp配置

func DelUserList

func DelUserList(c *gin.Context)

DelUserList 批量删除用户

func DeletePolicy

func DeletePolicy(c *gin.Context)

func DeleteTags

func DeleteTags(ctx *gin.Context)

func DescribeAgent

func DescribeAgent(c *gin.Context)

func DescribeAlerts

func DescribeAlerts(ctx *gin.Context)

func DescribeApp

func DescribeApp(c *gin.Context)

func DescribeAppGroup

func DescribeAppGroup(c *gin.Context)

func DescribeAsset

func DescribeAsset(c *gin.Context)

func DescribeComponent

func DescribeComponent(c *gin.Context)

func DescribeComponentCriteria

func DescribeComponentCriteria(c *gin.Context)

func DescribeComponentList

func DescribeComponentList(c *gin.Context)

func DescribeComponentVersionCriteria

func DescribeComponentVersionCriteria(c *gin.Context)

func DescribeComponentVersionList

func DescribeComponentVersionList(c *gin.Context)

func DescribeContainer

func DescribeContainer(c *gin.Context)

func DescribeContainerDetail

func DescribeContainerDetail(c *gin.Context)

func DescribeContainerStateStatistics

func DescribeContainerStateStatistics(c *gin.Context)

func DescribeCron

func DescribeCron(c *gin.Context)

func DescribeHostDetail

func DescribeHostDetail(ctx *gin.Context)

func DescribeHostStatistics

func DescribeHostStatistics(c *gin.Context)

func DescribeHosts

func DescribeHosts(ctx *gin.Context)

func DescribeIDC

func DescribeIDC(ctx *gin.Context)

func DescribeIntegrity

func DescribeIntegrity(c *gin.Context)

func DescribeKernelVersion

func DescribeKernelVersion(ctx *gin.Context)

func DescribeKmod

func DescribeKmod(c *gin.Context)

func DescribeNetInterface

func DescribeNetInterface(c *gin.Context)

func DescribePlatform

func DescribePlatform(ctx *gin.Context)

func DescribePolicyList

func DescribePolicyList(c *gin.Context)

func DescribePort

func DescribePort(c *gin.Context)

func DescribeProcess

func DescribeProcess(c *gin.Context)

func DescribeRecommendComponentVersion

func DescribeRecommendComponentVersion(c *gin.Context)

func DescribeRefreshStatus

func DescribeRefreshStatus(c *gin.Context)

func DescribeService

func DescribeService(c *gin.Context)

func DescribeSoftware

func DescribeSoftware(c *gin.Context)

func DescribeStatistics

func DescribeStatistics(c *gin.Context)

func DescribeTags

func DescribeTags(ctx *gin.Context)

func DescribeTop5

func DescribeTop5(c *gin.Context)

func DescribeUser

func DescribeUser(c *gin.Context)

func DescribeVolume

func DescribeVolume(c *gin.Context)

func Detect

func Detect(c *gin.Context)

开始基线检查

func DetectProgressDetail

func DetectProgressDetail(c *gin.Context)

基线检查进度详情

func Download

func Download(ctx *gin.Context)

func DownloadVulnData

func DownloadVulnData(c *gin.Context)

导出漏洞影响资产数据

func DownloadVulnList

func DownloadVulnList(c *gin.Context)

导出漏洞数据

func EditRaspConfig

func EditRaspConfig(c *gin.Context)

编辑rasp配置

func ExportAlarmListData

func ExportAlarmListData(c *gin.Context, alarmType string, headers common.MongoDBDefs, file_name string)

func ExportAlarmListDataForHids

func ExportAlarmListDataForHids(c *gin.Context)

func ExportAlarmListDataForVirus

func ExportAlarmListDataForVirus(c *gin.Context)

********************************* alarm export *********************************

func ExportAlerts

func ExportAlerts(c *gin.Context)

func ExportData

func ExportData(c *gin.Context)

func ExportHosts

func ExportHosts(ctx *gin.Context)

func ExportKubeAlarmListData

func ExportKubeAlarmListData(c *gin.Context)

********************************* export *********************************

func ExportRaspAlarmListData

func ExportRaspAlarmListData(c *gin.Context)

func FlushPkgInfo

func FlushPkgInfo()

func GetAgentContainerInfo

func GetAgentContainerInfo(c *gin.Context, data_type string, aid string, pns string, dst *AlarmDataContainerInfo) error

func GetAgentDetail

func GetAgentDetail(c *gin.Context, aid string, dst *AlarmDetailDataBaseAgent) error

func GetAgentPkgList

func GetAgentPkgList(c *gin.Context)

func GetAlarmFilterByWhite

func GetAlarmFilterByWhite(c *gin.Context, alarmType string)

func GetAlarmFilterByWhiteForHids

func GetAlarmFilterByWhiteForHids(c *gin.Context)

func GetAlarmFilterByWhiteForKube

func GetAlarmFilterByWhiteForKube(c *gin.Context)

func GetAlarmFilterByWhiteForRasp

func GetAlarmFilterByWhiteForRasp(c *gin.Context)

func GetAlarmFilterByWhiteForVirus

func GetAlarmFilterByWhiteForVirus(c *gin.Context)

********************************* filter by white *********************************

func GetAlarmList

func GetAlarmList(c *gin.Context, alarmType string)

func GetAlarmListForHids

func GetAlarmListForHids(c *gin.Context)

############################### Function ###############################

func GetAlarmListForRasp

func GetAlarmListForRasp(c *gin.Context)

func GetAlarmListForVirus

func GetAlarmListForVirus(c *gin.Context)

********************************* alarm list *********************************

func GetAlarmStat

func GetAlarmStat(c *gin.Context, alarmType string)

func GetAlarmStatForHids

func GetAlarmStatForHids(c *gin.Context)

func GetAlarmStatForKube

func GetAlarmStatForKube(c *gin.Context)

********************************* Statistics *********************************

func GetAlarmStatForVirus

func GetAlarmStatForVirus(c *gin.Context)

********************************* Alarm stat *********************************

func GetAlarmSummaryInfo

func GetAlarmSummaryInfo(c *gin.Context, alarmType string)

func GetAlarmSummaryInfoForHids

func GetAlarmSummaryInfoForHids(c *gin.Context)

func GetAlarmSummaryInfoForKube

func GetAlarmSummaryInfoForKube(c *gin.Context)

func GetAlarmSummaryInfoForRasp

func GetAlarmSummaryInfoForRasp(c *gin.Context)

func GetAlarmSummaryInfoForVirus

func GetAlarmSummaryInfoForVirus(c *gin.Context)

********************************* Summary *********************************

func GetBaselineCheckList

func GetBaselineCheckList(c *gin.Context)

基线对应检查项列表

func GetBaselineDetailList

func GetBaselineDetailList(c *gin.Context)

基线影响主机列表

func GetBaselineDownload

func GetBaselineDownload(c *gin.Context)

导出基线数据

func GetBaselineList

func GetBaselineList(c *gin.Context)

获取基线列表

func GetBaselineStatistics

func GetBaselineStatistics(c *gin.Context)

获取基线漏洞统计信息

func GetCheckHostList

func GetCheckHostList(c *gin.Context)

检查项影响主机列表

func GetCheckResList

func GetCheckResList(c *gin.Context)

检查结果列表

func GetChecklistDetail

func GetChecklistDetail(c *gin.Context)

获取一个检查项详情

func GetClusterConfigList

func GetClusterConfigList(c *gin.Context)

func GetClusterInfo

func GetClusterInfo(c *gin.Context)

查询集群信息(包含统计信息)

func GetClusterList

func GetClusterList(c *gin.Context)

获取容器集群列表

func GetClusterNameFromId

func GetClusterNameFromId(c *gin.Context)

获取集群ID(hub调用)

func GetComponentInstances

func GetComponentInstances(c *gin.Context)

func GetContainerList

func GetContainerList(c *gin.Context)

获取容器列表

func GetErrorHostNum

func GetErrorHostNum(c *gin.Context)

获取不能下发任务的主机数量

func GetGroupList

func GetGroupList(c *gin.Context)

获取策略组列表

func GetHostVulnInfo

func GetHostVulnInfo(c *gin.Context)

获取单个主机漏洞详情

func GetNodeList

func GetNodeList(c *gin.Context)

获取集群节点列表

func GetNoticeAbstract

func GetNoticeAbstract(msgType string, config *outputer.NoticeMsgConfig) string

func GetNoticeDesc

func GetNoticeDesc(noticeType string) string

func GetNoticeList

func GetNoticeList(c *gin.Context)

func GetNoticePluginNameList

func GetNoticePluginNameList(c *gin.Context)

func GetOneNoticeConfig

func GetOneNoticeConfig(c *gin.Context)

func GetOverviewAlarmStat

func GetOverviewAlarmStat(c *gin.Context)

############################### Function ###############################

func GetPodList

func GetPodList(c *gin.Context)

获取容器组列表

func GetRaspAlarmStat

func GetRaspAlarmStat(c *gin.Context)

func GetRaspConfigList

func GetRaspConfigList(c *gin.Context)

查询rasp配置列表

func GetRaspMethodMap

func GetRaspMethodMap(c *gin.Context)

获取rasp函数列表

func GetRaspProcessDetail

func GetRaspProcessDetail(c *gin.Context)

查询单个rasp详情

func GetRaspProcessList

func GetRaspProcessList(c *gin.Context)

查看rasp进程列表

func GetRaspStatistics

func GetRaspStatistics(c *gin.Context)

获取rasp统计数据

func GetRaspVulnList

func GetRaspVulnList(c *gin.Context)

获取漏洞列表

func GetRaspVulnStatistics

func GetRaspVulnStatistics(c *gin.Context)

获取漏洞统计信息

func GetSubTaskList

func GetSubTaskList(c *gin.Context)

获取子任务列表

func GetSubTaskListForVirus

func GetSubTaskListForVirus(c *gin.Context)

func GetTaskByID

func GetTaskByID(c *gin.Context)

GetTaskByID return task task_id.

func GetTaskHostListForVirus

func GetTaskHostListForVirus(c *gin.Context)

func GetTaskList

func GetTaskList(c *gin.Context)

获取任务列表

func GetTaskListForVirus

func GetTaskListForVirus(c *gin.Context)

func GetTaskStatisticsForVirus

func GetTaskStatisticsForVirus(c *gin.Context)

func GetUserList

func GetUserList(c *gin.Context)

GetUserList 获取用户列表

admin:        管理员  0
advancedUser: 高级用户(Agent读写权限) 1/2
ordinaryUser: 普通用户(Agent只读权限)  3

func GetUserOTPStatus

func GetUserOTPStatus(c *gin.Context)

func GetVirusTaskByID

func GetVirusTaskByID(c *gin.Context)

func GetVulnInfo

func GetVulnInfo(c *gin.Context)

查看一个漏洞信息

func GetVulnList

func GetVulnList(c *gin.Context)

获取漏洞列表

func GetVulnStatistics

func GetVulnStatistics(c *gin.Context)

获取漏洞统计信息

func GetWhiteHostNum

func GetWhiteHostNum(c *gin.Context)

获取白名单弹框主机数

func GetWhiteListWithCombine

func GetWhiteListWithCombine(c *gin.Context, whitelistType string)

############################### Function ###############################

func GetWhiteListWithCombineForHids

func GetWhiteListWithCombineForHids(c *gin.Context)

func GetWhiteListWithCombineForKube

func GetWhiteListWithCombineForKube(c *gin.Context)

func GetWhiteListWithCombineForRasp

func GetWhiteListWithCombineForRasp(c *gin.Context)

func GetWhiteListWithCombineForVirus

func GetWhiteListWithCombineForVirus(c *gin.Context)

********************************* whitelist *********************************

func GetWorkerList

func GetWorkerList(c *gin.Context)

获取工作负载列表

func GridFSUpload

func GridFSUpload(filePath string, fileName string) error

func GroupCheckStatus

func GroupCheckStatus(c *gin.Context)

策略组检查状态

func GroupStatistics

func GroupStatistics(c *gin.Context)

获取策略组统计信息

func IgnoreAlerts

func IgnoreAlerts(c *gin.Context)

func InitComponent

func InitComponent()

func InsertAlert

func InsertAlert(c *gin.Context)

func KubeAddOneAlarm

func KubeAddOneAlarm(c *gin.Context)

func KubeCombineAlarmFilter

func KubeCombineAlarmFilter(filter *KubeAlarmFilter, isQueryWhite bool) bson.A

filter

func KubeCreateShDownload

func KubeCreateShDownload(c *gin.Context)

func KubeInnerClusterList

func KubeInnerClusterList(c *gin.Context)

func KubeInnerTestNewCert

func KubeInnerTestNewCert(c *gin.Context)

for test

func KubeListAlarm

func KubeListAlarm(c *gin.Context)

list

func LicenseDetail

func LicenseDetail(c *gin.Context)

func LicenseOverview

func LicenseOverview(c *gin.Context)

func MetricsForAgentCpu

func MetricsForAgentCpu() func(c *gin.Context)

func MetricsForAgentDisk

func MetricsForAgentDisk() func(c *gin.Context)

func MetricsForAgentDiskUsage

func MetricsForAgentDiskUsage() func(c *gin.Context)

func MetricsForAgentMemory

func MetricsForAgentMemory() func(c *gin.Context)

func MetricsForAgentNetwork

func MetricsForAgentNetwork() func(c *gin.Context)

func ModifyOneNoticeConfig

func ModifyOneNoticeConfig(c *gin.Context)

func MonitorDescribeHosts

func MonitorDescribeHosts(c *gin.Context)

func MonitorExportHost

func MonitorExportHost(c *gin.Context)

func MonitorExportService

func MonitorExportService(c *gin.Context)

func MonitorHostAllMetrics

func MonitorHostAllMetrics(c *gin.Context)

func MonitorHostAvgMetrics

func MonitorHostAvgMetrics(c *gin.Context)

func MonitorHostStatistics

func MonitorHostStatistics(c *gin.Context)

func MonitorServiceList

func MonitorServiceList(c *gin.Context)

func MonitorServiceStatistics

func MonitorServiceStatistics(c *gin.Context)

func MonitorServiceStatus

func MonitorServiceStatus(c *gin.Context)

func MultiAddWhiteListWithCombineForHids

func MultiAddWhiteListWithCombineForHids(c *gin.Context)

func MultiAddWhiteListWithCombineForKube

func MultiAddWhiteListWithCombineForKube(c *gin.Context)

func MultiAddWhiteListWithCombineForRasp

func MultiAddWhiteListWithCombineForRasp(c *gin.Context)

func MultiAddWhiteListWithCombineForVirus

func MultiAddWhiteListWithCombineForVirus(c *gin.Context)

func MultiDelWhiteListForHids

func MultiDelWhiteListForHids(c *gin.Context)

############################### Function ###############################

func MultiDelWhiteListForKube

func MultiDelWhiteListForKube(c *gin.Context)

********************************* whitelist *********************************

func MultiDelWhiteListForRasp

func MultiDelWhiteListForRasp(c *gin.Context)

func MultiDelWhiteListForVirus

func MultiDelWhiteListForVirus(c *gin.Context)

func MultiUpdateRaspAlarmStatus

func MultiUpdateRaspAlarmStatus(c *gin.Context)

func NewClusterConfig

func NewClusterConfig(c *gin.Context)

新增集群配置

func NewRaspConfig

func NewRaspConfig(c *gin.Context)

新增rasp配置

func NodeDownload

func NodeDownload(c *gin.Context)

导出集群节点数据

func NoticePushMsgToCustomByHub

func NoticePushMsgToCustomByHub(msg *NoticeMsgData, notice_type string,
	config *outputer.NoticeMsgConfigCustom) error

func NoticePushMsgToDingdingByHub

func NoticePushMsgToDingdingByHub(msg *NoticeMsgData, notice_type string,
	config *outputer.NoticeMsgConfigDingding) error

func NoticePushMsgToEWechatByHub

func NoticePushMsgToEWechatByHub(msg *NoticeMsgData, notice_type string,
	config *outputer.NoticeMsgConfigEnterpriseWechat) error

func NoticePushMsgToEmailByHub

func NoticePushMsgToEmailByHub(msg *NoticeMsgData, notice_type string,
	config *outputer.NoticeMsgConfigEmail) error

func NoticePushMsgToFeishuByHub

func NoticePushMsgToFeishuByHub(msg *NoticeMsgData, notice_type string,
	config *outputer.NoticeMsgConfigFeishu) error

********************************* push msg function *********************************

func OneIpVulnControl

func OneIpVulnControl(c *gin.Context)

处理单个主机漏洞

func PodDownload

func PodDownload(c *gin.Context)

导出集群容器组数据

func PolicyDownload

func PolicyDownload(c *gin.Context)

func PublishComponentVersion

func PublishComponentVersion(c *gin.Context)

func QueryRequestUserName

func QueryRequestUserName(c *gin.Context) (string, error)

func RaspAddOneAlarm

func RaspAddOneAlarm(c *gin.Context)

func RaspVulnProcessList

func RaspVulnProcessList(c *gin.Context)

rasp漏洞影响进程列表

func RefreshData

func RefreshData(c *gin.Context)

func RenameClusterConfig

func RenameClusterConfig(c *gin.Context)

编辑集群配置名称

func ResetAlerts

func ResetAlerts(c *gin.Context)

func SecondaryTreatmentAlarmContent

func SecondaryTreatmentAlarmContent(content *AlarmSummaryContent)

func SendAgentDriverKoMissedMsg

func SendAgentDriverKoMissedMsg(c *gin.Context)

func SendBaselineData

func SendBaselineData(c *gin.Context)

获取基线数据信息(hub调用)

func SendWeakPassData

func SendWeakPassData(c *gin.Context)

获取弱口令数据(hub调用),datatype:5052

func SplitAlarmExtendInfoProcMatchKeyFromPidTree

func SplitAlarmExtendInfoProcMatchKeyFromPidTree(agent_id string, pid_tree string) []string

func TestNoticePushMsgToCustomByHub

func TestNoticePushMsgToCustomByHub(config *outputer.NoticeMsgConfigCustom,
	notice_type string, need_test bool) error

func TestNoticePushMsgToDingdingByHub

func TestNoticePushMsgToDingdingByHub(config *outputer.NoticeMsgConfigDingding,
	notice_type string, need_test bool) error

func TestNoticePushMsgToEWechatByHub

func TestNoticePushMsgToEWechatByHub(config *outputer.NoticeMsgConfigEnterpriseWechat,
	notice_type string, need_test bool) error

func TestNoticePushMsgToEmailByHub

func TestNoticePushMsgToEmailByHub(config *outputer.NoticeMsgConfigEmail,
	notice_type string, need_test bool) error

func TestNoticePushMsgToEs

func TestNoticePushMsgToEs(config *outputer.NoticeMsgConfigEs, need_test bool) error

func TestNoticePushMsgToFeishuByHub

func TestNoticePushMsgToFeishuByHub(config *outputer.NoticeMsgConfigFeishu,
	notice_type string, need_test bool) error

********************************* test function *********************************

func TestNoticePushMsgToKafka

func TestNoticePushMsgToKafka(config *outputer.NoticeMsgConfigKafka, need_test bool) error

func TestNoticePushMsgToSysLog

func TestNoticePushMsgToSysLog(config *outputer.NoticeMsgConfigSyslog, need_test bool) error

func TransAlarmListReqToAlarmFilter

func TransAlarmListReqToAlarmFilter(req *AlarmListRequest) *alarm.AlarmQueryFilter

func TransVirusTaskStatusToWebTaskStatus

func TransVirusTaskStatusToWebTaskStatus(status string) string

func UpdateAlarmStatusMany

func UpdateAlarmStatusMany(c *gin.Context, alarmType string)

func UpdateAlarmStatusManyForHids

func UpdateAlarmStatusManyForHids(c *gin.Context)

func UpdateAlarmStatusManyForKube

func UpdateAlarmStatusManyForKube(c *gin.Context)

********************************* status update *********************************

func UpdateAlarmStatusManyForVirus

func UpdateAlarmStatusManyForVirus(c *gin.Context)

********************************* update alarm status *********************************

func UpdateTags

func UpdateTags(ctx *gin.Context)

func Upload

func Upload(c *gin.Context)

func VulnCheckStatus

func VulnCheckStatus(c *gin.Context)

查看漏洞整体检测状态

func VulnControl

func VulnControl(c *gin.Context)

批量处理漏洞

func VulnControlNew

func VulnControlNew(c *gin.Context)

处理漏洞(新)

func VulnDetect

func VulnDetect(c *gin.Context)

开始漏洞检查

func VulnDetectProgressDetail

func VulnDetectProgressDetail(c *gin.Context)

漏洞检查进度详情

func VulnHostList

func VulnHostList(c *gin.Context)

获取漏洞影响资产列表

func VulnInit

func VulnInit()

func VulnIpControl

func VulnIpControl(c *gin.Context)

处理主机漏洞

func VulnRisk

func VulnRisk(c *gin.Context)

漏洞风险统计

func WebhookDownload

func WebhookDownload(c *gin.Context)

func WhiteListAddMultiWithCombine

func WhiteListAddMultiWithCombine(c *gin.Context, whitelistType string)

func WhiteListDelMulti

func WhiteListDelMulti(c *gin.Context, whitelistType string)

func WhiteListUpdateOne

func WhiteListUpdateOne(c *gin.Context, whitelistType string)

func WhiteListUpdateOneForHids

func WhiteListUpdateOneForHids(c *gin.Context)

func WhiteListUpdateOneForKube

func WhiteListUpdateOneForKube(c *gin.Context)

func WhiteListUpdateOneForRasp

func WhiteListUpdateOneForRasp(c *gin.Context)

func WhiteListUpdateOneForVirus

func WhiteListUpdateOneForVirus(c *gin.Context)

func WorkerDownload

func WorkerDownload(c *gin.Context)

导出集群工作负载数据

Types

type AgentBaseline

type AgentBaseline struct {
	AgentId  string                `json:"agent_id" bson:"agent_id"`
	Data     baseline.BaselineInfo `json:"data" bson:"data"`
	DataType string                `json:"data_type" bson:"data_type"`
}

type AgentContainerInfo

type AgentContainerInfo struct {
	Name  string `json:"name,omitempty" bson:"name,omitempty"`
	Image string `json:"image_name,omitempty" bson:"image_name,omitempty"`
}

type AgentHbInfo

type AgentHbInfo struct {
	HostName        string   `json:"hostname" bson:"hostname"`
	Platform        string   `json:"platform" bson:"platform"`
	PlatformFamily  string   `json:"platform_family" bson:"platform_family"`
	PlatformVersion string   `json:"platform_version" bson:"platform_version"`
	InnerIPv4       []string `json:"intranet_ipv4" bson:"intranet_ipv4"`
	OuterIPv4       []string `json:"extranet_ipv4" bson:"extranet_ipv4"`
}

type AgentStatisticsRequest

type AgentStatisticsRequest struct {
	AgentId   string `form:"agent_id"`
	ClusterId string `form:"cluster_id"`
}

type AgentStatisticsResponse

type AgentStatisticsResponse struct {
	alarm.AlarmOverviewInfo `json:",inline"`
}

type AlarmAssetHost

type AlarmAssetHost struct {
	HostName       string   `json:"hostname,omitempty"`
	InnerIPs       []string `json:"in_ip_list,omitempty"`
	OuterIPs       []string `json:"out_ip_list,omitempty"`
	AgentId        string   `json:"agent_id,omitempty"`
	Os             string   `json:"os,omitempty"`
	OsPlatform     string   `json:"os_platform,omitempty"`
	ContainerName  *string  `json:"container_name,omitempty"`
	ContainerImage *string  `json:"container_image,omitempty"`
	Tags           []string `json:"tag_list,omitempty"`
}

type AlarmAssetInfo

type AlarmAssetInfo struct {
	Host    *AlarmAssetHost             `json:"host_info,omitempty"`
	Cluster *alarm.AlarmAssetKubeCluter `json:"cluster_info,omitempty"`
}

type AlarmAttribution

type AlarmAttribution struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type AlarmDataContainerInfo

type AlarmDataContainerInfo struct {
	ContainerName  string `json:"container_name"`
	ContainerImage string `json:"container_image"`
}

type AlarmDataType101

type AlarmDataType101 struct {
	TargeId       string `json:"target_pid"`
	PtraceRequest string `json:"ptrace_request"`
	TargetArgv    string `json:"target_argv"`
}

type AlarmDataType2439

type AlarmDataType2439 struct {
	Args           []string `json:"args,omitempty"`
	Pid            string   `json:"pid,omitempty"`
	NsPid          string   `json:"nspid,omitempty"`
	ProbeHook      string   `json:"probe_hook,omitempty"`
	StackTrace     string   `json:"stack_trace,omitempty"`
	StackTraceHash string   `json:"stack_trace_hash,omitempty"`
}

type AlarmDataType3004

type AlarmDataType3004 struct {
	Path string `json:"path"`
}

type AlarmDataType356

type AlarmDataType356 struct {
	FdName string `json:"fd_name"`
	Flags  string `json:"flags"`
}

type AlarmDataType4000

type AlarmDataType4000 struct {
	Sip   string `json:"sip"`
	Sport string `json:"sport"`
	Types string `json:"types"`
	User  string `json:"user"`
}

type AlarmDataType42

type AlarmDataType42 struct {
	SshInfo string `json:"ssh_info"`
	PidTree string `json:"pid_tree"`
}

type AlarmDataType49

type AlarmDataType49 struct {
	PidTree string `json:"pid_tree"`
	Sport   string `json:"sport"`
	Sip     string `json:"sip"`
}

type AlarmDataType5003

type AlarmDataType5003 struct {
	Command string `json:"command"`
	Path    string `json:"path"`
	User    string `json:"user"`
}

type AlarmDataType59

type AlarmDataType59 struct {
	PidTree    string `json:"pid_tree"`
	SocketPid  string `json:"socket_pid"`
	SocketArgv string `json:"socket_argv"`
	SshInfo    string `json:"ssh_info"`
	Ssh        string `json:"ssh"`
	Uid        string `json:"uid"`
	LdPreload  string `json:"ld_preload"`
	RunPath    string `json:"run_path"`
	Comm       string `json:"comm"`
	Stdin      string `json:"stdin"`
	Stdout     string `json:"stdout"`
}

type AlarmDataType6001

type AlarmDataType6001 struct {
	StaticFile string `json:"static_file"`
	FileHash   string `json:"file_hash"`
	Class      string `json:"class"`
	Types      string `json:"types"`
	Name       string `json:"name"`
	CreateTime string `json:"create_at"`
	ModifyTime string `json:"modify_at"`
	TimeStamp  string `json:"timestamp"`
}

type AlarmDataType6002

type AlarmDataType6002 struct {
	Argv       string `json:"argv"`
	Pid        string `json:"pid"`
	StaticFile string `json:"static_file"`
	FileHash   string `json:"file_hash"`
	Ppid       string `json:"ppid"`
	Pgid       string `json:"pgid"`
	Uid        string `json:"uid"`
	Class      string `json:"class"`
	Types      string `json:"types"`
	Name       string `json:"name"`
	CreateTime string `json:"create_at"`
	ModifyTime string `json:"modify_at"`
	TimeStamp  string `json:"timestamp"`
}

type AlarmDataType6003

type AlarmDataType6003 struct {
	StaticFile string `json:"static_file"`
	FileHash   string `json:"file_hash"`
	Class      string `json:"class"`
	Name       string `json:"name"`
	Types      string `json:"types"`
	CreateTime string `json:"create_at"`
	ModifyTime string `json:"modify_at"`
	TimeStamp  string `json:"timestamp"`
}

type AlarmDataType601

type AlarmDataType601 struct {
	Query   string `json:"query"`
	PidTree string `json:"pid_tree"`
}

type AlarmDataType602

type AlarmDataType602 struct {
	FilePath string `json:"file_path"`
	ConnInfo string `json:"connect_info"`
	PidTree  string `json:"pid_tree"`
	SockArgv string `json:"socket_argv"`
}

type AlarmDataType603

type AlarmDataType603 struct {
	KoFile string `json:"ko_file"`
}

type AlarmDataType604

type AlarmDataType604 struct {
	OldUid      string `json:"old_uid"`
	PidTree     string `json:"pid_tree"`
	OldUserName string `json:"old_username"`
}

type AlarmDataType700

type AlarmDataType700 struct {
	ModuleName string `json:"module_name"`
}

type AlarmDataType701

type AlarmDataType701 struct {
	ModuleName    string `json:"module_name"`
	SyscallNumber string `json:"syscall_number"`
}

type AlarmDataType702

type AlarmDataType702 struct {
	ModuleName string `json:"module_name"`
}

type AlarmDataType703

type AlarmDataType703 struct {
	ModuleName      string `json:"module_name"`
	InterruptNumber string `json:"interrupt_number"`
}

type AlarmDataType82

type AlarmDataType82 struct {
	PidTree string `json:"pid_tree"`
	OldName string `json:"old_name"`
	NewName string `json:"new_name"`
}

type AlarmDataType86

type AlarmDataType86 struct {
	PidTree string `json:"pid_tree"`
	OldName string `json:"old_name"`
	NewName string `json:"new_name"`
}

type AlarmDbBaseData

type AlarmDbBaseData struct {
	AgentId         string `json:"agent_id" bson:"agent_id"`
	HostName        string `json:"hostname" bson:"hostname"`
	DataType        string `json:"data_type" bson:"data_type"`
	InIpv4List      string `json:"in_ipv4_list" bson:"in_ipv4_list"`
	ExIpv4List      string `json:"ex_ipv4_list" bson:"ex_ipv4_list"`
	Pid             string `json:"pid" bson:"pid"`
	Exec            string `json:"exe" bson:"exe"`
	Argv            string `json:"argv" bson:"argv"`
	Ppid            string `json:"ppid" bson:"ppid"`
	PpidArgv        string `json:"ppid_argv" bson:"ppid_argv"`
	Pgid            string `json:"pgid" bson:"pgid"`
	PgidArgv        string `json:"pgid_argv" bson:"pgid_argv"`
	UserName        string `json:"username" bson:"username"`
	PidTree         string `json:"pid_tree" bson:"pid_tree"`
	SocketPid       string `json:"socket_pid" bson:"socket_pid"`
	SocketArgv      string `json:"socket_argv" bson:"socket_argv"`
	SshInfo         string `json:"ssh_info" bson:"ssh_info"`
	Ssh             string `json:"ssh" bson:"ssh"`
	Uid             string `json:"uid" bson:"uid"`
	Dip             string `json:"dip" bson:"dip"`
	Dport           string `json:"dport" bson:"dport"`
	Sip             string `json:"sip" bson:"sip"`
	Sport           string `json:"sport" bson:"sport"`
	TargeId         string `json:"target_pid" bson:"target_pid"`
	PtraceRequest   string `json:"ptrace_request" bson:"ptrace_request"`
	Query           string `json:"query" bson:"query"`
	FilePath        string `json:"file_path" bson:"file_path"`
	ModInfo         string `json:"mod_info" bson:"mod_info"`
	KoFile          string `json:"ko_file" bson:"ko_file"`
	ModuleName      string `json:"module_name" bson:"module_name"`
	SyscallNumber   string `json:"syscall_number" bson:"syscall_number"`
	InterruptNumber string `json:"interrupt_number" bson:"interrupt_number"`
	Path            string `json:"path" bson:"path"`
	Types           string `json:"types" bson:"types"`
	User            string `json:"user" bson:"user"`
	OldUid          string `json:"old_uid,omitempty" bson:"old_uid,omitempty"`
	OldUserName     string `json:"old_username,omitempty" bson:"old_username,omitempty"`
	TopChain        string `json:"top_chain,omitempty" bson:"top_chain,omitempty"`
	TopRuleChain    string `json:"top_rule_chain,omitempty" bson:"top_rule_chain,omitempty"`
	TopRuleChainUs  string `json:"top_rule_chain_us,omitempty" bson:"top_rule_chain_us,omitempty"`
	AlertType       string `json:"alert_type,omitempty" bson:"alert_type,omitempty"`
	AlertTypeUs     string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"`
	Suggestion      string `json:"suggestion,omitempty" bson:"suggestion,omitempty"`
	ExtConns        string `json:"external_conns,omitempty" bson:"external_conns,omitempty"`
	InDocker        string `json:"docker,omitempty" bson:"docker,omitempty"`
	TimeStamp       string `json:"timestamp,omitempty" bson:"timestamp,omitempty"`
	ExeHash         string `json:"exe_hash,omitempty" bson:"exe_hash,omitempty"`
	CreateTime      string `json:"create_at,omitempty" bson:"create_at,omitempty"`
	ModifyTime      string `json:"modify_at,omitempty" bson:"modify_at,omitempty"`
	PidSet          string `json:"pid_set,omitempty" bson:"pid_set,omitempty"`
	ConnInfo        string `json:"connect_info,omitempty" bson:"connect_info,omitempty"`
	Md5Hash         string `json:"md5_hash,omitempty" bson:"md5_hash,omitempty"`
	FileType        string `json:"class,omitempty" bson:"class,omitempty"`
	Name            string `json:"name,omitempty" bson:"name,omitempty"`
	AttackId        string `json:"attack_id,omitempty" bson:"attack_id,omitempty"`
	KcAttackIdList  string `json:"attack_id_list,omitempty" bson:"attack_id_list,omitempty"`
	TraceId         string `json:"trace_id,omitempty" bson:"trace_id,omitempty"`
	ProcessNs       string `json:"pns,omitempty" bson:"pns,omitempty"`
	BfSrcList       string `json:"src_list,omitempty" bson:"src_list,omitempty"`
	BfDstList       string `json:"dst_list,omitempty" bson:"dst_list,omitempty"`
	EventId         string `json:"event_id,omitempty" bson:"event_id,omitempty"`
	EventName       string `json:"event_name,omitempty" bson:"event_name,omitempty"`
	ReasonSid       string `json:"reason_sid,omitempty" bson:"reason_sid,omitempty"`
	ReasonIp        string `json:"reason_ip,omitempty" bson:"reason_ip,omitempty"`
	ReasonFile      string `json:"reason_file,omitempty" bson:"reason_file,omitempty"`
	ReasonSidList   string `json:"reason_sid_list,omitempty" bson:"reason_sid_list,omitempty"`
	ReasonIpList    string `json:"reason_ip_list,omitempty" bson:"reason_ip_list,omitempty"`
	ReasonFileList  string `json:"reason_file_list,omitempty" bson:"reason_file_list,omitempty"`
	InIpv6List      string `json:"in_ipv6_list,omitempty" bson:"in_ipv6_list,omitempty"`
	ExIpv6List      string `json:"ex_ipv6_list,omitempty" bson:"ex_ipv6_list,omitempty"`
	LdPreload       string `json:"ld_preload,omitempty" bson:"ld_preload,omitempty"`
	RunPath         string `json:"run_path,omitempty" bson:"run_path"`
	Comm            string `json:"comm,omitempty" bson:"comm,omitempty"`
	Stdin           string `json:"stdin,omitempty" bson:"stdin,omitempty"`
	Stdout          string `json:"stdout,omitempty" bson:"stdout,omitempty"`
	StaticFile      string `json:"static_file,omitempty" bson:"static_file,omitempty"`
	OldName         string `json:"old_name,omitempty" bson:"old_name,omitempty"`
	NewName         string `json:"new_name,omitempty" bson:"new_name,omitempty"`
	FdName          string `json:"fd_name,omitempty" bson:"fd_name,omitempty"`
	Flags           string `json:"flags,omitempty" bson:"flags,omitempty"`
	TargetArgv      string `json:"target_argv,omitempty" bson:"target_argv,omitempty"`
	DataTypeStr     string `json:"data_type_str,omitempty" bson:"data_type_str,omitempty"`
	AlarmId         string `json:"alarm_id,omitempty" bson:"alarm_id,omitempty"`
}

type AlarmDbData

type AlarmDbData struct {
	Id                string       `json:"_id" bson:"_id"`
	Info              HubAlarmInfo `json:"SMITH_ALERT_DATA" bson:"SMITH_ALERT_DATA"`
	AlarmDbBaseData   `json:",inline" bson:",inline"`
	AlarmDbHandleData `json:",inline" bson:",inline"`
}

type AlarmDbHandleData

type AlarmDbHandleData struct {
	Status      int    `json:"__alarm_status" bson:"__alarm_status"`
	UpdateTime  int64  `json:"__update_time" bson:"__update_time"`
	InsertTime  int64  `json:"__insert_time" bson:"__insert_time"`
	HandlerUser string `json:"__handler_user" bson:"__handler_user"`
	ErrorReason string `json:"__error_reason" bson:"__error_reason"`
}

type AlarmDetailData

type AlarmDetailData struct {
	DataType      string                   `json:"data_type"`
	DataTypeStr   string                   `json:"data_type_str"`
	BaseAgent     AlarmDetailDataBaseAgent `json:"base_info"`
	BaseAlarm     AlarmDetailDataBaseAlarm `json:"base_alarm_info"`
	CommAlarm     AlarmDetailDataCommAlarm `json:"comm_alarm_info"`
	ContainerInfo AlarmDataContainerInfo   `json:"container_info"`
	PlusKC        *AlarmKillChain          `json:"plus_kill_chain,omitempty"`
	Plus42        *AlarmDataType42         `json:"plus_alarm_info_42,omitempty"`
	Plus49        *AlarmDataType49         `json:"plus_alarm_info_49,omitempty"`
	Plus59        *AlarmDataType59         `json:"plus_alarm_info_59,omitempty"`
	Plus82        *AlarmDataType82         `json:"plus_alarm_info_82,omitempty"`
	Plus86        *AlarmDataType86         `json:"plus_alarm_info_86,omitempty"`
	Plus101       *AlarmDataType101        `json:"plus_alarm_info_101,omitempty"`
	Plus356       *AlarmDataType356        `json:"plus_alarm_info_356,omitempty"`
	Plus601       *AlarmDataType601        `json:"plus_alarm_info_601,omitempty"`
	Plus602       *AlarmDataType602        `json:"plus_alarm_info_602,omitempty"`
	Plus603       *AlarmDataType603        `json:"plus_alarm_info_603,omitempty"`
	Plus604       *AlarmDataType604        `json:"plus_alarm_info_604,omitempty"`
	Plus700       *AlarmDataType700        `json:"plus_alarm_info_700,omitempty"`
	Plus701       *AlarmDataType701        `json:"plus_alarm_info_701,omitempty"`
	Plus702       *AlarmDataType702        `json:"plus_alarm_info_702,omitempty"`
	Plus703       *AlarmDataType703        `json:"plus_alarm_info_703,omitempty"`
	Plus3004      *AlarmDataType3004       `json:"plus_alarm_info_3004,omitempty"`
	Plus4000      *AlarmDataType4000       `json:"plus_alarm_info_4000,omitempty"`
	Plus6001      *AlarmDataType6001       `json:"plus_alarm_info_6001,omitempty"`
	Plus6002      *AlarmDataType6002       `json:"plus_alarm_info_6002,omitempty"`
	Plus6003      *AlarmDataType6003       `json:"plus_alarm_info_6003,omitempty"`
	Endpoint      string                   `json:"endpoint,omitempty"`
}

type AlarmDetailDataBaseAgent

type AlarmDetailDataBaseAgent struct {
	HostName   string   `json:"hostname"`
	InnerIPs   []string `json:"in_ip_list"`
	OuterIPs   []string `json:"out_ip_list"`
	AgentId    string   `json:"agent_id"`
	Os         string   `json:"os"`
	OsPlatform string   `json:"os_platform,omitempty"`
}

type AlarmDetailDataBaseAlarm

type AlarmDetailDataBaseAlarm struct {
	AlarmType    string   `json:"alarm_type"`
	AlarmLevel   string   `json:"level"`
	Status       int      `json:"status"`
	UpdateTime   int64    `json:"update_time"`
	Desc         string   `json:"desc"`
	Suggest      string   `json:"suggest"`
	Docker       string   `json:"docker"`
	CreateTime   int64    `json:"create_time"`
	HandlerUser  string   `json:"handle_user,omitempty"`
	HandlerTime  int64    `json:"handle_time,omitempty"`
	AttackIdList []string `json:"attack_id_list"`
	TraceId      string   `json:"trace_id,omitempty"`
	Name         string   `json:"name"`
}

type AlarmDetailDataCommAlarm

type AlarmDetailDataCommAlarm struct {
	Pid       string `json:"pid"`
	Exec      string `json:"exec"`
	Argv      string `json:"argv"`
	Ppid      string `json:"ppid"`
	Ppid_argv string `json:"ppid_argv"`
	Pgid      string `json:"pgid"`
	Pgid_argv string `json:"pgid_argv"`
	Username  string `json:"username"`
}

type AlarmExportDataRequest

type AlarmExportDataRequest struct {
	AlarmIdList *[]string               `json:"alarm_id_list"`
	Conditions  *alarm.AlarmQueryFilter `json:"conditions"`
}

type AlarmExtendInfo

type AlarmExtendInfo struct {
	ListenAddrInfo []AlarmExtendListenPortInfo `json:"listen_ports,omitempty" bson:"listen_ports,omitempty"`
	VulInfo        []AlarmExtendVulInfo        `json:"vul_info,omitempty" bson:"vul_info,omitempty"`
}

type AlarmExtendInfoProcMatchKey

type AlarmExtendInfoProcMatchKey struct {
	AgentId string `json:"agent_id"`
	Pid     string `json:"pid"`
}

****************************** Alarm summary data struct ******************************

type AlarmExtendListenPortInfo

type AlarmExtendListenPortInfo struct {
	AgentId    string `json:"agent_id" bson:"agent_id"`
	Pid        string `json:"pid" bson:"pid"`
	ListenAddr string `json:"listen_addr" bson:"listen_addr"`
}

type AlarmExtendVulInfo

type AlarmExtendVulInfo struct {
	AgentId string `json:"agent_id" bson:"agent_id"`
	Pid     string `json:"pid" bson:"pid"`
	CVE     string `json:"cve" bson:"cve"`
	TitleCN string `json:"title_cn" bson:"title_cn"`
}

type AlarmFilterByWhiteData

type AlarmFilterByWhiteData struct {
	Total int64 `json:"total"`
}

type AlarmHostInfo

type AlarmHostInfo struct {
	HostName    string   `json:"hostname" bson:"hostname"`
	InnerIpList []string `json:"inner_ip_list" bson:"inner_ip_list"`
	OuterIpList []string `json:"outer_ip_list" bson:"outer_ip_list"`
	AgentId     string   `json:"agent_id" bson:"agent_id"`
}

func GetAlarmHostInfoFromAlarm

func GetAlarmHostInfoFromAlarm(from alarm.AlarmDbDataInfo) *AlarmHostInfo

type AlarmKillChain

type AlarmKillChain struct {
	TopChain     string   `json:"top_chain"`
	TopRuleChain []string `json:"top_rule_chain"`
	ExtConns     string   `json:"external_conns"`
	InDocker     string   `json:"docker"`
	TimeStamp    string   `json:"timestamp"`
	PidSet       string   `json:"pid_set"`
	Ssh          string   `json:"ssh"`
}

type AlarmLangeHeader

type AlarmLangeHeader struct {
	Langage string `header:"Accept-Language"`
}

type AlarmListItem

type AlarmListItem struct {
	AlarmId     string                `json:"alarm_id"`
	Status      int                   `json:"status"`
	Type        string                `json:"type"`
	Name        string                `json:"name"`
	Level       string                `json:"level"`
	AlarmTime   int64                 `json:"alarm_time"`
	TraceId     string                `json:"trace_id"`
	EventId     string                `json:"event_id"`
	EventName   string                `json:"event_name"`
	Attribution []AlarmAttribution    `json:"attribution_list"`
	DataType    string                `json:"data_type"`
	AgentId     string                `json:"agent_id,omitempty"`
	HostName    string                `json:"alarm_hostname,omitempty"`
	Host        *AlarmHostInfo        `json:"host,omitempty"`
	Cluster     *KubeAlarmClusterInfo `json:"cluster,omitempty"`
	FilePath    string                `json:"file_path"`
	FileHash    string                `json:"file_hash"`
	ErrReason   string                `json:"error_reason,omitempty"`
}

type AlarmListRequest

type AlarmListRequest struct {
	Name          string   `json:"name,omitempty"`
	Status        []int    `json:"status,omitempty"`
	LevelList     []string `json:"level,omitempty"`
	TypeList      []string `json:"type,omitempty"`
	DataType      string   `json:"data_type,omitempty"`
	TimeStart     int64    `json:"time_start,omitempty"`
	TimeEnd       int64    `json:"time_end,omitempty"`
	AgentId       string   `json:"agent_id,omitempty"`
	EventId       string   `json:"event_id,omitempty"`
	EventName     string   `json:"event_name,omitempty"`
	EventReason   string   `json:"event_reason,omitempty"`
	Hostname      string   `json:"hostname,omitempty"`
	Ip            string   `json:"ip,omitempty"`
	ClusterId     string   `json:"cluster_id,omitempty"`
	ClusterRegion string   `json:"cluster_region,omitempty"`
	ClusterName   string   `json:"cluster_name,omitempty"`
	FilePath      string   `json:"file_path,omitempty"`
	FileHash      string   `json:"file_hash,omitempty"`
	TaskID        string   `json:"task_id,omitempty"`
}

type AlarmNewStatus

type AlarmNewStatus struct {
	AlarmId     string `json:"alarm_id"`
	AlarmStatus int    `json:"alarm_status"`
}

type AlarmNodeDbData

type AlarmNodeDbData struct {
	AgentId         string `json:"agent_id" bson:"agent_id"`
	DataType        string `json:"data_type" bson:"data_type"`
	Pid             string `json:"pid" bson:"pid"`
	Exec            string `json:"exe" bson:"exe"`
	Argv            string `json:"argv" bson:"argv"`
	Ppid            string `json:"ppid" bson:"ppid"`
	PpidArgv        string `json:"ppid_argv" bson:"ppid_argv"`
	Pgid            string `json:"pgid" bson:"pgid"`
	PgidArgv        string `json:"pgid_argv" bson:"pgid_argv"`
	UserName        string `json:"username" bson:"username"`
	PidTree         string `json:"pid_tree" bson:"pid_tree"`
	SocketPid       string `json:"socket_pid" bson:"socket_pid"`
	SocketArgv      string `json:"socket_argv" bson:"socket_argv"`
	SshInfo         string `json:"ssh_info" bson:"ssh_info"`
	Ssh             string `json:"ssh" bson:"ssh"`
	Uid             string `json:"uid" bson:"uid"`
	Dip             string `json:"dip" bson:"dip"`
	Dport           string `json:"dport" bson:"dport"`
	Sip             string `json:"sip" bson:"sip"`
	Sport           string `json:"sport" bson:"sport"`
	TargeId         string `json:"target_pid" bson:"target_pid"`
	PtraceRequest   string `json:"ptrace_request" bson:"ptrace_request"`
	Query           string `json:"query" bson:"query"`
	FilePath        string `json:"file_path" bson:"file_path"`
	ModInfo         string `json:"mod_info" bson:"mod_info"`
	ModuleName      string `json:"module_name" bson:"module_name"`
	SyscallNumber   string `json:"syscall_number" bson:"syscall_number"`
	InterruptNumber string `json:"interrupt_number" bson:"interrupt_number"`
	Path            string `json:"path" bson:"path"`
	Types           string `json:"types" bson:"types"`
	User            string `json:"user" bson:"user"`
	OldUid          string `json:"old_uid,omitempty" bson:"old_uid,omitempty"`
	OldUserName     string `json:"old_username,omitempty" bson:"old_username,omitempty"`
	InDocker        string `json:"docker,omitempty" bson:"docker,omitempty"`
	TimeStamp       string `json:"timestamp,omitempty" bson:"timestamp,omitempty"`
	ExeHash         string `json:"exe_hash,omitempty" bson:"exe_hash,omitempty"`
	CreateTime      string `json:"create_at,omitempty" bson:"create_at,omitempty"`
	ModifyTime      string `json:"modify_at,omitempty" bson:"modify_at,omitempty"`
	PidSet          string `json:"pid_set,omitempty" bson:"pid_set,omitempty"`
	ConnInfo        string `json:"connect_info,omitempty" bson:"connect_info,omitempty"`
	Md5Hash         string `json:"md5_hash,omitempty" bson:"md5_hash,omitempty"`
	FileType        string `json:"class,omitempty" bson:"class,omitempty"`
	Name            string `json:"name,omitempty" bson:"name,omitempty"`
	ProcessNs       string `json:"pns,omitempty" bson:"pns,omitempty"`
	StaticFile      string `json:"static_file,omitempty" bson:"static_file,omitempty"`
}

type AlarmNodeDetailData

type AlarmNodeDetailData struct {
	DataType      string                   `json:"data_type"`
	CommAlarm     AlarmDetailDataCommAlarm `json:"comm_alarm_info"`
	ContainerInfo AlarmDataContainerInfo   `json:"container_info"`
	Plus42        *AlarmDataType42         `json:"plus_alarm_info_42,omitempty"`
	Plus49        *AlarmDataType49         `json:"plus_alarm_info_49,omitempty"`
	Plus59        *AlarmDataType59         `json:"plus_alarm_info_59,omitempty"`
	Plus101       *AlarmDataType101        `json:"plus_alarm_info_101,omitempty"`
	Plus601       *AlarmDataType601        `json:"plus_alarm_info_601,omitempty"`
	Plus602       *AlarmDataType602        `json:"plus_alarm_info_602,omitempty"`
	Plus603       *AlarmDataType603        `json:"plus_alarm_info_603,omitempty"`
	Plus604       *AlarmDataType604        `json:"plus_alarm_info_604,omitempty"`
	Plus700       *AlarmDataType700        `json:"plus_alarm_info_700,omitempty"`
	Plus701       *AlarmDataType701        `json:"plus_alarm_info_701,omitempty"`
	Plus702       *AlarmDataType702        `json:"plus_alarm_info_702,omitempty"`
	Plus703       *AlarmDataType703        `json:"plus_alarm_info_703,omitempty"`
	Plus3004      *AlarmDataType3004       `json:"plus_alarm_info_3004,omitempty"`
	Plus4000      *AlarmDataType4000       `json:"plus_alarm_info_4000,omitempty"`
	Plus6001      *AlarmDataType6001       `json:"plus_alarm_info_6001,omitempty"`
	Plus6002      *AlarmDataType6002       `json:"plus_alarm_info_6002,omitempty"`
	Plus6003      *AlarmDataType6003       `json:"plus_alarm_info_6003,omitempty"`
}

type AlarmOneHandleFileOpt

type AlarmOneHandleFileOpt struct {
	FilePath string `json:"file_path"`
	Action   string `json:"action"`
}

type AlarmOverviewResponse

type AlarmOverviewResponse struct {
	TotalUnhandleAlarmNum int64                         `json:"total_unhandle_alarm_num,omitempty"`
	HostAlarm             alarm.AlarmOverviewStat       `json:"host_alarm,omitempty"`
	RaspAlarm             alarm.AlarmOverviewStat       `json:"rasp_alarm,omitempty"`
	KubeAlarm             alarm.AlarmOverviewStat       `json:"kube_alarm,omitempty"`
	SevenDayTrend         []alarm.AlarmOverviewDayTrend `json:"seven_day_trend,omitempty"`
}

############################### Data Struct ###############################

type AlarmPrevAndNextRequest

type AlarmPrevAndNextRequest struct {
	AlarmId    string                  `json:"alarm_id"`
	Conditions *alarm.AlarmQueryFilter `json:"conditions,omitempty"`
}

type AlarmPrevAndNextResponse

type AlarmPrevAndNextResponse struct {
	Prev *AlarmListItem `json:"prev,omitempty"`
	Next *AlarmListItem `json:"next,omitempty"`
}

type AlarmRawData

type AlarmRawData struct {
	RawData map[string]interface{} `json:"rawdata"`
}

type AlarmStatusUpdateInfo

type AlarmStatusUpdateInfo struct {
	AlarmId string `json:"alarm_id"`
	Code    int    `json:"code"`
	Msg     string `json:"msg"`
}

type AlarmStatusUpdateRequest

type AlarmStatusUpdateRequest struct {
	Lists []AlarmNewStatus `json:"alarms"`
}

type AlarmSummaryContent

type AlarmSummaryContent struct {
	AuditLogAlarm     *alarm.AlarmKubeDataInfo  `json:"audit_log_alarm,omitempty"`
	AlarmNode         *alarm.AlarmHidsDataInfo  `json:"alarm_node,omitempty"`
	KillChainNodeList []alarm.AlarmHidsDataInfo `json:"kill_chain_node_list,omitempty"`
	KillChainStepList []string                  `json:"kill_chain_step_list,omitempty"`
	ExtendInfo        *AlarmExtendInfo          `json:"extend_info,omitempty"`
}

type AlarmSummaryInfoResponse

type AlarmSummaryInfoResponse struct {
	AssetInfo AlarmAssetInfo         `json:"asset_info,omitempty"`
	AlarmDesc alarm.AlarmDescription `json:"alarm_desc,omitempty"`
	Content   AlarmSummaryContent    `json:"alarm_content,omitempty"`
	RawData   map[string]interface{} `json:"raw_data,omitempty"`
}

type BaselineCheckInfo

type BaselineCheckInfo struct {
	BaselineId    int    `json:"baseline_id" bson:"baseline_id"`
	CheckId       int    `json:"check_id" bson:"check_id"`
	BaselineCheck string `json:"baseline_check" bson:"baseline_check"`
	Type          string `json:"type" bson:"type"`
	Title         string `json:"title" bson:"title"`
	Description   string `json:"description" bson:"description"`
	Solution      string `json:"solution" bson:"solution"`
	Security      string `json:"security" bson:"security"`
	TitleCn       string `json:"title_cn" bson:"title_cn"`
	TypeCn        string `json:"type_cn" bson:"type_cn"`
	DescriptionCn string `json:"description_cn" bson:"description_cn"`
	SolutionCn    string `json:"solution_cn" bson:"solution_cn"`
	UpdateTime    int64  `json:"update_time" bson:"update_time"`
	PassRate      int    `json:"pass_rate" bson:"pass_rate"`
	Status        string `json:"status" bson:"status"`
}

基线检查项详情

type BasicFingerprintInfo

type BasicFingerprintInfo struct {
	Id         string `json:"_id" bson:"_id"`
	UpdateTime int64  `json:"update_time" bson:"update_time"`
}

type BasicHostInfo

type BasicHostInfo struct {
	AgentID      string   `json:"agent_id" bson:"agent_id"`
	IntranetIpv4 []string `json:"intranet_ipv4" bson:"intranet_ipv4"`
	IntranetIpv6 []string `json:"intranet_ipv6" bson:"intranet_ipv6"`
	ExtranetIpv4 []string `json:"extranet_ipv4" bson:"extranet_ipv4"`
	ExtranetIpv6 []string `json:"extranet_ipv6" bson:"extranet_ipv6"`
	Hostname     string   `json:"hostname" bson:"hostname"`
}

type BasicHostQuery

type BasicHostQuery struct {
	AgentID  string `json:"agent_id"`
	IP       string `json:"ip"`
	Hostname string `json:"hostname"`
}

func (*BasicHostQuery) MarshalToBson

func (q *BasicHostQuery) MarshalToBson(m bson.M)

type ClusterConfigApi

type ClusterConfigApi struct {
	ClusterId     string `json:"cluster_id" bson:"cluster_id"`
	ClusterName   string `json:"cluster_name" bson:"cluster_name"`
	ClusterRegion string `json:"cluster_region" bson:"cluster_region"`
	ClusterStatus string `json:"cluster_status" bson:"cluster_status"`
	CreateTime    int64  `json:"create_time" bson:"create_time"`
	KubeConfig    string `json:"kube_config" bson:"kube_config"`
	User          string `json:"user" bson:"user"`
	ErrReason     string `json:"err_reason" bson:"err_reason"`
	ModuleStatus  struct {
		Threat      container.ClusterModuleStatus `json:"threat" bson:"threat"`
		Application container.ClusterModuleStatus `json:"application" bson:"application"`
		Baseline    container.ClusterModuleStatus `json:"baseline" bson:"baseline"`
		Exposure    container.ClusterModuleStatus `json:"exposure" bson:"exposure"`
	} `json:"module_status" bson:"module_status"`
}

查询cluster配置列表

type Component

type Component struct {
	ID                         primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	Name                       string             `json:"name" bson:"name"`
	Type                       string             `json:"type" bson:"type"`
	ArchRequirements           []string           `json:"arch_requirements" bson:"arch_requirements"`
	PlatformFamilyRequirements []string           `json:"platform_family_requirements" bson:"platform_family_requirements"`
	Owner                      string             `json:"owner" bson:"owner"`
	CreateTime                 int                `json:"create_time" bson:"create_time"`
	LatestPublishTime          int                `json:"latest_publish_time" bson:",omitempty"`
	LatestPublishVersion       string             `json:"latest_publish_version" bson:",omitempty"`
	LatestPublisher            string             `json:"latest_publisher" bson:",omitempty"`
}

type ComponentFile

type ComponentFile struct {
	PlarformFamily string   `json:"platform_family" bson:"platform_family"`
	Arch           string   `json:"arch" bson:"arch"`
	DownloadURL    []string `json:"download_url" bson:"download_url"`
	SHA256         string   `json:"sha256" bson:"sha256"`
	Signature      string   `json:"signature" bson:"signature"`
}

type ComponentInstance

type ComponentInstance struct {
	Name        string   `json:"name" bson:"name"`
	Version     string   `json:"version" bson:"version"`
	SHA256      string   `json:"sha256" bson:"sha256"`
	DownloadURL []string `json:"download_url" bson:"download_url"`
	Signature   string   `json:"signature" bson:"signature"`
	Type        string   `json:"type" bson:"type"`
}

type ComponentVersion

type ComponentVersion struct {
	ID          primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	Version     string             `json:"version" bson:"version"`
	Files       []ComponentFile    `json:"files" bson:"files"`
	Publisher   string             `json:"publisher" bson:"publisher"`
	PublishTime int                `json:"publish_time" bson:"publish_time"`
	Component   Component          `json:"component" bson:"component"`
}

type ContextInfo

type ContextInfo struct {
	AgentID        string   `json:"agent_id" bson:"agent_id"`
	KernelVersion  string   `json:"kernel_version" bson:"kernel_version"`
	PlatformFamily string   `json:"platform_family" bson:"platform_family"`
	Arch           string   `json:"arch" bson:"arch"`
	Tags           []string `json:"tags" bson:"tags"`
}

type CreateComponentReqBody

type CreateComponentReqBody struct {
	Name                       string   `json:"name" binding:"required_unless=Type agent"`
	Type                       string   `json:"type" binding:"required,oneof=tar.gz exec agent"`
	ArchRequirements           []string `json:"arch_requirements" bson:"arch_requirements" binding:"required,max=2,unique,dive,oneof=x86_64 aarch64"`
	PlatformFamilyRequirements []string `` /* 126-byte string literal not displayed */
}

type CreateFileScanTaskRequest

type CreateFileScanTaskRequest struct {
	Action         string `json:"action" bson:"action"`
	TaskName       string `json:"task_name" bson:"task_name"`
	GeneralHostReq `json:",omitempty,inline" bson:",omitempty,inline"`
	FilePath       string `json:"file_path,omitempty" bson:"file_path,omitempty"`
	CpuIdle        string `json:"cpu_idle,omitempty" bson:"cpu_idle,omitempty"`
	Timeout        string `json:"timeout,omitempty" bson:"timeout,omitempty"`
}

type CreatePolicyReqBody

type CreatePolicyReqBody struct {
	ComponentVersionID primitive.ObjectID `json:"component_version_id" bson:"component_version_id" binding:"required"`
	Rules              []PolicyRule       `json:"rules" bson:"rules" binding:"dive"`
}

type CreateRebootAgentTaskReqBody

type CreateRebootAgentTaskReqBody struct {
	TaskName       string `json:"task_name" bson:"task_name" binding:"required"`
	GeneralHostReq `json:",omitempty,inline"`
}

type CreateSyncConfigTaskReqBody

type CreateSyncConfigTaskReqBody struct {
	TaskName       string `json:"task_name" bson:"task_name" binding:"required"`
	GeneralHostReq `json:",omitempty,inline"`
}

type CreateTask

type CreateTask struct {
	Action         string             `json:"action" bson:"action"`
	TaskName       string             `json:"task_name" bson:"task_name"`
	ModuleId       primitive.ObjectID `json:"module_id" bson:"_id"`
	GeneralHostReq `json:",omitempty,inline"`
}

type CreateTaskResponse

type CreateTaskResponse struct {
	TaskId    string `json:"task_id" bson:"task_id"`
	TaskCount int    `json:"count" bson:"count"`
}

type Criteria

type Criteria struct {
	Key   string `json:"key" bson:"key"`
	Value string `json:"value" bson:"value"`
}

type DeletePolicyReqBody

type DeletePolicyReqBody struct {
	ID primitive.ObjectID `json:"id" bson:"_id" binding:"required"`
}

type DescribeAppGroupRespItem

type DescribeAppGroupRespItem struct {
	Name  string `json:"name" bson:"name"`
	Count int    `json:"count" bson:"count"`
}

type DescribeAppReq

type DescribeAppReq struct {
	BasicHostQuery
	Type string `json:"type" bson:"type"`
	Name string `json:"name" bson:"name"`
}

func (*DescribeAppReq) MarshalToBson

func (q *DescribeAppReq) MarshalToBson(m bson.M)

type DescribeAppRespItem

type DescribeAppRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Name                 string `json:"name" bson:"name"`
	Version              string `json:"version" bson:"sversion"`
	Type                 string `json:"type" bson:"type"`
	ContainerID          string `json:"container_id" bson:"container_id"`
	ContainerName        string `json:"container_name" bson:"container_name"`
	PID                  string `json:"pid" bson:"pid"`
	Exe                  string `json:"exe" bson:"exe"`
	Conf                 string `json:"conf" bson:"conf"`
	StartTime            int64  `json:"start_time" bson:"start_time"`
}

type DescribeComponentVersionCriteriaReqQuery

type DescribeComponentVersionCriteriaReqQuery struct {
	ComponentID string `form:"component_id" bson:"component_id" binding:"required"`
}

type DescribeComponentVersionListReqBody

type DescribeComponentVersionListReqBody struct {
	ComponentID primitive.ObjectID `json:"component_id" bson:"component_id" binding:"required"`
}

type DescribeContainerDetailResp

type DescribeContainerDetailResp struct {
	Hostname   string `json:"hostname"`
	Platform   string `json:"platform"`
	IntranetIP string `json:"intranet_ip"`
	ExtranetIP string `json:"extranet_ip"`
	CreateTime int    `json:"create_time" bson:"create_time"`
	State      string `json:"state" bson:"state"`
	ID         string `json:"id" bson:"id"`
	Name       string `json:"name" bson:"name"`
	ImageID    string `json:"image_id" bson:"image_id"`
	ImageName  string `json:"image_name" bson:"image_name"`
	GroupName  string `json:"group_name" bson:"group_name"`
}

type DescribeContainerReq

type DescribeContainerReq struct {
	BasicHostQuery
	State           []string `json:"state"`
	ID              string   `json:"id"`
	Name            string   `json:"name"`
	ImageID         string   `json:"image_id"`
	ImageName       string   `json:"image_name"`
	CreateTimeStart *int     `json:"create_time_start"`
	CreateTimeEnd   *int     `json:"create_time_end"`
}

func (*DescribeContainerReq) MarshalToBson

func (q *DescribeContainerReq) MarshalToBson(m bson.M)

type DescribeContainerRespItem

type DescribeContainerRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	ContainerID          string `json:"id" bson:"id"`
	Name                 string `json:"name" bson:"name"`
	State                string `json:"state" bson:"state"`
	ImageID              string `json:"image_id" bson:"image_id"`
	ImageName            string `json:"image_name" bson:"image_name"`
	CreateTime           int    `json:"create_time" bson:"create_time"`
}

type DescribeContainerStateStatisticsResp

type DescribeContainerStateStatisticsResp struct {
	Created int `json:"created"`
	Running int `json:"running"`
	Exited  int `json:"exited"`
	Unknown int `json:"unknown"`
}

type DescribeCronReqBody

type DescribeCronReqBody struct {
	BasicHostQuery `bson:"inline"`
	Path           string `json:"path" bson:"path"`
	Username       string `json:"username" bson:"username"`
	Command        string `json:"command" bson:"command"`
	Checksum       string `json:"checksum" bson:"checksum"`
}

DescribeCron defs

func (*DescribeCronReqBody) MarshalToBson

func (q *DescribeCronReqBody) MarshalToBson(m bson.M)

type DescribeCronRespItem

type DescribeCronRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Path                 string `json:"path" bson:"path"`
	Username             string `json:"username" bson:"username"`
	Command              string `json:"command" bson:"command"`
	Checksum             string `json:"checksum" bson:"checksum"`
	Schedule             string `json:"schedule" bson:"schedule"`
}

type DescribeHostDetailResp

type DescribeHostDetailResp struct {
	AgentID            string                             `json:"agent_id"`
	BootAt             int64                              `json:"boot_at"`
	ExtranetIPv4       []string                           `json:"extranet_ipv4"`
	ExtranetIPv6       []string                           `json:"extranet_ipv6"`
	FirstHeartbeatTime int64                              `json:"first_heartbeat_time"`
	Hostname           string                             `json:"hostname"`
	Idc                string                             `json:"idc"`
	IntranetIPv4       []string                           `json:"intranet_ipv4"`
	IntranetIPv6       []string                           `json:"intranet_ipv6"`
	KernelVersion      string                             `json:"kernel_version"`
	LastHeartbeatTime  int64                              `json:"last_heartbeat_time"`
	Status             string                             `json:"status"`
	NetMode            string                             `json:"net_mode"`
	Pid                int64                              `json:"pid"`
	Platform           string                             `json:"platform"`
	Plugins            []DescribeHostDetailRespPluginItem `json:"plugins"`
	Alarm              struct {
		Critical int64 `json:"critical"`
		High     int64 `json:"high"`
		Medium   int64 `json:"medium"`
		Low      int64 `json:"low"`
	} `json:"alarm"`
	RaspAlarm struct {
		Critical int64 `json:"critical"`
		High     int64 `json:"high"`
		Medium   int64 `json:"medium"`
		Low      int64 `json:"low"`
	} `json:"rasp_alarm"`
	Virus struct {
		Critical int64 `json:"critical"`
		High     int64 `json:"high"`
		Medium   int64 `json:"medium"`
		Low      int64 `json:"low"`
	} `json:"virus"`
	Vuln struct {
		Critical int64 `json:"critical"`
		High     int64 `json:"high"`
		Medium   int64 `json:"medium"`
		Low      int64 `json:"low"`
	} `json:"vuln"`
	Baseline struct {
		High   int `json:"high"`
		Medium int `json:"medium"`
		Low    int `json:"low"`
		Pass   int `json:"pass"`
	} `json:"baseline"`
	Event struct {
		Critical int64 `json:"critical"`
		High     int64 `json:"high"`
		Medium   int64 `json:"medium"`
		Low      int64 `json:"low"`
	} `json:"event"`
	RaspEvent struct {
		Critical int64 `json:"critical"`
		High     int64 `json:"high"`
		Medium   int64 `json:"medium"`
		Low      int64 `json:"low"`
	} `json:"rasp_event"`
	StartedAt       int64    `json:"started_at"`
	Tags            []string `json:"tags"`
	Version         string   `json:"version"`
	PlatformVersion string   `json:"platform_version"`
	Load1           float64  `json:"load_1"`
	Load5           float64  `json:"load_5"`
	Load15          float64  `json:"load_15"`
	CPUUsage        float64  `json:"cpu_usage"`
	MemUsage        float64  `json:"mem_usage"`
	TotalMem        int64    `json:"total_mem"`
	Nproc           int64    `json:"nproc"`
	HostSerial      string   `json:"host_serial"`
	HostID          string   `json:"host_id"`
	HostModel       string   `json:"host_model"`
	HostVendor      string   `json:"host_vendor"`
	CPUName         string   `json:"cpu_name"`
	DNS             string   `json:"dns"`
	Gateway         string   `json:"gateway"`
	StartTime       int64    `json:"start_time"`
	BootTime        int64    `json:"boot_time"`
	StateDetail     string   `json:"state_detail"`
}

type DescribeHostDetailRespPluginItem

type DescribeHostDetailRespPluginItem struct {
	LastHeartbeatTime int64   `json:"last_heartbeat_time"`
	Name              string  `json:"name"`
	Pversion          string  `json:"pversion"`
	Status            string  `json:"status"`
	StartedAt         int64   `json:"started_at"`
	StartTime         int64   `json:"start_time"`
	CPU               float64 `json:"cpu"`
	Memory            int64   `json:"memory"`
}

type DescribeHostsRespItem

type DescribeHostsRespItem struct {
	AgentID            string   `json:"agent_id"`
	ExtranetIPv4       []string `json:"extranet_ipv4"`
	ExtranetIPv6       []string `json:"extranet_ipv6"`
	IntranetIPv4       []string `json:"intranet_ipv4"`
	IntranetIPv6       []string `json:"intranet_ipv6"`
	Hostname           string   `json:"hostname"`
	IDC                string   `json:"idc"`
	LastHeartbeatTime  int64    `json:"last_heartbeat_time"`
	FirstHeartbeatTime int64    `json:"first_heartbeat_time"`
	Platform           string   `json:"platform"`
	Tags               []string `json:"tags"`
	Risk               struct {
		Vuln      int64 `json:"vuln"`
		Alarm     int64 `json:"alarm"`
		Baseline  int64 `json:"baseline"`
		Event     int64 `json:"event"`
		RaspAlarm int64 `json:"rasp_alarm"`
		Virus     int64 `json:"virus"`
	} `json:"risk"`
	Status      string  `json:"status"`
	CPU         float64 `json:"cpu"`
	Memory      int64   `json:"memory"`
	StateDetail string  `json:"state_detail"`
}

type DescribeIntegrityReqBody

type DescribeIntegrityReqBody struct {
	BasicHostQuery
	Name            string `json:"name"`
	Version         string `json:"version"`
	OriginDigest    string `json:"origin_digest"`
	Digest          string `json:"digest"`
	Exe             string `json:"exe"`
	ModifyTimeStart *int   `json:"modify_time_start"`
	ModifyTimeEnd   *int   `json:"modify_time_end"`
}

func (*DescribeIntegrityReqBody) MarshalToBson

func (q *DescribeIntegrityReqBody) MarshalToBson(m bson.M)

type DescribeIntegrityRespItem

type DescribeIntegrityRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Name                 string `json:"name" bson:"software_name"`
	Version              string `json:"version" bson:"software_version"`
	OriginDigest         string `json:"origin_digest" bson:"origin_digest"`
	Digest               string `json:"digest" bson:"digest"`
	Exe                  string `json:"exe" bson:"exe"`
	ModifyTime           int    `json:"modify_time" bson:"modify_time"`
}

type DescribeKmodItem

type DescribeKmodItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Name                 string `json:"name" bson:"name"`
	Size                 string `json:"size" bson:"size"`
	Refcount             string `json:"refcount" bson:"refcount"`
	UsedBy               string `json:"used_by" bson:"used_by"`
	State                string `json:"state" bson:"state"`
	Addr                 string `json:"addr" bson:"addr"`
}

type DescribeKmodReq

type DescribeKmodReq struct {
	BasicHostQuery
	State []string `json:"state" binding:"omitempty,dive,oneof=Live Loading Unloading"`
	Name  string   `json:"name"`
}

func (*DescribeKmodReq) MarshalToBson

func (q *DescribeKmodReq) MarshalToBson(m bson.M)

type DescribeNetInterfaceItem

type DescribeNetInterfaceItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Name                 string `json:"name" bson:"name"`
	Index                string `json:"index" bson:"index"`
	Addrs                string `json:"addrs" bson:"addrs"`
	HardwareAddr         string `json:"hardware_addr" bson:"hardware_addr"`
	MTU                  string `json:"mtu" bson:"mtu"`
}

type DescribeNetInterfaceReq

type DescribeNetInterfaceReq struct {
	AgentID string `json:"agent_id" bson:"agent_id"`
}

type DescribePolicyListReqBody

type DescribePolicyListReqBody struct{}

type DescribePortReqBody

type DescribePortReqBody struct {
	BasicHostQuery
	Sip      string `json:"sip" bson:"sip,omitempty"`
	Sport    string `json:"sport" bson:"sport,omitempty"`
	Username string `json:"username" bson:"username,omitempty"`
	Exe      string `json:"exe" bson:"exe,omitempty"`
	Cmdline  string `json:"cmdline" bson:"cmdline,omitempty"`
	Comm     string `json:"comm" bson:"comm,omitempty"`
	Type     []int  `json:"type" binding:"omitempty,dive,oneof=6 17" bson:"type,omitempty"`
}

DescribePort defs

func (*DescribePortReqBody) MarshalToBson

func (q *DescribePortReqBody) MarshalToBson(m bson.M)

type DescribePortRespItem

type DescribePortRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Sip                  string `json:"sip" bson:"sip"`
	Sport                string `json:"sport" bson:"sport"`
	Dip                  string `json:"dip" bson:"dip"`
	Dport                string `json:"dport" bson:"dport"`
	Interface            string `json:"interface" bson:"interface"`
	Family               string `json:"family" bson:"family"`
	State                string `json:"state" bson:"state"`
	Uid                  string `json:"uid" bson:"uid"`
	Username             string `json:"username" bson:"username"`
	Inode                string `json:"inode" bson:"inode"`
	Pid                  string `json:"pid" bson:"pid"`
	Exe                  string `json:"exe" bson:"exe"`
	Cmdline              string `json:"cmdline" bson:"cmdline"`
	Comm                 string `json:"comm" bson:"comm"`
	Type                 int    `json:"type" bson:"-"`
	ContainerID          string `json:"container_id" bson:"container_id"`
	ContainerName        string `json:"container_name" bson:"container_name"`
}

type DescribeProcessReqBody

type DescribeProcessReqBody struct {
	BasicHostQuery
	Comm           string `json:"comm"`
	Cmdline        string `json:"cmdline"`
	Exe            string `json:"exe"`
	Checksum       string `json:"checksum"`
	Username       string `json:"username"`
	Integrity      *bool  `json:"integrity"`
	Common         *bool  `json:"common"`
	Container      *bool  `json:"container"`
	StartTimeStart *int   `json:"start_time_start"`
	StartTimeEnd   *int   `json:"start_time_end"`
}

DescribeProcess defs

func (*DescribeProcessReqBody) MarshalToBson

func (q *DescribeProcessReqBody) MarshalToBson(m bson.M)

type DescribeProcessRespItem

type DescribeProcessRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Pid                  string `json:"pid" bson:"pid"`
	Ppid                 string `json:"ppid" bson:"ppid"`
	Comm                 string `json:"comm" bson:"comm"`
	Cmdline              string `json:"cmdline" bson:"cmdline"`
	Exe                  string `json:"exe" bson:"exe"`
	Checksum             string `json:"checksum" bson:"checksum"`
	Uid                  string `json:"uid" bson:"ruid"`
	Username             string `json:"username" bson:"rusername"`
	Euid                 string `json:"euid" bson:"euid"`
	Euername             string `json:"eusername" bson:"eusername"`
	StartTime            int    `json:"start_time" bson:"start_time"`
	ContainerID          string `json:"container_id" bson:"container_id"`
	ContainerName        string `json:"container_name" bson:"container_name"`
	Integrity            bool   `json:"integrity" bson:"-"`
	Common               bool   `json:"common" bson:"common"`
	State                string `json:"state" bson:"state"`
}

type DescribeServiceReqBody

type DescribeServiceReqBody struct {
	BasicHostQuery `bson:"inline"`
	Path           string   `json:"path" bson:"path"`
	Name           string   `json:"name"`
	Type           []string `json:"type" binding:"omitempty,dive,oneof=simple exec forking oneshot dbus notify idle"`
	Command        string   `json:"command"`
	Restart        string   `json:"restart" binding:"omitempty,oneof=false true"`
	Checksum       string   `json:"checksum"`
}

DescribeService defs

func (*DescribeServiceReqBody) MarshalToBson

func (q *DescribeServiceReqBody) MarshalToBson(m bson.M)

type DescribeServiceRespItem

type DescribeServiceRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Name                 string `json:"name" bson:"name"`
	Type                 string `json:"type" bson:"type"`
	Command              string `json:"command" bson:"command"`
	Restart              string `json:"restart" bson:"restart"`
	WorkingDirectory     string `json:"working_directory" bson:"working_dir"`
	Checksum             string `json:"checksum" bson:"checksum"`
}

type DescribeSoftwareReqBody

type DescribeSoftwareReqBody struct {
	BasicHostQuery `bson:"inline"`
	Name           string   `json:"name" bson:"name"`
	Type           []string `json:"type" bson:"type" binding:"omitempty,dive,oneof=dpkg rpm pypi jar"`
	Version        string   `json:"version" bson:"sversion"`
}

DescribeSoftwaredefs

func (*DescribeSoftwareReqBody) MarshalToBson

func (q *DescribeSoftwareReqBody) MarshalToBson(m bson.M)

type DescribeSoftwareRespItem

type DescribeSoftwareRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Name                 string `json:"name" bson:"name"`
	Type                 string `json:"type" bson:"type"`
	Version              string `json:"version" bson:"sversion"`
}

type DescribeStatisticsResp

type DescribeStatisticsResp struct {
	Port      int64 `json:"port"`
	Process   int64 `json:"process"`
	User      int64 `json:"user"`
	Cron      int64 `json:"cron"`
	Service   int64 `json:"service"`
	Software  int64 `json:"software"`
	Container int64 `json:"container"`
	Integrity int64 `json:"integrity"`
	Kmod      int64 `json:"kmod"`
	App       int64 `json:"app"`
}

type DescribeUserReqBody

type DescribeUserReqBody struct {
	BasicHostQuery     `bson:"inline"`
	LastLoginIP        string `json:"last_login_ip"`
	Username           string `json:"username"`
	GroupName          string `json:"group_name"`
	LastLoginTimeStart *int64 `json:"last_login_time_start"`
	LastLoginTimeEnd   *int64 `json:"last_login_time_end"`
}

DescribeUser defs

func (*DescribeUserReqBody) MarshalToBson

func (q *DescribeUserReqBody) MarshalToBson(m bson.M)

type DescribeUserRespItem

type DescribeUserRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	LastLoginIP          string `json:"last_login_ip" bson:"last_login_ip"`
	LastLoginTime        int    `json:"last_login_time" bson:"last_login_time"`
	Username             string `json:"username" bson:"username"`
	Password             string `json:"password" bson:"password"`
	Uid                  string `json:"uid" bson:"uid"`
	Gid                  string `json:"gid" bson:"gid"`
	Info                 string `json:"info" bson:"info"`
	HomeDir              string `json:"home_dir" bson:"home"`
	GroupName            string `json:"group_name" bson:"groupname"`
	Shell                string `json:"shell" bson:"shell"`
	Sudoers              string `json:"sudoers" bson:"sudoers"`
}

type DescribeVolumeReq

type DescribeVolumeReq struct {
	AgentID string `json:"agent_id" bson:"agent_id"`
}

type DescribeVolumeRespItem

type DescribeVolumeRespItem struct {
	BasicHostInfo        `bson:",inline"`
	BasicFingerprintInfo `bson:",inline"`
	Name                 string `json:"name" bson:"name"`
	MountPoint           string `json:"mount_point" bson:"mount_point"`
	Fstype               string `json:"fstype" bson:"fstype"`
	Total                string `json:"total" bson:"total"`
	Used                 string `json:"used" bson:"used"`
	Free                 string `json:"free" bson:"free"`
	Usage                string `json:"usage" bson:"usage"`
}

type DownloadReq

type DownloadReq struct {
	FileName string `form:"file_name" json:"file_name" bson:"file_name" binding:"required"`
}

type ExportDataReqBody

type ExportDataReqBody struct {
	FingerprintType string          `json:"fingerprint_type" binding:"oneof=process port user cron service software container integrity app kmod"`
	IdList          []string        `json:"id_list" binding:"required_without=Conditions"`
	Conditions      json.RawMessage `json:"conditions" binding:"required_without=IdList"`
}

type FPStatus

type FPStatus struct {
	Status       string `json:"status"`
	Percent      int64  `json:"percent"`
	UpdateTime   int64  `json:"update_time"`
	CooldownTime int64  `json:"cooldown_time"`
}

type FPTaskItem

type FPTaskItem struct {
	DataType   int32  `json:"data_type" bson:"data_type"`
	TaskID     string `json:"task_id" bson:"task_id"`
	UpdateTime int64  `json:"update_time" bson:"update_time"`
}

type GeneralHostCond

type GeneralHostCond struct {
	Hostname string   `json:"hostname"`
	IP       string   `json:"ip"`
	Tags     []string `json:"tags"`
	Idc      []string `json:"idc"`
	Platform []string `json:"platform"`
	Status   []string `json:"status" binding:"omitempty,dive,oneof=running offline abnormal uninstall"`
	AgentID  string   `json:"agent_id"`
	Version  string   `json:"version"`
}

func (*GeneralHostCond) GenerateFilter

func (r *GeneralHostCond) GenerateFilter() bson.M

type GeneralHostReq

type GeneralHostReq struct {
	IdList     []string         `form:"id_list" json:"id_list" binding:"required_without=Conditions"`
	Conditions *GeneralHostCond `form:"conditions" json:"conditions" binding:"required_without=IdList"`
}

func (*GeneralHostReq) GenerateFilter

func (r *GeneralHostReq) GenerateFilter() bson.M

type HostStatistics

type HostStatistics struct {
	Uninstalled int64 `json:"uninstalled" bson:"uninstalled"`
	Running     int64 `json:"running" bson:"running"`
	Abnormal    int64 `json:"abnormal" bson:"abnormal"`
	Offline     int64 `json:"offline" bson:"offline"`
	Alerted     int64 `json:"alerted" bson:"alerted"`
	Vulnerable  int64 `json:"vulnerable" bson:"vulnerable"`
	Baseline    int64 `json:"baseline" bson:"baseline"`
	Total       int64 `json:"total" bson:"total"`
}

type HubAlarmInfo

type HubAlarmInfo struct {
	RuleInfo HubAlarmRuleInfo `json:"RULE_INFO" bson:"RULE_INFO"`
}

type HubAlarmRuleInfo

type HubAlarmRuleInfo struct {
	RuleName    string `json:"RuleName" bson:"RuleName"`
	RuleType    string `json:"RuleType" bson:"RuleType"`
	HarmLevel   string `json:"HarmLevel" bson:"HarmLevel"`
	KillChainID string `json:"KillChainID" bson:"KillChainID"`
	Desc        string `json:"Desc" bson:"Desc"`
}

type HubFeishuMsgFormat

type HubFeishuMsgFormat struct {
	AppID string `json:"AppID"`
}

type HubKillChainGraph

type HubKillChainGraph struct {
	SmithKey string `json:"smith_key" bson:"smith_key"`
}

type KillChainNodeDbData

type KillChainNodeDbData struct {
	Id                string             `json:"_id" bson:"_id"`
	AlertType         string             `json:"alert_type,omitempty" bson:"alert_type,omitempty"`
	AlertTypeUs       string             `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"`
	Suggestion        string             `json:"suggestion,omitempty" bson:"suggestion,omitempty"`
	Info              HubAlarmInfo       `json:"SMITH_ALERT_DATA" bson:"SMITH_ALERT_DATA"`
	NodeList          []*AlarmDbBaseData `json:"node_list,omitempty" bson:"node_list,omitempty"`
	AlarmDbHandleData `json:",inline" bson:",inline"`
}

type KubeAbnormalBehaviorFilter

type KubeAbnormalBehaviorFilter struct {
	KubeAuditLogListFilterComm `json:",inline" bson:",inline"`
	ActionList                 []string `json:"action_list,omitempty"`
}

AbnormalBehavior

type KubeAbnormalBehaviorListRequest

type KubeAbnormalBehaviorListRequest struct {
	Condision KubeAbnormalBehaviorFilter `json:"condition,omitempty"`
}

type KubeAbnormalBehaviorListResponseItem

type KubeAbnormalBehaviorListResponseItem struct {
	KubeThreatAnalysisListBaseItem `json:",inline" bson:",inline"`
	Action                         string `json:"action,omitempty" bson:"verb,omitempty"`
	Id                             string `json:"abnormal_id,omitempty" bson:"_id,omitempty"`
}

type KubeAlarmBaseInfo

type KubeAlarmBaseInfo struct {
	AlarmType    string   `json:"alarm_type"`
	AlarmLevel   string   `json:"level"`
	Status       int      `json:"status"`
	UpdateTime   int64    `json:"update_time"`
	AlertDesc    string   `json:"alert_desc"`
	Desc         string   `json:"desc"`
	Suggest      string   `json:"suggest"`
	Docker       string   `json:"docker"`
	CreateTime   int64    `json:"create_time"`
	HandlerUser  string   `json:"handle_user,omitempty"`
	HandlerTime  int64    `json:"handle_time,omitempty"`
	AttackIdList []string `json:"attack_id_list"`
	TraceId      string   `json:"trace_id,omitempty"`
	Name         string   `json:"name"`
}

type KubeAlarmClusterInfo

type KubeAlarmClusterInfo struct {
	ClusterId      string `json:"cluster_id,omitempty"`
	ClusterName    string `json:"cluster_name,omitempty"`
	ClusterArea    string `json:"cluster_area,omitempty"`
	RuleTypeFirst  string `json:"rule_type_1st,omitempty"`
	RuleTypeSecond string `json:"rule_type_2nd,omitempty"`
}

************************************* ALARM SUMMARY *************************************

type KubeAlarmDbData

type KubeAlarmDbData struct {
	AlarmId                string `json:"alarm_id,omitempty" bson:"_id,omitempty"`
	KubeAuditLogDbBaseData `json:",inline" bson:",inline"`
	KubeAuditLogDbRiskData `json:",inline" bson:",inline"`
	DataType               string   `json:"data_type" bson:"data_type"`
	ExecComd               string   `json:"exec_command,omitempty" bson:"exec_command,omitempty"`
	ExecContainer          string   `json:"exec_container,omitempty" bson:"exec_container,omitempty"`
	ImageList              []string `json:"images,omitempty" bson:"images,omitempty"`
	Asset                  *string  `json:"workload_asset,omitempty" bson:"workload_asset,omitempty"`
	PrivCap                []string `json:"privileged_capabilities,omitempty" bson:"privileged_capabilities,omitempty"`
	ShareNs                []string `json:"shared_namespaces,omitempty" bson:"shared_namespaces,omitempty"`
	ReadWriteMountList     []string `json:"read_write_mounts,omitempty" bson:"read_write_mounts,omitempty"`
	ReadOnlyMountList      []string `json:"read_only_mounts,omitempty" bson:"read_only_mounts,omitempty"`
	BindRoleref            string   `json:"binding_roleref,omitempty" bson:"binding_roleref,omitempty"`
	BindSubject            string   `json:"binding_subject,omitempty" bson:"binding_subject,omitempty"`
}

type KubeAlarmExportDataRequest

type KubeAlarmExportDataRequest struct {
	AlarmIdList *[]string        `json:"alarm_id_list"`
	Conditions  *KubeAlarmFilter `json:"conditions"`
}

type KubeAlarmFilter

type KubeAlarmFilter struct {
	Name          string   `json:"name,omitempty" bson:"name,omitempty"`
	ClusterId     string   `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"`
	ClusterRegion string   `json:"cluster_region,omitempty" bson:"cluster_region,omitempty"`
	ClusterName   string   `json:"cluster_name,omitempty" bson:"cluster,omitempty"`
	StatusList    []int    `json:"status,omitempty" bson:"status,omitempty"`
	TypeList      []string `json:"type,omitempty" bson:"type,omitempty"`
	LevelList     []string `json:"level,omitempty" bson:"level,omitempty"`
	StartTime     int64    `json:"time_start,omitempty" bson:"time_start,omitempty"`
	EndTime       int64    `json:"time_end,omitempty" bson:"time_end,omitempty"`
	EventName     string   `json:"event_name,omitempty" bson:"event_name,omitempty"`
	EventId       string   `json:"event_id,omitempty" bson:"event_id,omitempty"`
	EventReason   string   `json:"event_reason,omitempty" bson:"event_reason,omitempty"`
}

type KubeAlarmListRequest

type KubeAlarmListRequest struct {
	Name          string   `json:"name,omitempty"`
	ClusterId     string   `json:"cluster_id,omitempty"`
	ClusterRegion string   `json:"cluster_region,omitempty"`
	ClusterName   string   `json:"cluster_name,omitempty"`
	Status        []int    `json:"status,omitempty"`
	TypeList      []string `json:"type,omitempty"`
	LevelList     []string `json:"level,omitempty"`
	StartTime     int64    `json:"time_start,omitempty"`
	EndTime       int64    `json:"time_end,omitempty"`
	EventName     string   `json:"event_name,omitempty"`
	EventId       string   `json:"event_id,omitempty"`
	EventReason   string   `json:"event_reason,omitempty"`
}

type KubeAlarmListResponseItem

type KubeAlarmListResponseItem struct {
	AlarmId     string               `json:"alarm_id"`
	ClusterId   string               `json:"cluster_id"`
	Status      int                  `json:"status"`
	Type        string               `json:"type"`
	Name        string               `json:"name"`
	Level       string               `json:"level"`
	AlarmTime   int64                `json:"alarm_time"`
	EventId     string               `json:"event_id"`
	EventName   string               `json:"event_name"`
	Attribution []AlarmAttribution   `json:"attribution_list"`
	Cluster     KubeAlarmClusterInfo `json:"cluster"`
	DataType    string               `json:"data_type"`
	TraceId     string               `json:"trace_id"`
}

type KubeAlarmSimpleInfoItem

type KubeAlarmSimpleInfoItem struct {
	AlarmId     string `json:"_id,omitempty" bson:"_id,omitempty"`
	ClusterId   string `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"`
	ClusterName string `json:"cluster_name,omitempty" bson:"cluster,omitempty"`
	ClusterArea string `json:"cluster_area,omitempty" bson:"cluster_area,omitempty"`
	RuleName    string `json:"rule_name,omitempty" bson:"rule_name,omitempty"`
	AlertType   string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"`
	Level       string `json:"level,omitempty" bson:"level,omitempty"`
	Status      int    `json:"__alarm_status,omitempty" bson:"__alarm_status,omitempty"`
	CreateTime  int64  `json:"__insert_time,omitempty" bson:"__insert_time,omitempty"`
}

type KubeAlarmSummaryResponse

type KubeAlarmSummaryResponse struct {
	DataType     string                    `json:"data_type"`
	BaseInfo     KubeAlarmClusterInfo      `json:"alarm_cluster_info,omitempty"`
	AlarmInfo    KubeAlarmBaseInfo         `json:"base_alarm_info,omitempty"`
	AuditLogInfo KubeAuditLogDbRiskData    `json:"cluster_auditlog_info,omitempty"`
	Plus9004     *KubeAuditLogDataPlus9004 `json:"plus_alarm_info_9004,omitempty"`
	Plus9005     *KubeAuditLogDataPlus9005 `json:"plus_alarm_info_9005,omitempty"`
	Plus9006     *KubeAuditLogDataPlus9006 `json:"plus_alarm_info_9006,omitempty"`
	Plus9007     *KubeAuditLogDataPlus9007 `json:"plus_alarm_info_9007,omitempty"`
	Plus9008     *KubeAuditLogDataPlus9008 `json:"plus_alarm_info_9008,omitempty"`
	Plus9009     *KubeAuditLogDataPlus9009 `json:"plus_alarm_info_9009,omitempty"`
	Plus9010     *KubeAuditLogDataPlus9010 `json:"plus_alarm_info_9010,omitempty"`
}

type KubeAuditLogDataPlus9004

type KubeAuditLogDataPlus9004 struct {
	ExecComd      string `json:"exec_command,omitempty" bson:"exec_command,omitempty"`
	ExecContainer string `json:"exec_container,omitempty" bson:"exec_container,omitempty"`
}

type KubeAuditLogDataPlus9005

type KubeAuditLogDataPlus9005 struct {
	ImageList []string `json:"images,omitempty" bson:"images,omitempty"`
	Asset     *string  `json:"workload_asset,omitempty" bson:"workload_asset,omitempty"`
}

type KubeAuditLogDataPlus9006

type KubeAuditLogDataPlus9006 struct {
	ImageList []string `json:"images,omitempty" bson:"images,omitempty"`
	Asset     *string  `json:"workload_asset,omitempty" bson:"workload_asset,omitempty"`
	PrivCap   []string `json:"privileged_capabilities,omitempty" bson:"privileged_capabilities,omitempty"`
}

type KubeAuditLogDataPlus9007

type KubeAuditLogDataPlus9007 struct {
	ImageList []string `json:"images,omitempty" bson:"images,omitempty"`
	Asset     *string  `json:"workload_asset,omitempty" bson:"workload_asset,omitempty"`
	ShareNs   []string `json:"shared_namespaces,omitempty" bson:"shared_namespaces,omitempty"`
}

type KubeAuditLogDataPlus9008

type KubeAuditLogDataPlus9008 struct {
	ImageList          []string `json:"images,omitempty" bson:"images,omitempty"`
	Asset              *string  `json:"workload_asset,omitempty" bson:"workload_asset,omitempty"`
	ReadWriteMountList []string `json:"read_write_mounts,omitempty" bson:"read_write_mounts,omitempty"`
}

type KubeAuditLogDataPlus9009

type KubeAuditLogDataPlus9009 struct {
	ImageList         []string `json:"images,omitempty" bson:"images,omitempty"`
	Asset             *string  `json:"workload_asset,omitempty" bson:"workload_asset,omitempty"`
	ReadOnlyMountList []string `json:"read_only_mounts,omitempty" bson:"read_only_mounts,omitempty"`
}

type KubeAuditLogDataPlus9010

type KubeAuditLogDataPlus9010 struct {
	BindRoleref string `json:"binding_roleref,omitempty" bson:"binding_roleref,omitempty"`
	BindSubject string `json:"binding_subject,omitempty" bson:"binding_subject,omitempty"`
}

type KubeAuditLogDbBaseData

type KubeAuditLogDbBaseData struct {
	ClusterId      string `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"`
	ClusterName    string `json:"cluster_name,omitempty" bson:"cluster,omitempty"`
	ClusterArea    string `json:"cluster_area,omitempty" bson:"cluster_area,omitempty"`
	RuleName       string `json:"rule_name,omitempty" bson:"rule_name,omitempty"`
	AlertType      string `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"`
	Level          string `json:"level,omitempty" bson:"level,omitempty"`
	AlertDesc      string `json:"alert_desc,omitempty" bson:"alert_desc,omitempty"`
	AttackIds      string `json:"attack_id,omitempty" bson:"attack_id,omitempty"`
	RuleTypeFirst  string `json:"rule_type_1st,omitempty" bson:"rule_type_1st,omitempty"`
	RuleTypeSecond string `json:"rule_type_2nd,omitempty" bson:"rule_type_2nd,omitempty"`
	RiskDesc       string `json:"risk_desc,omitempty" bson:"risk_desc,omitempty"`
	Suggestion     string `json:"suggestion,omitempty" bson:"suggestion,omitempty"`
	Status         int    `json:"__alarm_status,omitempty" bson:"__alarm_status,omitempty"`
	UpdateTime     int64  `json:"__update_time,omitempty" bson:"__update_time,omitempty"`
	CreateTime     int64  `json:"__insert_time,omitempty" bson:"__insert_time,omitempty"`
	HandlerUser    string `json:"__handler_user,omitempty" bson:"__handler_user,omitempty"`
	DataType       string `json:"data_type,omitempty" bson:"data_type,omitempty"`
}

************************************* ALARM *************************************

type KubeAuditLogDbRiskData

type KubeAuditLogDbRiskData struct {
	SourceIP       string   `json:"source_ip,omitempty" bson:"source_ip,omitempty"`
	SourceAsset    string   `json:"source_ip_asset,omitempty" bson:"source_ip_asset,omitempty"`
	UserAgent      string   `json:"user_agent,omitempty" bson:"user_agent,omitempty"`
	UserName       string   `json:"user_name,omitempty" bson:"user_name,omitempty"`
	UserGroup      string   `json:"user_groups,omitempty" bson:"user_groups,omitempty"`
	RealUserName   string   `json:"real_user_name,omitempty" bson:"real_user_name,omitempty"`
	RealUserGroup  []string `json:"real_user_groups,omitempty" bson:"real_user_groups,omitempty"`
	ImpUserName    string   `json:"impersonated_user_name,omitempty" bson:"impersonated_user_name,omitempty"`
	ImpUserGroup   string   `json:"impersonated_user_groups,omitempty" bson:"impersonated_user_groups,omitempty"`
	Verb           string   `json:"verb,omitempty" bson:"verb,omitempty"`
	ResNamespace   string   `json:"resource_namespace,omitempty" bson:"resource_namespace,omitempty"`
	ResKind        string   `json:"resource_kind,omitempty" bson:"resource_kind,omitempty"`
	ResName        string   `json:"resource_name,omitempty" bson:"resource_name,omitempty"`
	RequestUri     string   `json:"request_uri,omitempty" bson:"request_uri,omitempty"`
	ResponseCode   string   `json:"response_code,omitempty" bson:"response_code,omitempty"`
	ResponseStatus string   `json:"response_status,omitempty" bson:"response_status,omitempty"`
	ResponseReason string   `json:"response_reason,omitempty" bson:"response_reason,omitempty"`
}

type KubeAuditLogListFilterComm

type KubeAuditLogListFilterComm struct {
	ClusterId       string   `json:"cluster_id,omitempty"`
	ClusterName     string   `json:"cluster_name,omitempty"`
	Region          string   `json:"region,omitempty"`
	RiskNameList    []string `json:"risk_name_list,omitempty"`
	RiskLevelList   []string `json:"risk_level_list,omitempty"`
	SourceIp        string   `json:"source_ip,omitempty"`
	SourcePsm       string   `json:"source_psm,omitempty"`
	UserAgent       string   `json:"user_agent,omitempty"`
	User            string   `json:"user,omitempty"`
	UserGroup       string   `json:"user_group,omitempty"`
	CreateTimeStart int      `json:"create_time_start,omitempty"`
	CreateTimeEnd   int      `json:"create_time_end,omitempty"`
	ResKind         string   `json:"resource_kind,omitempty"`
	ResNamespace    string   `json:"resource_namespace,omitempty"`
	ResName         string   `json:"resource_name,omitempty"`
}

************************************* THREAT *************************************

type KubeClientInfo

type KubeClientInfo struct {
	IP  string `json:"ip,omitempty" bson:"ip,omitempty"`
	PSM string `json:"psm,omitempty" bson:"psm,omitempty"`
}

type KubeClusterBaseInfo

type KubeClusterBaseInfo struct {
	ClusterId   string `bson:"cluster_id,omitempty"`
	ClusterName string `bson:"cluster_name,omitempty"`
	ClusterArea string `bson:"cluster_region,omitempty"`
}

************************************* CLUSTER INFO *************************************

func KubeQueryClusterInfo

func KubeQueryClusterInfo(ctx context.Context, cluster_id string) *KubeClusterBaseInfo

********************************* cluster info *********************************

type KubeResourceInfo

type KubeResourceInfo struct {
	Kind      string `json:"kind,omitempty" bson:"kind,omitempty"`
	Namespace string `json:"namespace,omitempty" bson:"namespace,omitempty"`
	Name      string `json:"name,omitempty" bson:"name,omitempty"`
}

type KubeThreatAnalysisListBaseItem

type KubeThreatAnalysisListBaseItem struct {
	ClusterId    string           `json:"cluster_id,omitempty" bson:"cluster_id,omitempty"`
	ClusterName  string           `json:"cluster_name,omitempty" bson:"cluster,omitempty"`
	ClusterArea  string           `json:"region,omitempty" bson:"cluster_area,omitempty"`
	RuleName     string           `json:"risk_name,omitempty" bson:"rule_name,omitempty"`
	Level        string           `json:"risk_level,omitempty" bson:"level,omitempty"`
	UserAgent    string           `json:"user_agent,omitempty" bson:"user_agent,omitempty"`
	UserName     string           `json:"user,omitempty" bson:"real_user_name,omitempty"`
	UserGroup    []string         `json:"user_group_list,omitempty" bson:"real_user_groups,omitempty"`
	CreateTime   int64            `json:"create_time,omitempty" bson:"__insert_time,omitempty"`
	ResNamespace *string          `json:"resource_namespace,omitempty" bson:"resource_namespace,omitempty"`
	ResKind      *string          `json:"resource_kind,omitempty" bson:"resource_kind,omitempty"`
	ResName      *string          `json:"resource_name,omitempty" bson:"resource_name,omitempty"`
	SourceIP     *string          `json:"source_ip,omitempty" bson:"source_ip,omitempty"`
	SourceAsset  *string          `json:"source_ip_asset,omitempty" bson:"source_ip_asset,omitempty"`
	ResInfo      KubeResourceInfo `json:"resource_info,omitempty" bson:"resource_info,omitempty"`
	Source       KubeClientInfo   `json:"source_info,omitempty" bson:"source_info,omitempty"`
}

func (*KubeThreatAnalysisListBaseItem) KubeTransThreatRawBaseDataToRspBaseData

func (t *KubeThreatAnalysisListBaseItem) KubeTransThreatRawBaseDataToRspBaseData()

type KubeThreatPreviewResponse

type KubeThreatPreviewResponse struct {
	kube.KubeThreatStatistics `json:",inline" bson:",inline"`
}

preview

type KubeThreatResourceCreatFilter

type KubeThreatResourceCreatFilter struct {
	KubeAuditLogListFilterComm `json:",inline" bson:",inline"`
	ImageName                  string `json:"image_name,omitempty"`
	ReadonlyMount              string `json:"read_only_mount,omitempty"`
	ReadwriteMount             string `json:"read_write_mount,omitempty"`
}

ThreatResourceCreat

type KubeThreatResourceCreatListRequest

type KubeThreatResourceCreatListRequest struct {
	Condision KubeThreatResourceCreatFilter `json:"condition,omitempty"`
}

type KubeThreatResourceCreatListResponseItem

type KubeThreatResourceCreatListResponseItem struct {
	KubeThreatAnalysisListBaseItem `json:",inline" bson:",inline"`
	Id                             string   `json:"threatres_id,omitempty" bson:"_id,omitempty"`
	ImageList                      []string `json:"image_list,omitempty" bson:"images,omitempty"`
	ReadOnlyMountList              []string `json:"read_only_mount_list,omitempty" bson:"read_only_mounts,omitempty"`
	ReadWriteMountList             []string `json:"read_write_mount_list,omitempty" bson:"read_write_mounts,omitempty"`
}

type LicenseDetailInfo

type LicenseDetailInfo struct {
	HUB   LicenseDetailInfoItem `json:"hub"`
	Trace LicenseDetailInfoItem `json:"trace"`
	K8s   LicenseDetailInfoItem `json:"k8s"`
	Rule  LicenseDetailInfoItem `json:"rule"`
	Rasp  LicenseDetailInfoItem `json:"rasp"`
}

type LicenseDetailInfoItem

type LicenseDetailInfoItem struct {
	Status    string `json:"status"`
	Expired   int64  `json:"expire_time"`
	AllCores  int    `json:"all_cores"`
	UsedCores int    `json:"used_cores"`
}

type LicenseDetailResp

type LicenseDetailResp struct {
	Company string            `json:"company_name"`
	Status  LicenseDetailInfo `json:"status"`
}

type LicenseOverviewInfo

type LicenseOverviewInfo struct {
	HUB   bool `json:"hub"`
	Trace bool `json:"trace"`
	K8s   bool `json:"k8s"`
	Rule  bool `json:"rule"`
	Rasp  bool `json:"rasp"`
}

type LicenseOverviewResp

type LicenseOverviewResp struct {
	Company string              `json:"company_name"`
	Status  LicenseOverviewInfo `json:"status"`
}

type NoticeAddOneRequest

type NoticeAddOneRequest struct {
	NoticeWriteRequestComm `json:",inline" bson:",inline"`
}

type NoticeCommResponse

type NoticeCommResponse struct {
	NoticeId   *string                  `json:"notice_id,omitempty" bson:"notice_id,omitempty"`
	TestResult *NoticeConnectTestResult `json:"test_result,omitempty" bson:"test_result,omitempty"`
}

type NoticeConnectTestResult

type NoticeConnectTestResult struct {
	Status int    `json:"status" bson:"status"`
	ErrMsg string `json:"err_msg" bson:"err_msg"`
}

********************************* struct *********************************

type NoticeDelOneRequest

type NoticeDelOneRequest struct {
	NoticeId string `json:"notice_id" bson:"notice_id"`
}

type NoticeModifyOneRequest

type NoticeModifyOneRequest struct {
	NoticeId               string `json:"notice_id" bson:"notice_id"`
	NoticeWriteRequestComm `json:",inline" bson:",inline"`
}

type NoticeMsgData

type NoticeMsgData struct {
	AlertType string                     `json:"alert_type_us,omitempty"`
	RuleName  string                     `json:"rule_name,omitempty"`
	HostName  string                     `json:"hostname,omitempty"`
	Timestamp string                     `json:"time,omitempty"`
	Service   []NoticeReminderMsgContent `json:"service,omitempty"`
}

type NoticeOneChangeRunConfigRequest

type NoticeOneChangeRunConfigRequest struct {
	NoticeId  string   `json:"notice_id"`
	LevelList []string `json:"notice_level_list,omitempty"`
	Opt       *int     `json:"opt,omitempty"`
}

type NoticeReminderMsgContent

type NoticeReminderMsgContent struct {
	Name       string `json:"name"`
	ExpireTime int64  `json:"expire_time"`
}

********************************* struct *********************************

type NoticeWriteRequestComm

type NoticeWriteRequestComm struct {
	Type      string                   `json:"notice_type" bson:"notice_type"`
	LevelList []string                 `json:"notice_level_list" bson:"notice_level_list"`
	MsgType   string                   `json:"notice_config_type" bson:"notice_config_type"`
	MsgConfig outputer.NoticeMsgConfig `json:"notice_config" bson:"notice_config"`
	TestOnly  bool                     `json:"test_only,omitempty" bson:"test_only,omitempty"`
}

type PageResponseStruct

type PageResponseStruct struct {
	Code     int                 `json:"code"`
	Message  string              `json:"msg"`
	Data     interface{}         `json:"data"`
	PageInfo common.PageResponse `json:"page_info"`
}

PageResponseStruct PageResponse 带分页的返回

type PkgInfo

type PkgInfo struct {
	AgentId       string `json:"agent_id" bson:"agent_id"`
	PackageSeq    string `json:"package_seq" bson:"package_seq"`
	Type          string `json:"type" bson:"type"`
	Token         string `json:"token" bson:"token"`
	Name          string `json:"name" bson:"name"`
	Version       string `json:"sversion" bson:"version"`
	Source        string `json:"source" bson:"source"`
	Status        string `json:"status" bson:"status"`
	Vendor        string `json:"vendor" bson:"vendor"`
	Cmdline       string `json:"cmdline" bson:"cmdline"`
	Pid           string `json:"pid" bson:"pid"`
	Path          string `json:"path" bson:"path"`
	ContainerName string `json:"container_name" bson:"container_name"`
	ContainerId   string `json:"container_id" bson:"container_id"`
}

type Policy

type Policy struct {
	ID               primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	ComponentVersion `json:"component_version" bson:"component_version"`
	Type             string       `json:"type" bson:"type"`
	CreateTime       int          `json:"create_time" bson:"create_time"`
	Creator          string       `json:"creator" bson:"creator"`
	Rules            []PolicyRule `json:"rules" bson:"rules"`
}

func (*Policy) GetIntance

func (p *Policy) GetIntance(info *ContextInfo) (*ComponentInstance, error)

type PolicyRule

type PolicyRule struct {
	Key      string `json:"key" bson:"key" binding:"oneof=agent_id tag kernel_version"`
	Operator string `json:"operator" bson:"operator" binding:"oneof=$in $regex"`
	Value    string `json:"value" bson:"value" binding:"required"`
}

func (*PolicyRule) Find

func (r *PolicyRule) Find(value interface{}) (bool, error)

func (*PolicyRule) ToBson

func (r *PolicyRule) ToBson() bson.M

type PublishComponentVersionReqBody

type PublishComponentVersionReqBody struct {
	ComponentID string `json:"component_id" form:"component_id" binding:"required"`
	Version     string `json:"version" form:"version" binding:"required,component_version"`
}

type RaspAlarmAbstractData

type RaspAlarmAbstractData struct {
	DataType      string                   `json:"data_type"`
	BaseAgent     AlarmDetailDataBaseAgent `json:"base_info"`
	BaseAlarm     RaspAlarmDataBaseInfo    `json:"base_alarm_info"`
	ContainerInfo AlarmDataContainerInfo   `json:"container_info"`
	Plus2439      *AlarmDataType2439       `json:"plus_alarm_info_2439,omitempty"`
}

type RaspAlarmDataBaseInfo

type RaspAlarmDataBaseInfo struct {
	AlarmType    string   `json:"alarm_type"`
	AlarmLevel   string   `json:"level"`
	Status       int      `json:"status"`
	UpdateTime   int64    `json:"update_time"`
	Desc         string   `json:"desc"`
	Suggest      string   `json:"suggest"`
	Docker       string   `json:"docker"`
	CreateTime   int64    `json:"create_time"`
	HandlerUser  string   `json:"handle_user,omitempty"`
	HandlerTime  int64    `json:"handle_time,omitempty"`
	AttackIdList []string `json:"attack_id_list"`
	TraceId      string   `json:"trace_id,omitempty"`
	Name         string   `json:"name"`
}

type RaspAlarmDbBaseData

type RaspAlarmDbBaseData struct {
	AgentId          string   `json:"agent_id" bson:"agent_id"`
	HostName         string   `json:"hostname" bson:"hostname"`
	DataType         string   `json:"data_type" bson:"data_type"`
	InIpv4List       string   `json:"in_ipv4_list" bson:"in_ipv4_list"`
	ExIpv4List       string   `json:"ex_ipv4_list" bson:"ex_ipv4_list"`
	InIpv6List       string   `json:"in_ipv6_list,omitempty" bson:"in_ipv6_list,omitempty"`
	ExIpv6List       string   `json:"ex_ipv6_list,omitempty" bson:"ex_ipv6_list,omitempty"`
	Suggestion       string   `json:"suggestion,omitempty" bson:"suggestion,omitempty"`
	AlertType        string   `json:"alert_type,omitempty" bson:"alert_type,omitempty"`
	AlertTypeUs      string   `json:"alert_type_us,omitempty" bson:"alert_type_us,omitempty"`
	AttackId         string   `json:"attack_id,omitempty" bson:"attack_id,omitempty"`
	KcAttackIdList   string   `json:"attack_id_list,omitempty" bson:"attack_id_list,omitempty"`
	ArgsList         []string `json:"args_array,omitempty" bson:"args_array,omitempty"`
	Pid              string   `json:"pid,omitempty" bson:"pid,omitempty"`
	NsPid            string   `json:"nspid,omitempty" bson:"nspid,omitempty"`
	Sid              string   `json:"sid,omitempty" bson:"sid,omitempty"`
	ProbeHook        string   `json:"probe_hook,omitempty" bson:"probe_hook,omitempty"`
	StackTraceFormat string   `json:"stack_trace_format,omitempty" bson:"stack_trace_format,omitempty"`
	StackTraceHash   string   `json:"stack_trace_hash,omitempty" bson:"stack_trace_hash,omitempty"`
	TraceId          string   `json:"trace_id,omitempty" bson:"trace_id,omitempty"`
	EventId          string   `json:"event_id,omitempty" bson:"event_id,omitempty"`
	EventName        string   `json:"event_name,omitempty" bson:"event_name,omitempty"`
	InDocker         string   `json:"in_container,omitempty" bson:"in_container,omitempty"`
}

type RaspAlarmDbData

type RaspAlarmDbData struct {
	Id                  string       `json:"_id" bson:"_id"`
	Info                HubAlarmInfo `json:",inline" bson:",inline"`
	RuleName            string       `json:"rule_name" bson:"rule_name"`
	HarmLevel           string       `json:"HarmLevel" bson:"HarmLevel"`
	Desc                string       `json:"Desc" bson:"Desc"`
	AlarmDbHandleData   `json:",inline" bson:",inline"`
	RaspAlarmDbBaseData `json:",inline" bson:",inline"`
}

type RaspAlarmExportDataRequest

type RaspAlarmExportDataRequest struct {
	AlarmIdList *[]string             `json:"alarm_id_list"`
	Conditions  *RaspAlarmQueryFilter `json:"conditions"`
}

type RaspAlarmListItem

type RaspAlarmListItem struct {
	AlarmId     string             `json:"alarm_id"`
	AgentId     string             `json:"agent_id"`
	Status      int                `json:"status"`
	Type        string             `json:"type"`
	Name        string             `json:"name"`
	Level       string             `json:"level"`
	HostName    string             `json:"alarm_hostname"`
	AlarmTime   int64              `json:"alarm_time"`
	TraceId     string             `json:"trace_id"`
	EventId     string             `json:"event_id"`
	EventName   string             `json:"event_name"`
	Attribution []AlarmAttribution `json:"attribution_list"`
	Host        AlarmHostInfo      `json:"host"`
	DataType    string             `json:"data_type"`
	ErrReason   string             `json:"error_reason,omitempty"`
}

type RaspAlarmListRequest

type RaspAlarmListRequest struct {
	Name        string   `json:"name,omitempty"`
	Status      []int    `json:"status,omitempty"`
	LevelList   []string `json:"level,omitempty"`
	TypeList    []string `json:"type,omitempty"`
	DataType    string   `json:"data_type,omitempty"`
	TimeStart   int64    `json:"time_start,omitempty"`
	TimeEnd     int64    `json:"time_end,omitempty"`
	AgentId     string   `json:"agent_id,omitempty"`
	EventId     string   `json:"event_id,omitempty"`
	EventName   string   `json:"event_name,omitempty"`
	EventReason string   `json:"event_reason,omitempty"`
	Hostname    string   `json:"hostname,omitempty"`
	Ip          string   `json:"ip,omitempty"`
}

type RaspAlarmQueryFilter

type RaspAlarmQueryFilter struct {
	Name        string   `json:"name" bson:"name"`
	StatusList  []int    `json:"status" bson:"status"`
	Hostname    string   `json:"hostname" bson:"hostname"`
	Ip          string   `json:"ip" bson:"ip"`
	TypeList    []string `json:"type" bson:"type"`
	LevelList   []string `json:"level" bson:"level"`
	StartTime   int64    `json:"time_start" bson:"time_start"`
	EndTime     int64    `json:"time_end" bson:"time_end"`
	AgentId     string   `json:"agent_id" bson:"agent_id"`
	EventName   string   `json:"event_name" bson:"event_name"`
	EventId     string   `json:"event_id" bson:"event_id"`
	EventReason string   `json:"event_reason" bson:"event_reason"`
}

type RaspAlarmRawDataItem

type RaspAlarmRawDataItem struct {
	RawData map[string]interface{} `json:"rawdata"`
}

type RaspAlarmStatistics

type RaspAlarmStatistics struct {
	Total            int `json:"alarm_total"`
	CriticalLevelNum int `json:"alarm_critical_num"`
	HighLevelNum     int `json:"alarm_high_num"`
	MediumLevelNum   int `json:"alarm_medium_num"`
	LowLevelNum      int `json:"alarm_low_num"`
	ProcessedNum     int `json:"alarm_processed_num"`
	WhiteListNum     int `json:"alarm_white_num"`
}

type RaspAlarmStatisticsRequest

type RaspAlarmStatisticsRequest struct {
	AgentId string `form:"agent_id"`
}

type RaspAlarmStatusUpdateItem

type RaspAlarmStatusUpdateItem struct {
	AlarmId string `json:"alarm_id"`
	Code    int    `json:"code"`
	Msg     string `json:"msg"`
}

type RaspAlarmStatusUpdateRequest

type RaspAlarmStatusUpdateRequest struct {
	AlarmIdList *[]string             `json:"alarm_id_list"`
	Conditions  *RaspAlarmQueryFilter `json:"conditions"`
	NewStatus   int                   `json:"status"`
}

type RefreshDataReqBody

type RefreshDataReqBody struct {
	FingerprintType string `json:"fingerprint_type" binding:"required"`
	AgentID         string `json:"agent_id"`
}

type ResponseStuct

type ResponseStuct struct {
	Code    int         `json:"code"`
	Message string      `json:"msg"`
	Data    interface{} `json:"data"`
}

ResponseStuct Response 常规返回值

type TagsReq

type TagsReq struct {
	Tags           []string `json:"tags" bson:"tags" binding:"required,unique"`
	GeneralHostReq `json:",omitempty,inline"`
}

type TaskDetail

type TaskDetail struct {
	TaskId         string `json:"task_id" bson:"task_id"`
	TaskName       string `json:"task_name" bson:"task_name"`
	TaskStatus     string `json:"task_status" bson:"task_status"`
	Action         string `json:"action" bson:"action"`
	TaskUser       string `json:"task_user" bson:"task_user"`
	Tag            string `json:"tag" bson:"tag"`
	IdCount        int    `json:"id_count" bson:"id_count"`
	SubTaskCreated int    `json:"sub_task_created" bson:"sub_task_created"`
	SubTaskFailed  int    `json:"sub_task_failed" bson:"sub_task_failed"`
	SubTaskSucceed int    `json:"sub_task_succeed" bson:"sub_task_succeed"`
	CreateTime     int64  `json:"create_time" bson:"create_time"`
	UpdateTime     int64  `json:"update_time" bson:"update_time"`
}

type UploadRuleInfo

type UploadRuleInfo struct {
	UploadName  string
	Md5         string
	UploadAt    int64
	StorageName string
}

type UserInfo

type UserInfo struct {
	UserName     string   `json:"username" bson:"username"`
	Level        int      `json:"level" bson:"level"`
	SourceIPList []string `json:"source_ip_list" bson:"source_ip_list"`
	IPLimit      bool     `json:"ip_limit" bson:"ip_limit"`
	OtpEnable    bool     `json:"otp_enable" bson:"otp_enable"`
}

type VirusAlarmListRequest

type VirusAlarmListRequest struct {
	AlarmListRequest `json:",inline"`
	TaskId           *string `json:"task_id,omitempty"`
}

type VirusHostInfo

type VirusHostInfo struct {
	HostName    string   `json:"hostname"`
	InnerIpList []string `json:"inner_ip_list"`
	OuterIpList []string `json:"outer_ip_list"`
	AgentId     string   `json:"agent_id"`
}

type VirusScanAlarmListItem

type VirusScanAlarmListItem struct {
	AlarmId   string        `json:"alarm_id"`
	AgentId   string        `json:"agent_id"`
	Status    int           `json:"status"`
	Type      string        `json:"type"`
	Name      string        `json:"name"`
	Level     string        `json:"level"`
	HostName  string        `json:"alarm_hostname"`
	AlarmTime int64         `json:"alarm_time"`
	Host      AlarmHostInfo `json:"host"`
	FilePath  string        `json:"file_path"`
	FileHash  string        `json:"file_hash"`
	ErrReason string        `json:"error_reason,omitempty"`
}

********************************* struct *********************************

type VirusScanTaskHostListRequest

type VirusScanTaskHostListRequest struct {
	TaskId   string `json:"task_id" bson:"task_id"`
	HostName string `json:"hostname,omitempty" bson:"hostname,omitempty"`
	IP       string `json:"ip,omitempty" bson:"ip,omitempty"`
}

type VirusScanTaskListFilter

type VirusScanTaskListFilter struct {
	TaskName   string   `json:"task_name,omitempty" bson:"task_name,omitempty"`
	TaskStatus []string `json:"task_status,omitempty" bson:"task_status,omitempty"`
	Action     []string `json:"action,omitempty" bson:"action,omitempty"`
	TaskUser   string   `json:"task_user,omitempty" bson:"task_user,omitempty"`
	FilePath   string   `json:"file_path,omitempty" bson:"file_path,omitempty"`
}

type VirusScanTaskListRequest

type VirusScanTaskListRequest struct {
	VirusScanTaskListFilter `json:",inline" bson:",inline"`
}

type VirusScanTaskOptRequest

type VirusScanTaskOptRequest struct {
	TaskId string `json:"task_id" bson:"exe"`
	Opt    string `json:"opt" bson:"opt"`
}

type VirusSubTaskAndAgentJoinResult

type VirusSubTaskAndAgentJoinResult struct {
	VirusSubTaskDetail `json:",inline" bson:",inline"`
	InventoryDocs      []VirusSubTaskName `json:"inventory_docs" bson:"inventory_docs"`
}

type VirusSubTaskDetail

type VirusSubTaskDetail struct {
	TaskId     string `json:"task_id" bson:"task_id"`
	AgentId    string `json:"agent_id" bson:"agent_id"`
	Status     string `json:"status" bson:"status"`
	Hostname   string `json:"hostname" bson:"hostname"`
	UpdateTime int64  `json:"update_time" bson:"update_time"`
}

type VirusSubTaskDetailWithResult

type VirusSubTaskDetailWithResult struct {
	TaskId     string             `json:"task_id" bson:"task_id"`
	AgentId    string             `json:"agent_id" bson:"agent_id"`
	Status     string             `json:"status" bson:"status"`
	Hostname   string             `json:"hostname" bson:"hostname"`
	UpdateTime int64              `json:"update_time" bson:"update_time"`
	TaskResult VirusSubTaskResult `json:"task_result" bson:"task_result"`
}

type VirusSubTaskInfo

type VirusSubTaskInfo struct {
	TaskId  string `json:"task_id" bson:"task_id"`
	AgentId string `json:"agent_id" bson:"agent_id"`
	Token   string `json:"token" bson:"token"`
}

type VirusSubTaskListItem

type VirusSubTaskListItem struct {
	TaskId     string `json:"task_id" bson:"task_id"`
	AgentId    string `json:"agent_id" bson:"agent_id"`
	Status     string `json:"status" bson:"status"`
	Hostname   string `json:"hostname" bson:"hostname"`
	UpdateTime int64  `json:"update_time" bson:"update_time"`
	FailReason string `json:"fail_reason,omitempty" bson:"fail_reason,omitempty"`
}

type VirusSubTaskListRequest

type VirusSubTaskListRequest struct {
	TaskId   string   `json:"task_id" bson:"task_id"`
	Status   []string `json:"status,omitempty" bson:"status,omitempty"`
	Hostname string   `json:"hostname,omitempty" bson:"hostname,omitempty"`
}

type VirusSubTaskName

type VirusSubTaskName struct {
	AgentId  string `bson:"agent_id"`
	Hostname string `bson:"hostname"`
}

type VirusSubTaskResult

type VirusSubTaskResult struct {
	Msg string `json:"msg,omitempty" bson:"msg,omitempty"`
}

type VirusSubTaskWithResultAndAgentJoin

type VirusSubTaskWithResultAndAgentJoin struct {
	VirusSubTaskDetailWithResult `json:",inline" bson:",inline"`
	InventoryDocs                []VirusSubTaskName `json:"inventory_docs" bson:"inventory_docs"`
}

type VirusTaskDetail

type VirusTaskDetail struct {
	TaskDetail `json:",inline" bson:",inline"`
	FilePath   string `json:"file_path" bson:"file_path"`
}

type VirusTaskRunConfig

type VirusTaskRunConfig struct {
	FilePath string `json:"file_path,omitempty" bson:"file_path,omitempty"`
	CpuIdle  string `json:"cpu_idle,omitempty" bson:"cpu_idle,omitempty"`
	Timeout  string `json:"timeout,omitempty" bson:"timeout,omitempty"`
}

type VirusTaskRunningInfo

type VirusTaskRunningInfo struct {
	Tag              string             `json:"tag" bson:"tag"`
	IDList           []string           `json:"id_list" bson:"id_list"`
	TaskName         string             `json:"task_name" bson:"task_name"`
	TaskID           string             `json:"task_id" bson:"task_id"`
	TaskType         string             `json:"task_type" bson:"task_type"`
	TaskStatus       string             `json:"task_status" bson:"task_status"` //记录任务状态
	IDCount          float64            `json:"id_count" bson:"id_count"`
	DistributedCount int                `json:"distributed_count" bson:"distributed_count"` //下发总数,可能未执行完成
	Action           string             `json:"action" bson:"action"`
	TaskUser         string             `json:"task_user" bson:"task_user"`
	SubTaskCreated   int                `json:"sub_task_created" bson:"sub_task_created"`
	SubTaskRunning   int                `json:"sub_task_running" bson:"sub_task_running"`
	SubTaskFailed    int                `json:"sub_task_failed" bson:"sub_task_failed"`
	SubTaskSucceed   int                `json:"sub_task_succeed" bson:"sub_task_succeed"`
	CreateTime       int64              `json:"create_time" bson:"create_time"`
	UpdateTime       int64              `json:"update_time" bson:"update_time"`
	Config           VirusTaskRunConfig `json:"config" bson:"config"`
}

type WhiteListDelReq

type WhiteListDelReq struct {
	IdList []string `json:"id_list"`
}

############################### Data Struct ###############################

type WhiteListDelRspItem

type WhiteListDelRspItem struct {
	ID   string `json:"id" bson:"id"`
	Code int    `json:"code" bson:"code"`
	Msg  string `json:"msg" bson:"msg"`
}

type WhiteListUpdateReq

type WhiteListUpdateReq struct {
	ID       string `json:"id" bson:"id"`
	RuleName string `json:"white_rule_name" bson:"white_rule_name"`
	RuleDesc string `json:"white_rule_desc" bson:"white_rule_desc"`
}

Jump to

Keyboard shortcuts

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