Documentation ¶
Index ¶
- Constants
- Variables
- func InitClientHub()
- func InitDymaicClientHub()
- type ApiParams
- type BenchMarkLog
- type BenchMarkLogInterface
- type CasbinManager
- type Client
- type ClientGo
- type ClientModuleControl
- type Cluster
- func (this *Cluster) Add(isForce bool) Result
- func (this *Cluster) BaseList(from, limit int) (error, int64, []*Cluster)
- func (this *Cluster) Count() int64
- func (this *Cluster) Delete() Result
- func (this *Cluster) Get() *Cluster
- func (this *Cluster) GetRequiredSyncList() Result
- func (this *Cluster) List(from, limit int) Result
- func (this *Cluster) ListByAccount(from, limit int) Result
- func (this *Cluster) Update() Result
- type ClusterCheck
- type ClusterInterface
- type CmdHistory
- type CmdHistoryInterface
- type CmdHistoryList
- type ContainerConfig
- func (this *ContainerConfig) Add() Result
- func (this *ContainerConfig) Count() int64
- func (this *ContainerConfig) Delete() Result
- func (this *ContainerConfig) EmptyDirtyDataForAgent() error
- func (this *ContainerConfig) EmptyDirtyDataForK8s() error
- func (this *ContainerConfig) Get() *ContainerConfig
- func (this *ContainerConfig) GetContainerConfigList() []*ContainerConfig
- func (this *ContainerConfig) List(from, limit int, groupSearch bool) Result
- func (this *ContainerConfig) Update() Result
- type ContainerConfigInterface
- type ContainerInfo
- type ContainerInfoInterface
- type ContainerPs
- type ContainerPsInterface
- type ContainerVirus
- type DcokerIds
- type DcokerIdsInterface
- type Deployment
- type DeploymentInterface
- type DisposalMode
- type DisposalModeInterface
- type DockerEvent
- type DockerEventInterface
- type DockerVulnerabilities
- type DockerVulnerabilitiesScanInterface
- type DymaicClient
- type FileInfo
- type GoRoutineManager
- type GroupInterface
- type Groups
- type HeartBeat
- type HostConfig
- func (this *HostConfig) Add() error
- func (this *HostConfig) BaseList(from, limit int) (error, int64, []*HostConfig)
- func (this *HostConfig) Count() int64
- func (this *HostConfig) Delete() Result
- func (this *HostConfig) Get() *HostConfig
- func (this *HostConfig) GetBenchMarkProportion() (int64, int64)
- func (this *HostConfig) GetDissCountProportion() (int64, int64)
- func (this *HostConfig) GetOnlineProportion() (int64, int64)
- func (this *HostConfig) List(from, limit int) Result
- func (this *HostConfig) RestoreKubeBenchSummary()
- func (this *HostConfig) Update() Result
- func (this *HostConfig) UpdateDynamic() Result
- func (this *HostConfig) UpdateHostCISCount(benchMarkSummary MarkSummary)
- type HostConfigInterface
- type HostInfo
- type HostInfoInterface
- type HostPackage
- type HostPackageInterface
- type HostPackageList
- type HostPs
- type HostPsInterface
- type Hub
- type ImageBlocking
- type ImageBlockingInterface
- type ImageConfig
- func (this *ImageConfig) Add() Result
- func (this *ImageConfig) Count() int64
- func (this *ImageConfig) Delete() Result
- func (this *ImageConfig) Get() *ImageConfig
- func (this *ImageConfig) GetDBCountByType() Result
- func (this *ImageConfig) GetDBImageByType() Result
- func (this *ImageConfig) List(from, limit int) Result
- func (this *ImageConfig) Update() Result
- type ImageConfigInterface
- type ImageDetail
- type ImageDetailInterface
- type ImageInfo
- type ImageInfoInterface
- type ImageVirus
- type ImageVulnerabilities
- type ImageVulnerabilitiesInterface
- type IntrudeDetectLog
- type Job
- type JobInterface
- type KubeScan
- type KubeScanInterface
- type KubeVulnerabilities
- type KubeVulnerabilitiesInterface
- type KubernetesClientManager
- type KubernetesHandler
- type LDAPConfig
- type LDAPManager
- type LDAPUser
- type LicenseConfig
- type LicenseConfigInterface
- type LicenseHistory
- type LicenseHistoryInterface
- type LicenseModule
- type LinceseModuleInterface
- type LogConfig
- type LogConfigInterface
- type MailServerConfig
- type MailServerManager
- type MarkSummary
- type Module
- type ModuleInterface
- type NameSpace
- func (this *NameSpace) Add(update bool) Result
- func (this *NameSpace) BindAccount() Result
- func (this *NameSpace) Delete() Result
- func (this *NameSpace) EmptyDirtyData() error
- func (this *NameSpace) List(from, limit int) Result
- func (this *NameSpace) ListByAccountGroupByClusterId() (error, []string)
- func (this *NameSpace) UnBindAccount() Result
- func (this *NameSpace) Update() Result
- type NameSpaceInterface
- type NatsData
- type NatsManager
- type NetworkPolicy
- type NetworkPolicyInterface
- type PackageInfo
- type Pod
- type PodInterface
- type Registry
- func (this *Registry) Add() Result
- func (this *Registry) Count() int64
- func (this *Registry) Delete() Result
- func (this *Registry) Get() Result
- func (this *Registry) GetAccount() int64
- func (this *Registry) GetName() int64
- func (this *Registry) List(from, limit int) Result
- func (this *Registry) Update() Result
- type RegistryInterface
- type RespCenter
- type RespCenterInterface
- type Result
- type Role
- func (this *Role) Add() Result
- func (this *Role) AddPolicy() Result
- func (this *Role) AddUsers() Result
- func (this *Role) Delete() Result
- func (this *Role) Get() (*Role, error)
- func (this *Role) List(from, limit int) Result
- func (this *Role) PolicyList() Result
- func (this *Role) RemovePolicy() Result
- func (this *Role) RemoveUsers() Result
- func (this *Role) RoleList(from, limit int) (roleLists []*Role, count int64, err error)
- func (this *Role) Update() Result
- func (this *Role) UpdatePolicy() Result
- type RoleInterface
- type RuleDefine
- func (this *RuleDefine) Add() Result
- func (this *RuleDefine) Delete() Result
- func (this *RuleDefine) Get() (*RuleDefine, error)
- func (this *RuleDefine) List(from, limit int) Result
- func (this *RuleDefine) RuleDefineList(from, limit int) (ruleLists []*RuleDefine, count int64, err error)
- func (this *RuleDefine) Update() Result
- type RuleDefineInterface
- type SecurityCheck
- type SecurityCheckList
- type SecurityCheckParams
- type SensitiveInfo
- type SensitiveInfoInterface
- type Service
- type ServiceInterface
- type SysConfig
- type SysConfigInterface
- type SystemTemplate
- func (this *SystemTemplate) Add() Result
- func (this *SystemTemplate) Delete() Result
- func (this *SystemTemplate) Get() (*SystemTemplate, error)
- func (this *SystemTemplate) GetDefaultTemplate() map[string]*SystemTemplate
- func (this *SystemTemplate) List(from, limit int) Result
- func (this *SystemTemplate) Update() Result
- type SystemTemplateGroup
- type SystemTemplateGroupInterface
- type SystemTemplateInterface
- type Task
- func (this *Task) Add() Result
- func (this *Task) Delete() Result
- func (this *Task) Get() *Task
- func (this *Task) GetCurrentBatchTaskList() (error, []*Task)
- func (this *Task) GetTaskList() []*Task
- func (this *Task) GetUnFinishedTaskList() Result
- func (this *Task) List(from, limit int) Result
- func (this *Task) Update() Result
- type TaskInterface
- type TaskLog
- type TaskLog1Interface
- type TaskLogInterface
- type TenantImage
- type TimeEdgePoint
- type TimeEdgePointInterface
- type UpdateAssets
- type User
- func (this *User) Add() Result
- func (this *User) AddRole() Result
- func (this *User) Delete() Result
- func (this *User) Get() (*User, error)
- func (this *User) List(from, limit int) Result
- func (this *User) RemoveRole() Result
- func (this *User) Update() Result
- func (this *User) UpdateRole() Result
- func (this *User) UserList(from, limit int) (userLists []*User, count int64, err error)
- type UserEvent
- type UserEventInterface
- type UserInterface
- type Version
- type VirusRecord
- type VirusRecordInterface
- type VirusScan
- type VirusScanInterface
- type VirusScanRecord
- type VulnerRule
- type Vulnerabilities
- type VulnerabilitiesInterface
- type VulnerabilityLib
- func (this *VulnerabilityLib) Add() Result
- func (this *VulnerabilityLib) Delete() Result
- func (this *VulnerabilityLib) Get() (*VulnerabilityLib, error)
- func (this *VulnerabilityLib) List(from, limit int) Result
- func (this *VulnerabilityLib) Update() Result
- func (this *VulnerabilityLib) VulnerabilityList(from, limit int) ([]*VulnerabilityLib, int64, error)
- type VulnerabilityLibInterface
- type WSManager
- type WarningInfo
- type WarningInfoInterface
- type WarningWhiteList
- func (this *WarningWhiteList) Add() Result
- func (this *WarningWhiteList) Delete() Result
- func (this *WarningWhiteList) Get() (*WarningWhiteList, error)
- func (this *WarningWhiteList) List(from, limit int) Result
- func (this *WarningWhiteList) Update() Result
- func (this *WarningWhiteList) WhiteList(from, limit int) (whiteLists []*WarningWhiteList, count int64, err error)
- type WarningWhiteListInterface
Constants ¶
View Source
const ( // #################### Nats 通信资源 Resource_HostConfigDynamic = "HostConfigDynamic" // 主机配置数据 Resource_HostInfoDynamic = "HostInfoDynamic" // 主机详细数据 Resource_HostConfig = "HostConfig" // 主机配置据 Resource_HostInfo = "HostInfo" // 主机详细数据 Resource_ImageConfig = "ImageConfig" // 镜像配置据 Resource_ImageInfo = "ImageInfo" // 镜像详细数据 Resource_ImageDetail = "ImageDetail" // 镜像详情 Resource_ContainerConfig = "ContainerConfig" // 容器配置数据 Resource_ContainerInfo = "ContainerInfo" // 容器详细数据 Resource_ContainerPs = "ContainerPs" // 容器进程数据 Resource_HostPs = "HostPs" // 主机进程数据 Resource_DockerBenchMark = "DockerBenchMark" // docker基线数据 Resource_KubernetesBenchMark = "KubernetesBenchMark" // k8s 基线数据 Resource_HostCmdHistory = "HostCmdHistory" // 主机命令历史数据 Resource_ContainerCmdHistory = "ContainerCmdHistory" // 容器命令历史数据 Resource_HostImageVulnScan = "HostImageVulnScan" // 主机镜像扫描 Resource_NameSpace = "NameSpace" // k8s 命名空间 Resource_Pod = "Pod" // k8s Pod Resource_HeartBeat = "HeartBeat" // 心跳 Resource_Received = "Received" // 已接受 Resource_Task = "Task" // 任务 Resource_DockerEvent = "DockerEvent" // docker 审计 Resource_CmdHistory_LatestTime = "CmdHistory_LatestTime" // 命令历史最新上报时间 Resource_DockerEvent_LatestTime = "DockerEvent_LatestTime" // docker 审计最新上报时间 Resource_WarningInfo = "WarningInfo" // 告警 Resource_HostPackage = "HostPackage" // 主机包 Resource_ClientModuleControl = "ClientModuleControl" // 客户端模块控制 Resource_ContainerVS = "ContainerVirusScan" // 容器杀毒数据 Resource_HostVS = "HostVirusScan" // 主机杀毒数据 Resource_ImageVS = "ImageVirusScan" // 镜像杀毒数据 Resource_SensitiveInfo = "SensitiveInfo" // 敏感信息数据 Resource_DockerVulnerability = "DockerVulnerability" // docker漏洞数据 Resource_Authorization = "Authorization" // 授权数据 Resource_AssetData = "Assets" // 资产数据 // #################### (Type)Nats Type 通信类型 Type_Metric = "Metric" //指标类型 Type_ReceiveState = "ReceiveState" //接收状态类型 Type_RequestState = "RequestState" //请求状态类型 Type_Control = "Control" //控制类型 Type_Config = "Config" //配置类型 Resource_ContainerControl = "ContainerControl" // 容器控制 Resource_ContainerControlStatus = "ContainerControlStatus" // 响应中心状态 Image_Control = "ImageControl" // 镜像阻断控制 Image_ControlStatus = "ImageControlStatus" // 镜像阻断控制状态 // #################### (Config)Nats Config 配置标识 Config_RuleDefineList = "RuleDefineList" // #################### (ResourceControlType)Nats RCType 资源操作类型 Resource_Control_Type_Get = "Get" Resource_Control_Type_Post = "Post" Resource_Control_Type_Put = "Put" Resource_Control_Type_Delete = "Delete" )
Variables ¶
View Source
var ( WSHub *Hub Nats *NatsManager GRM *GoRoutineManager KCM *KubernetesClientManager MSM *MailServerManager LM *LDAPManager CPM *http.Server GlobalCasbin *CasbinManager )
View Source
var ( // Global All = "All" Result_Items = "items" Result_Total = "total" // k8s Cluster_Sync_Status_NotSynced = "NotSynced" Cluster_Sync_Status_Synced = "Synced" Cluster_Sync_Status_InProcess = "InProcess" Cluster_Sync_Status_Clearing = "Clearing" Cluster_Sync_Status_Fail = "Fail" Cluster_Watch_Status_Fail = "Fail" Cluster_Watch_Status_Success = "Success" Cluster_IsSync = true Cluster_NoSync = false Cluster_Status_Active = "Active" Cluster_Type_Kubernets = "Kubernets" Cluster_Type_OpenShift = "OpenShift" Cluster_Type_Rancher = "Rancher" Api_Auth_Type_KubeConfig = "KubeConfig" Api_Auth_Type_BearerToken = "BearerToken" Cluster_Data_AccountName = "Kubernetes" Clster_Node_Label_Control_Rancher = "node-role.kubernetes.io/controlplane" Clster_Node_Label_Master = "node-role.kubernetes.io/master" Clster_Node_Label_Worker = "node-role.kubernetes.io/worker" Clster_Node_Roler_All = "All" Clster_Node_Roler_Worker = "Worker" Clster_Node_Roler_Master = "Master" Network_Policy_Type_Value_Allow = "Allow" Network_Policy_Type_Value_AllowAll = "AllowAll" Network_Policy_Type_Value_Refuse = "Refuse" Network_Policy_Type_Ingress = "Ingress" Network_Policy_Type_Egress = "Egress" Cluster_Scope_InternalUrl = "InternalUrl" Cluster_Scope_PublicUrl = "PublicUrl" Cluster_Scope_UrlPort = "32666" Cluster_Scope_Operator_Status_ActiveFail = "ActiveFail" Cluster_Scope_Operator_Status_Actived = "Actived" Cluster_Scope_Operator_Status_Activing = "Activing" Cluster_Scope_Operator_Status_DisableFail = "DisableFail" Cluster_Scope_Operator_Status_Disabled = "Disabled" Cluster_Scope_Operator_Status_Disableing = "Disabling" Cluster_Scope_Operator_Status_Null = "" Prefix_Kube_Scan = "diss-kube-scan" Cmd_History_Type_Host = "Host" Cmd_History_Type_Container = "Container" //容器状态 Container_Status_Run = "Run" Container_Status_Pause = "Pause" Container_Status_All = "All" // 主机相关状态 Host_Docker_Status_Nornal = "Normal" Host_Docker_Status_Abnormal = "Abnormal" Host_Type_Server = "Server" Host_Type_Vm = "Vm" Host_Status_Normal = "Normal" Host_Status_Abnormal = "Abnormal" // 主机-安全容器状态 Diss_Installed = "Installed" Diss_NotInstalled = "NotInstalled" // 主机-安全状态 Diss_status_Safe = "Safe" Diss_Status_Unsafe = "Unsafe" //// 系统魔板类型(此处和ws resource tag 保持一致,和授权模块关联) // 镜像扫描: TMP_Type_ImageVulnScan = "ImageVulnScan" TMP_Type_HostImageVulnScan = "HostImageVulnScan" TMP_Type_KubernetesVulnScan = "KubernetesVulnScan" TMP_Type_DockerVulnScan = "DockerVulnScan" //基线扫描: TMP_Type_BM_Docker = "DockerBenchMark" TMP_Type_BM_K8S = "KubernetesBenchMark" //入侵扫描 TMP_Type_IDS_Docker = "DockerIntrudeDetectScan" TMP_Type_IDS_Host = "HostIntrudeDetectScan" //安全审计 TMP_Type_DockerSecurityAudit = "DockerSecurityAudit" TMP_Type_KubernetesSecurityAudit = "KubernetesSecurityAudit" TMP_Type_CommandSecurityAudit = "CommandSecurityAudit" //病毒扫描: TMP_Type_ContainerVS = "ContainerVirusScan" TMP_Type_HostVS = "HostVirusScan" TMP_Type_ImageVS = "ImageVirusScan" //漏洞扫描 TMP_Type_LS = "SC_LeakScan" TMP_Status_Enable = "Enable" TMP_Status_Disable = "Disable" Job_Status_Active = "Active" Job_Status_Deactiving = "Deactiving" Job_Status_Deactived = "Deactived" //安全检查类型 SC_Type_Host = "host" Sc_Type_Container = "container" Sc_Type_Image = "image" Sc_Type_Cluster = "cluster" // 任务状态 Task_Status_Created = "Created" Task_Status_Pending = "Pending" Task_Status_Running = "Running" Task_Status_Removing = "Removing" Task_Status_Pause = "Pause" Task_Status_Finished = "Finished" Task_Status_Failed = "Failed" Task_Status_Deliver_Failed = "DeliverFailed" Task_Status_Received = "Received" Task_Status_Receive_Failed = "ReceiveFailed" // 任务类型 Task_Type_KubenetesCIS = "KubenetesCIS" Task_Type_DockerCIS = "DockerCIS" Task_Type_ImageVulnScan = "ImageVulnScan" Task_Type_HostImageVulnScan = "HostImageVulnScan" Task_Type_RepoVulnScan = "RepoVulnScan" Task_Type_FileVulnScan = "FileVulnScan" Task_Type_ContainerVirusScan = "ContainerVirusScan" Task_Type_HostVirusScan = "HostVirusScan" Task_Type_ImageVirusScan = "ImageVirusScan" //任务操作 Task_Action_Deactive = "Deactive" //任务类型 Job_Type_Once = "Once" Job_Type_Periodic = "Periodical" //任务级别 Job_Level_System = "System" // 系统级 Job_Level_User = "User" // 用户级 //基线日志类型 BMLT_Host_All = "host" BMLT_Docker = "docker" BMLT_K8s = "k8s" BML_Template_ALL = "All" BML_Level_ALL = "All" BML_Level_High = "High" BML_Level_Medium = "Medium" BML_Level_Low = "Low" BML_Result_ALL = "All" BML_Result_Pass = "Pass" BML_Result_Fail = "Fail" // 入侵检测类型 IDLT_Docker = "container" IDLT_Host = "host" // 分组类型 Group_Type_Host = "Host" Group_Type_Container = "Container" // 租户 Account_Admin = "admin" // nats subject (diss-backend 主题, agent 则以主机id区分标识) Subject_Common = "Common" Subject_Image_Safe = "IMAGE_SAFE" Subject_IntrudeDetect = "INTRUDE_DETECT" Subject_Cluster = "Cluster" // 告警信息类型 WarningInfo_File = "ALERT_TYPE_FILE" WarningInfo_Other = "ALERT_TYPE_OTHER" WarningInfo_Process = "ALERT_TYPE_PROCESS" WarningInfo_Container = "ALERT_TYPE_CONTAINER" WarningInfo_Image = "ALERT_TYPE_IMAGE" WarningInfo_MailError = "ALERT_MAIL_ERROR" // 告警信息级别 WarningLevel_High = "ALERT_SEVERITY_HIGH" WarningLevel_Medium = "ALERT_SEVERITY_MEDIUM" WarningLevel_Low = "ALERT_SEVERITY_LOW" //告警信息状态 WarningStatus_Not_Dealed = "未处理" // 日志级别 Log_level_Debug = "Debug" Log_level_Info = "Info" Log_level_Warn = "Warn" Log_level_Error = "Error" // kubernetes 相关 Kubernetes_Object_Spec = "Spec" Kubernetes_Object_MetaData = "MetaData" // diss-api //漏洞安全等级 Vulnerabilities_Severity_Medium = "Medium" Vulnerabilities_Severity_Negligible = "Negligible" Vulnerabilities_Severity_Low = "Low" Vulnerabilities_Severity_Critical = "Critical" // log type tag LogToEmail_Prefix = "日志导出" LogType_BenchMarkLog = "BenchmarkLog" // 基线扫描日志 LogType_ImageSecLog = "ImageSecurityLog" // 镜像安全日志 LogType_ContainerVirusLog = "ContainerVirusLog" // 容器杀毒日志 LogType_IntrudeDetectLog = "IntrudeDetectLog" // 入侵检测日志 LogType_ContainerSecAuditLog = "ContainerSecurityAuditLog" // 容器安全审计日志 LogType_CommandSecAuditLog = "CommandSecurityAuditLog" // 命令安全审计日志 LogSubType_DockerEvent = "DockerEvent" // DockerEvent子类型(容器安全审计下) // license type LicType_TrialLicense = "TrialLicense" LicType_StandardLicense = "StandardLicense" LicFile_Extension = ".lic" LicFileTemp_Extension = ".lictmp" LicModuleType_BenchMark = "BenchMark" EncryptedFileType_License = "license" EncryptedFileType_FeatureCode = "featureCode" // 系统配置类型 FeatureCode = "FeatureCode" EmailServerConfig = "EmailServerConfig" LDAPClientConfig = "LDAPClientConfig" Login_Type_LDAP = "LDAP" Login_Type_DEV = "DEV" Login_Type_LOCAL = "LOCAL" // LogConfigs Log_Config_SysLog_Export = "SysLogExport" Log_Config_To_Mail = "LogToMail" MailServer_Not_Available_Msg = "邮箱服务器不可用" Mail_CanNotSend_Msg = "邮件发送不成功" // 告警邮件字段定义 MailField_Subject = "Subject" MailField_LogType = "LogType" MailField_InfoSubType = "InfoSubType" MailField_Body = "Body" MailField_From = "From" MailField_To = "To" MailServerStatus_Normal = "Normal" MailServerStatus_Abnormal = "Abnormal" // system config Enable = "Enable" Null_Time = "0001-01-01 00:00:00 +0000 UTC" // time and zone CstZone = time.FixedZone("CST", 8*3600) DefaultStartTimeStamp int64 = 1514736000000000000 // db image type DB_Image_type_Mysql = "Mysql" DB_Image_type_Oracle = "Oracle" DB_Image_type_Redis = "Redis" DB_Image_type_Postgres = "Postgres" DB_Image_type_Mongodb = "Mongodb" DB_Image_type_Memcache = "Memcache" DB_Image_type_DB2 = "DB2" DB_Image_type_Hbase = "Hbase" // ============== anchore engine ============== // 镜像漏洞等级 Image_vuln_Severity_Low = "Low" Image_vuln_Severity_Medium = "Medium" // 镜像 content 类型 Image_Content_Type_OS = "os" Image_Vuln_Type_All = "all" Image_Metadata_Type_Manifest = "manifest" // white list WarnWhiteListConfigKey = "WarnWhiteList" WarnWhiteListCnTrans_Node = []string{"节点", "node"} WarnWhiteListCnTrans_ContainerId = []string{"容器ID", "container\\.id"} WarnWhiteListCnTrans_ContainerName = []string{"容器名称", "container\\.name"} WarnWhiteListCnTrans_CmdLine = []string{"执行命令", "proc\\.cmdline"} WarnWhiteListOuterKey_IP = "HostIP" WarnWhiteListOuterKey_Container = "ContainerId" PictureType = "image/png" TextType = "text/plain" WarnInfoStatus = "已处理" FailStatus = "处理失败" // status Status = "Processed Success" // resp center operation Container = "Container" //const key StatusKey = "Status" //const key WarningInfoId = "WarningInfoId" // Image Blocking operation ClearImage = "ClearImage" CIS_FailCount = "FailCount" CIS_InfoCount = "InfoCount" CIS_PassCount = "PassCount" CIS_WarnCount = "WarnCount" // RuleDefine Type RuleType_Sensitive = "SensitiveRule" RuleType_DockerVulnerability = "DockerVulnerabilityRule" //Registry Type Registry_Type_Harbor = "Harbor" Registry_Type_DockerRegistry = "DockerRegistry" Registry_Type_AlibabaACR = "AlibabaACR" Registry_Type_AwsECR = "AwsECR" Registry_Type_AzureACR = "AzureACR" Registry_Type_ArtifactHub = "ArtifactHub" Registry_Type_DockerHub = "DockerHub" Registry_Type_GithubGHCR = "GithubGHCR" Registry_Type_Gitlab = "Gitlab" Registry_Type_GoogleGCR = "GoogleGCR" Registry_Type_HuaweiSWR = "HuaweiSWR" Registry_Type_JFrogArtifactory = "JFrogArtifactory" Registry_Type_Quay = "Quay" Registry_Type_TencentTCR = "TencentTCR" // Language Language_Cn = "zh-cn" Language_En = "en-us" // 容器状态 Container_Status_Created = "Created" Container_Status_Pending = "Pending" Container_Status_Waiting = "Waiting" Container_Status_Running = "Running" Container_Status_Succeeded = "Succeeded" Container_Status_Terminated = "Terminated" Container_Status_Failed = "Failed" Container_Status_Exited = "Exited" Container_Status_Unknown = "Unknown" // 风险等级 SEVERITY_Critical = "CRITICAL" SEVERITY_High = "HIGH" SEVERITY_Medium = "MEDIUM" SEVERITY_Low = "LOW" SEVERITY_Unknown = "UNKNOWN" // 入侵 ReverseShell = "ALERT_TYPE_REVERSE_SHELL" ContainerEscalation = "ALERT_TYPE_CONTAINER_ESCALATION" Shell = "ALERT_TYPE_WEBSHELL" PrivilegeEscalation = "ALERT_TYPE_PRIVILEGE_ESCALATION" VulnExploit = "ALERT_TYPE_VULN_EXPLOIT" SuspiciousConnection = "ALERT_TYPE_SUSPICIOUS_CONNECTION" SuspiciousProcess = "ALERT_TYPE_SUSPICIOUS_PROCESS" NetAttack = "ALERT_TYPE_NET_ATTACK" K8sAudit = "ALERT_TYPE_K8S_AUDIT" TrojanVirus = "ALERT_TYPE_TROJAN_VIRUS" SuspiciousLogin = "ALERT_TYPE_SUSPICIOUS_LOGIN" TypeScanning = "ALERT_TYPE_SCANNING" BruteForce = "ALERT_TYPE_BRUTE_FORCE" OTHER = "ALERT_TYPE_OTHER" // Auth System_Role = "admin" Permission_AuthManage = "AuthManage" SpecialChars = "*&^%$#-=+_\\[\\]\\{\\}\\!\\<\\>\\@\\~\\|\\?\\/\\\\" )
View Source
var GlobalLogConfig = map[string]*LogConfig{}
Functions ¶
func InitClientHub ¶
func InitClientHub()
func InitDymaicClientHub ¶
func InitDymaicClientHub()
Types ¶
type ApiParams ¶
func BuildApiParams ¶
type BenchMarkLog ¶
type BenchMarkLog struct { Id string `orm:"pk;" description:"(基线id)"` BenchMarkName string `orm:"" description:"(基线模版名称)"` BenchMarkType string `orm:"" description:"(基线模版类型,DockerBenchMark 和 KubernetesBenchMark)"` Level string `orm:"" description:"(级别 info warn fail pass)"` ProjectName string `orm:"" description:"(测试项目)"` HostName string `orm:"" description:"(主机名称)"` HostId string `orm:"" description:"(主机Id)"` InternalAddr string `orm:"" description:"(主机ip 内)"` PublicAddr string `orm:"" description:"(主机ip 外)"` OS string `orm:"" description:"(系统)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` FailCount int `orm:"" description:"(检查失败个数, kubeCIS)"` WarnCount int `orm:"" description:"(检查警告个数, dockerCIS和kubeCIS)"` PassCount int `orm:"" description:"(检查通过个数, dockerCIS和kubeCIS)"` InfoCount int `orm:"" description:"(检查提示个数, dockerCIS和kubeCIS)"` NoteCount int `orm:"" description:"(检查Note个数, dockerCIS)"` RawLog string `orm:"" description:"(结果原始内容)"` Type string `orm:"" description:"(分类)"` Result string `orm:"" description:"(测试结果)"` IsInfo bool `orm:"-" description:"(是否取日志原始内容)"` TaskId string `orm:"size(64)" description:"(任务ID)"` }
func (*BenchMarkLog) Add ¶
func (this *BenchMarkLog) Add() Result
func (*BenchMarkLog) Get ¶
func (this *BenchMarkLog) Get() (*BenchMarkLog, error)
func (*BenchMarkLog) GetHostMarkSummary ¶
func (this *BenchMarkLog) GetHostMarkSummary() Result
func (*BenchMarkLog) GetMarkSummary ¶
func (this *BenchMarkLog) GetMarkSummary() Result
func (*BenchMarkLog) List ¶
func (this *BenchMarkLog) List(from, limit int) Result
type BenchMarkLogInterface ¶
type CasbinManager ¶
type CasbinManager struct {
Enforcer *casbin.Enforcer
}
func NewCasbinManager ¶
func NewCasbinManager() *CasbinManager
func (*CasbinManager) CheckPermisson ¶
func (this *CasbinManager) CheckPermisson() beego.FilterFunc
type ClientGo ¶
type ClientGo struct { ClientSet *kubernetes.Clientset ErrMessage string }
func CreateK8sClient ¶
type ClientModuleControl ¶
客户端模块控制模型(虚拟模型)
type Cluster ¶
type Cluster struct { Id string `orm:"pk" description:"(集群id)"` Name string `orm:"unique;size(32)" description:"(集群名)"` FileName string `orm:"size(255)" description:"(KubeConfig 文件)"` AuthType string `orm:"size(32);default(BearerToken)" description:"(认证类型 KubeConfig BearerToken)"` BearerToken string `orm:"" description:"(Token)"` MasterUrls string `orm:"size(255)" description:"(ApiServer 访问地址)"` Status string `orm:"size(32);default(Active)" description:"(集群状态 Active Unavailable)"` Type string `orm:"size(32);default(Kubernetes)" description:"(类型 Kubernetes Openshift Rancher)"` IsSync bool `orm:"default(false)" description:"(是否同步)"` Label string `orm:"size(64);default(null)" description:"(标签)"` ScopeUrl string `orm:"size(512);default()" description:"(scope访问地址)"` SocpeStatus string `orm:"size(64);default()" description:"(scope 操作状态)"` AccountName string `orm:"-" description:"(租户)"` SyncStatus string `` /* 138-byte string literal not displayed */ KubeVulnCount int `orm:"default(0)" description:"(kubescan vuln count)"` CreateTime int64 `orm:"" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` }
func (*Cluster) GetRequiredSyncList ¶
func (*Cluster) ListByAccount ¶
type ClusterCheck ¶
type ClusterInterface ¶
type CmdHistory ¶
type CmdHistory struct { Id string `orm:"pk;size(64)" description:"(id)"` HostId string `orm:"size(64)" description:"(主机id)"` HostName string `orm:"size(64)" description:"(主机名)"` ContainerId string `orm:"size(256)" description:"(容器id)"` ContainerName string `orm:"size(256)" description:"(容器名)"` User string `orm:"size(32)" description:"(用户)"` Command string `orm:"" description:"(命令)"` CreateTime int64 `orm:"default(0);" description:"(更新时间)"` Type string `orm:"default(Host);size(32)" description:"(类型 Host Container)"` StartTime int64 `orm:"-;default(0)" description:"(开始时间)"` EndTime int64 `orm:"-;default(0)" description:"(结束时间)"` }
func (*CmdHistory) Add ¶
func (this *CmdHistory) Add() Result
func (*CmdHistory) Delete ¶
func (this *CmdHistory) Delete() Result
func (*CmdHistory) GetLatestTime ¶
func (this *CmdHistory) GetLatestTime() Result
func (*CmdHistory) List ¶
func (this *CmdHistory) List(from, limit int) Result
type CmdHistoryInterface ¶
type CmdHistoryList ¶
type CmdHistoryList struct {
List []*CmdHistory
}
type ContainerConfig ¶
type ContainerConfig struct { Id string `orm:"pk;" description:"(id)"` Name string `orm:"" description:"(容器名)"` NameSpaceName string `orm:"" description:"(命名空间)"` PodId string `orm:"default(null)" description:"(pod id)"` PodName string `orm:"default(null)" description:"(pod 名)"` HostName string `orm:"" description:"(主机名)"` HostId string `orm:"" description:"(主机id)"` AccountName string `orm:"" description:"(租户)"` ClusterName string `orm:"" description:"(集群名)"` SyncCheckPoint int64 `orm:"default(0);" description:"(同步检查点)"` Status string `orm:"default(null);" description:"(状态)"` Command string `orm:"default(null);" description:"(命令)"` ImageName string `orm:"default(null);" description:"(镜像名)"` Age string `orm:"null;" description:"(运行时长)"` CreateTime int64 `orm:"default(0);" description:"(创建时间);"` UpdateTime int64 `orm:"default(0);" description:"(更新时间);"` TaskList []*Task `orm:"reverse(many);null" description:"(任务列表)"` Job []*Job `orm:"rel(m2m);null;" description:"(job)"` }
func (*ContainerConfig) Add ¶
func (this *ContainerConfig) Add() Result
func (*ContainerConfig) Count ¶
func (this *ContainerConfig) Count() int64
func (*ContainerConfig) Delete ¶
func (this *ContainerConfig) Delete() Result
func (*ContainerConfig) EmptyDirtyDataForAgent ¶
func (this *ContainerConfig) EmptyDirtyDataForAgent() error
func (*ContainerConfig) EmptyDirtyDataForK8s ¶
func (this *ContainerConfig) EmptyDirtyDataForK8s() error
func (*ContainerConfig) Get ¶
func (this *ContainerConfig) Get() *ContainerConfig
func (*ContainerConfig) GetContainerConfigList ¶
func (this *ContainerConfig) GetContainerConfigList() []*ContainerConfig
func (*ContainerConfig) List ¶
func (this *ContainerConfig) List(from, limit int, groupSearch bool) Result
func (*ContainerConfig) Update ¶
func (this *ContainerConfig) Update() Result
type ContainerInfo ¶
type ContainerInfo struct { Id string `orm:"pk;" description:"(id)"` Name string `orm:"" description:"(名称)"` NameSpaceName string `orm:"" description:"(命名空间)"` PodId string `orm:"" description:"(Pod Id)"` PodName string `orm:"" description:"(Pod 名称)"` ImageId string `orm:"" description:"(imageId)"` ImageName string `orm:"" description:"(image名称)"` HostId string `orm:"" description:"(主机id)"` HostName string `orm:"" description:"(主机名)"` ClusterName string `orm:"" description:"(集群名)"` SyncCheckPoint int64 `orm:"default(0);" description:"(同步检查点)"` Command string `orm:"default(null);" description:"(命令)"` StartedAt int64 `orm:"default(0);" description:"(启动时间)"` CreatedAt int64 `orm:"default(0);" description:"(创建时间)"` Status string `orm:"default(null);" description:"(状态)"` Ports string `orm:"default(null);" description:"(端口)"` Ip string `orm:"default(null);" description:"(ip)"` Labels string `orm:"default(null);" description:"(标签)"` Volumes string `orm:"default(null);" description:"(Volumes)"` Mounts string `orm:"default(null);" description:"(Mounts)"` }
func (*ContainerInfo) Add ¶
func (this *ContainerInfo) Add() Result
func (*ContainerInfo) Delete ¶
func (this *ContainerInfo) Delete() Result
func (*ContainerInfo) EmptyDirtyDataForAgent ¶
func (this *ContainerInfo) EmptyDirtyDataForAgent() error
func (*ContainerInfo) EmptyDirtyDataForK8s ¶
func (this *ContainerInfo) EmptyDirtyDataForK8s() error
func (*ContainerInfo) List ¶
func (this *ContainerInfo) List() Result
func (*ContainerInfo) Update ¶
func (this *ContainerInfo) Update() Result
type ContainerInfoInterface ¶
type ContainerPs ¶
type ContainerPs struct { Id string `orm:"pk;" description:"(id)"` HostId string `orm:"" description:"(主机id)"` PID int `orm:"column(pid)" description:"(PID)"` User string `orm:"" description:"(用户)"` ContainerId string `orm:"" description:"(容器id)"` CPU float64 `orm:"column(cpu)" description:"(CPU)"` Mem float64 `orm:"" description:"(内存)"` Time string `orm:"" description:"(时间)"` Start string `orm:"" description:"(运行时长 非mac)"` Started string `orm:"" description:"(运行时长 mac)"` Command orm.TextField `orm:"" description:"(Command)"` Sort string `orm:"-" description:"(排序)"` }
func (*ContainerPs) Add ¶
func (this *ContainerPs) Add() Result
func (*ContainerPs) Delete ¶
func (this *ContainerPs) Delete() Result
func (*ContainerPs) List ¶
func (this *ContainerPs) List(from, limit int) Result
func (*ContainerPs) Update ¶
func (this *ContainerPs) Update() Result
type ContainerPsInterface ¶
type ContainerVirus ¶
type ContainerVirus struct { HostId string `description:"(主机id)"` ContainerId string `description:"(容器id)"` FileName string `description:"(文件名)"` Virus string `description:"(病毒)"` FileHash string `description:"(文件hash)"` FileSize int64 `description:"(文件大小)"` CreatedAt int64 `description:"(创建时间)"` LastUpdated int64 `description:"(更新时间)"` TargeType string `description:"(类型)"` }
type DcokerIds ¶
type DcokerIds struct { HostId string `orm:"pk" description:"(主机id)"` HostName string `description:"(主机名)"` MachineId string `description:"(Machine_id)"` ContainerId string `description:"(容器id)"` Time int64 `description:"(日志生成时间)"` Priority string `description:"(安全等级)"` Rule string `description:"(规则)"` Output string `description:"(事件信息)"` OutputFields string `description:"(Output json)"` CreatedAt int `description:"(日志保存时间)"` }
入侵检测日志(IntrudeDetectLog) 保存于 timescaledb
func (*DcokerIds) GetIntrudeDetectLogStatistics ¶
type DcokerIdsInterface ¶
type Deployment ¶
type Deployment struct { Id string `orm:"pk;" description:"(id)"` Name string `orm:"size(128)" description:"(Deployment名)"` AccountName string `orm:"size(32)" description:"(租户)"` NameSpaceName string `orm:"size(255);default(null);" description:"(命名空间)"` HostName string `orm:"size(64);default(null);" description:"(主机名)"` ClusterName string `orm:"size(32)" description:"(集群名)"` KMetaData string `orm:"" description:"(源数据)"` KSpec string `orm:"" description:"(Spec数据)"` KStatus string `orm:"" description:"(状态数据)"` }
func (*Deployment) Add ¶
func (this *Deployment) Add() Result
func (*Deployment) Delete ¶
func (this *Deployment) Delete() Result
func (*Deployment) List ¶
func (this *Deployment) List(from, limit int) Result
func (*Deployment) Update ¶
func (this *Deployment) Update() Result
type DeploymentInterface ¶
type DisposalMode ¶
type DisposalMode struct { WarningInfo []WarningInfo WarningWhiteList []WarningWhiteList Action string `orm:"-" description:"(处理方式:isolation、pause、stop、kill)"` }
type DisposalModeInterface ¶
type DisposalModeInterface interface { }
type DockerEvent ¶
type DockerEvent struct { Id string `orm:"pk;size(256)" description:"(容器id)"` HostId string `orm:"size(256)" description:"(主机Id agent采集数据)"` HostName string `orm:"size(256)" description:"(主机Name agent采集数据)"` From string `orm:"size(256)" description:"(镜像来源)"` Type string `orm:"size(256)" description:"(类型)"` Action string `orm:"size(256)" description:"(执行操作)"` Actor string `orm:"" description:"(操作明细)"` Status string `orm:"size(256)" description:"(状态)"` Scope string `orm:"size(256)" description:"(范围)"` Time int64 `orm:"" description:"(时间)"` TimeNano int64 `orm:"" description:"(精确时间)"` StartTime int64 `orm:"-" description:"(开始时间, 注意时间格式为 local 时间)"` EndTime int64 `orm:"-" description:"(结束时间, 注意时间格式为 local 时间)"` }
func (*DockerEvent) Add ¶
func (this *DockerEvent) Add() Result
func (*DockerEvent) GetLatestTime ¶
func (this *DockerEvent) GetLatestTime() Result
func (*DockerEvent) List ¶
func (this *DockerEvent) List(from, limit int) Result
type DockerEventInterface ¶
type DockerVulnerabilities ¶
type DockerVulnerabilities struct { Id int `orm:"pk;auto" description:"(Id)"` HostId string `orm:"size(64)" description:"(主机ID)"` HostName string `orm:"size(128)" description:"(主机名称)"` TaskId string `orm:"size(64)" description:"(任务Id)"` Docker string `orm:"" description:"(Docker版本信息, Docker库自定义数据结构)"` CveIds string `orm:"" description:"(任务Id)"` CreateTime int64 `orm:"" description:"(创建时间)"` }
func (*DockerVulnerabilities) Add ¶
func (this *DockerVulnerabilities) Add() Result
func (*DockerVulnerabilities) Delete ¶
func (this *DockerVulnerabilities) Delete() Result
func (*DockerVulnerabilities) List ¶
func (this *DockerVulnerabilities) List(from, limit int) Result
type DymaicClient ¶
func CreateK8sDymaicClient ¶
func CreateK8sDymaicClient(params *ApiParams) DymaicClient
func GetDymaicClient ¶
func GetDymaicClient(c *Cluster) DymaicClient
type FileInfo ¶
type FileInfo struct { Name string // 文件名称 MD5 string // 文件MD5码 Permission uint32 // 文件权限 Type string // 文件类型 Size int64 // 文件大小 }
虚拟表,用于接收agent的文件列表
type GoRoutineManager ¶
type GoRoutineManager struct {
GoRoutineMap map[string]interface{}
}
func NewGoRoutineManager ¶
func NewGoRoutineManager() *GoRoutineManager
type GroupInterface ¶
type Groups ¶
type Groups struct { Id string `orm:"pk;" description:"(id)"` FirstLevel string `orm:"unique" description:"(一级分组)"` SecondLevel string `orm:"null" description:"(二级分组)"` ThirdLevel string `orm:"null" description:"(三级分组)"` Type string `orm:"default(Host)" description:"(All Host Container)"` AccountName string `orm:"default(admin)" description:"(租户 默认 admin)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` HostConfig []*HostConfig `orm:"reverse(many);null" description:"(主机列表)"` }
type HostConfig ¶
type HostConfig struct { Id string `orm:"pk;size(128)" description:"(主机id)"` HostName string `orm:"size(64)" description:"(主机名)"` OS string `orm:"size(32)" description:"(系统)"` PG string `orm:"size(32);default(sys-default)" description:"(安全策略组)"` InternalAddr string `orm:"size(32);default(null);" description:"(主机ip 内)"` PublicAddr string `orm:"size(32);default(null);" description:"(主机ip 外)"` Status string `orm:"size(32);default(Abnormal)" description:"(主机状态 正常 Normal 异常 Abnormal)"` Diss string `orm:"size(32);default(NotInstalled)" description:"(安全容器 Installed NotInstalled)"` DissStatus string `orm:"size(32);default(Unsafe)" description:"(安全状态 Safe Unsafe)"` AccountName string `orm:"size(32);default(admin)" description:"(租户)"` GroupId string `orm:"-" description:"(查询参数:分组Id, 仅仅是查询使用, 返回数据看 Group)"` Group *Groups `orm:"rel(fk);null;on_delete(set_null)" description:"(分组)"` Type string `orm:"size(32);default(Server);" description:"(类型 服务器: Server 虚拟机: Vm)"` IsInK8s bool `orm:"default(false);" description:"(是否在k8s集群)"` ClusterId string `orm:"size(128);default(null);" description:"(集群id)"` ClusterName string `orm:"size(128);default(null);" description:"(集群名)"` Label string `orm:"size(32);default(null);" description:"(标签)"` TaskList []*Task `orm:"reverse(many);null" description:"(任务列表)"` Job []*Job `orm:"rel(m2m);null;" description:"(job)"` IsEnableHeartBeat bool `orm:"default(false);" description:"(是否开启心跳上报)"` IsEnableDockerEvent bool `orm:"default(false);" description:"(是否开启容器审计上报)"` HeartBeat int64 `orm:"null;type(0)" description:"(心跳)"` KMetaData string `orm:"" description:"(源数据)"` KSpec string `orm:"" description:"(Spec数据)"` KStatus string `orm:"" description:"(状态数据)"` KubernetesVer string `orm:"size(64)" description:"(kubernetes 版本)"` NodeRole string `orm:"size(64)" description:"(集群主机角色)"` DockerCISCount string `orm:"null;" description:"(docker基线结果个数)"` DockerCISUpdateTime int64 `orm:"default(0)" description:"(docker基线更新时间)"` KubeCISCount string `orm:"null;" description:"(k8s基线结果个数)"` KubeCISUpdateTime int64 `orm:"default(0)" description:"(k8s基线更新时间)"` IsLicensed bool `orm:"default(false);" description:"(是否已经授权)"` LicCount bool `orm:"-" description:"(是否获取授权个数操作)"` CreateTime int64 `orm:"default(0)" description:"(上线时间)"` OfflineTime int64 `orm:"default(0)" description:"(离线时间)"` WithK8sBench bool `orm:"-" description:"(是否获取k8s基线统计)"` TemplateType string `orm:"-" description:"(类型)"` }
func (*HostConfig) Add ¶
func (this *HostConfig) Add() error
func (*HostConfig) BaseList ¶
func (this *HostConfig) BaseList(from, limit int) (error, int64, []*HostConfig)
func (*HostConfig) Count ¶
func (this *HostConfig) Count() int64
func (*HostConfig) Delete ¶
func (this *HostConfig) Delete() Result
func (*HostConfig) Get ¶
func (this *HostConfig) Get() *HostConfig
func (*HostConfig) GetBenchMarkProportion ¶
func (this *HostConfig) GetBenchMarkProportion() (int64, int64)
docker基线 / k8s 基线
func (*HostConfig) GetDissCountProportion ¶
func (this *HostConfig) GetDissCountProportion() (int64, int64)
已安全容器 / 未安装安全容器
func (*HostConfig) GetOnlineProportion ¶
func (this *HostConfig) GetOnlineProportion() (int64, int64)
Online / Offline
func (*HostConfig) List ¶
func (this *HostConfig) List(from, limit int) Result
func (*HostConfig) RestoreKubeBenchSummary ¶
func (this *HostConfig) RestoreKubeBenchSummary()
Restore kube result summary for renew cluster node or reopen license host
func (*HostConfig) Update ¶
func (this *HostConfig) Update() Result
func (*HostConfig) UpdateDynamic ¶
func (this *HostConfig) UpdateDynamic() Result
func (*HostConfig) UpdateHostCISCount ¶
func (this *HostConfig) UpdateHostCISCount(benchMarkSummary MarkSummary)
type HostConfigInterface ¶
type HostInfo ¶
type HostInfo struct { Id string `orm:"pk;size(128)" description:"(主机id)"` HostName string `orm:"size(64)" description:"(主机名称)"` InternalAddr string `orm:"size(32);default(null);" description:"(主机ip 内)"` PublicAddr string `orm:"size(32);default(null);" description:"(主机ip 外)"` CpuCore int64 `orm:"" description:"(cpu)"` Mem string `orm:"size(32)" description:"(内存)"` Disk string `orm:"size(32)" description:"(磁盘)"` OS string `orm:"size(32)" description:"(系统)"` OSVer string `orm:"size(32)" description:"(系统版本)"` Kernel string `orm:"size(32)" description:"(内核)"` Architecture string `orm:"size(32)" description:"(架构)"` Mac string `orm:"" description:"(mac)"` DockerRuntime string `orm:"size(128)" description:"(容器运行时)"` KubernetesVer string `orm:"size(64)" description:"(kubernetes 版本)"` KubeletVer string `orm:"size(64)" description:"(kubelet 版本)"` Kubeproxy string `orm:"size(64)" description:"(kubeproxy 版本)"` DockerStatus string `orm:"size(32);default(false);" description:"(容器状态)"` ImageCount int `orm:"default(0);" description:"(镜像数)"` ContainerCount int `orm:"default(0);" description:"(容器数)"` ContainerRunningCount int `orm:"default(0);" description:"(容器Running数)"` ContainerPausedCount int `orm:"default(0);" description:"(容器Paused数)"` ContainerStoppedCount int `orm:"default(0);" description:"(容器Stopped数)"` ClusterId string `orm:"size(128);default(null);" description:"(集群id)"` ClusterName string `orm:"size(128);default(null);" description:"(集群名)"` KMetaData string `orm:"" description:"(源数据)"` KSpec string `orm:"" description:"(Spec数据)"` KStatus string `orm:"" description:"(状态数据)"` }
func (*HostInfo) UpdateDynamic ¶
type HostInfoInterface ¶
type HostPackage ¶
type HostPackage struct { Id string `orm:"pk;size(128)" description:"(id)"` Name string `orm:"" description:"(包名)"` Type string `orm:"size(32)" description:"(java、rpm、dpkg、jar、system)"` HostId string `orm:"size(128)" description:"(主机id)"` }
func (*HostPackage) Add ¶
func (this *HostPackage) Add() Result
func (*HostPackage) Delete ¶
func (this *HostPackage) Delete() Result
func (*HostPackage) GetPackageCountByType ¶
func (this *HostPackage) GetPackageCountByType() Result
func (*HostPackage) List ¶
func (this *HostPackage) List(from, limit int) Result
type HostPackageInterface ¶
type HostPackageList ¶
type HostPackageList struct {
List []*HostPackage
}
type HostPs ¶
type HostPs struct { Id string `orm:"pk;" description:"(id)"` HostId string `orm:"" description:"(主机id)"` PID int `orm:"column(pid)" description:"(PID)"` User string `orm:"" description:"(用户)"` CPU float64 `orm:"column(cpu)" description:"(CPU)"` Mem float64 `orm:"" description:"(内存)"` Time string `orm:"" description:"(时间)"` Start string `orm:"" description:"(运行时长 非mac)"` Started string `orm:"" description:"(运行时长 mac)"` Command orm.TextField `orm:"" description:"(Command)"` Sort string `orm:"-" description:"(排序)"` }
type HostPsInterface ¶
type Hub ¶
type Hub struct { DissClient map[string]*Client // Register requests from the clients. Register chan *Client }
Hub maintains the set of active clients and broadcasts messages to the clients.
type ImageBlocking ¶
type ImageBlocking struct { Id string `orm:"pk;size(128)" description:"(Id)"` ImageId string `orm:"" description:"(镜像id)"` ImageName string `orm:"" description:"(镜像名)"` AccountName string `orm:"" description:"(租户)"` CreateTime int64 `orm:"default(0)" description:"(阻断时间)"` Status string `orm:"default(null);" description:"(状态)"` Action string `orm:"-" description:"(处理方式:kill)"` }
func (*ImageBlocking) Add ¶
func (this *ImageBlocking) Add() Result
func (*ImageBlocking) Get ¶
func (this *ImageBlocking) Get() Result
func (*ImageBlocking) GetIb ¶
func (this *ImageBlocking) GetIb() *ImageBlocking
func (*ImageBlocking) List ¶
func (this *ImageBlocking) List(from, limit int) Result
type ImageBlockingInterface ¶
type ImageBlockingInterface interface { Add() Result Get() *Result GetIB() *ImageBlocking List(from, limit int) Result }
type ImageConfig ¶
type ImageConfig struct { Id string `orm:"pk;" description:"(镜像id k8s拿不到镜像id, 用主机id+镜像名称填充)"` ImageId string `orm:"" description:"(镜像id)"` HostId string `orm:"" description:"(主机id)"` HostName string `orm:"" description:"(主机名称)"` Name string `orm:"" description:"(镜像名)"` Size string `orm:"" description:"(大小)"` OS string `orm:"column(os)" description:"(镜像名)"` DissStatus int8 `orm:"" description:"(安全状态)"` Age string `orm:"default(null);" description:"(运行时长)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` TaskList []*Task `orm:"reverse(many);null" description:"(任务列表)"` Registry *Registry `orm:"rel(fk);default(null);null" description:"(仓库)"` Type string `orm:"-" description:"(区分主机镜像还是仓库镜像)"` Namespaces string `orm:"-" description:"(命名空间)"` VirusScan bool `orm:"-" description:"(区分杀毒还是扫描)"` }
func (*ImageConfig) Add ¶
func (this *ImageConfig) Add() Result
func (*ImageConfig) Count ¶
func (this *ImageConfig) Count() int64
func (*ImageConfig) Delete ¶
func (this *ImageConfig) Delete() Result
func (*ImageConfig) Get ¶
func (this *ImageConfig) Get() *ImageConfig
func (*ImageConfig) GetDBCountByType ¶
func (this *ImageConfig) GetDBCountByType() Result
func (*ImageConfig) GetDBImageByType ¶
func (this *ImageConfig) GetDBImageByType() Result
func (*ImageConfig) List ¶
func (this *ImageConfig) List(from, limit int) Result
func (*ImageConfig) Update ¶
func (this *ImageConfig) Update() Result
type ImageConfigInterface ¶
type ImageDetail ¶
type ImageDetail struct { Id string `orm:"pk;" description:"(数据库主键)"` ImageId string `description:"(镜像id)"` Name string `description:"(镜像名)"` HostId string `description:"(主机id)"` HostName string `description:"(主机名称)"` RepoTags string `description:"(RepoTags)"` RepoDigests string `description:"(RepoDigests)"` Os string `description:"(系统)"` Size string `description:"(大小)"` Layers int `description:"(Layers)"` Dockerfile string `description:"(Dockerfile内容)"` CreateTime int64 `description:"(创建时间)"` ModifyTime int64 `description:"(更新时间)"` PackagesJson string `description:"(软件包列表)"` ImageConfigId string `description:"(镜像Id)"` Packages []PackageInfo `orm:"-" description:"(镜像中软件包列表)"` }
func (*ImageDetail) Add ¶
func (this *ImageDetail) Add() Result
func (*ImageDetail) Delete ¶
func (this *ImageDetail) Delete() Result
func (*ImageDetail) Get ¶
func (this *ImageDetail) Get() *ImageDetail
type ImageDetailInterface ¶
type ImageDetailInterface interface { Add() Result List(from, limit int) Result Delete() Result Get() *ImageDetail }
type ImageInfo ¶
type ImageInfo struct { Id string `orm:"pk;" description:"(数据库主键)"` ImageId string `orm:"" description:"(镜像id)"` Name string `orm:"" description:"(镜像名)"` HostId string `orm:"" description:"(主机id)"` HostName string `orm:"" description:"(主机名称)"` RepoTags string `orm:"" description:"(RepoTags)"` RepoDigests string `orm:"" description:"(RepoDigests)"` Os string `orm:"" description:"(系统)"` Created int64 `orm:"" description:"(创建时间)"` Size string `orm:"" description:"(大小)"` Layers string `orm:"" description:"(Layers)"` }
type ImageInfoInterface ¶
type ImageVirus ¶
type ImageVirus struct { ImageId string `orm:"column(imageId)" description:"(镜像Id)"` ImageName string `orm:"" description:"(镜像名)"` ImageDigest string `orm:"column(imageDigest)" description:"(镜像digest)"` UserId string `orm:"column(userId)" description:"(用户id)"` FileName string `description:"(文件名)"` Virus string `description:"(病毒)"` FileHash string `description:"(文件hash)"` FileSize int64 `description:"(文件大小)"` CreatedAt int64 `description:"(创建时间)"` LastUpdated int64 `description:"(更新时间)"` }
type ImageVulnerabilities ¶
type ImageVulnerabilities struct { Id int `orm:"pk;auto" description:"(Id)" description:"(id)"` RegistryId int `orm:"size(32)" description:"(仓库Id)"` HostId string `orm:"size(128)" description:"(主机Id)"` ImageId string `orm:"size(512)" description:"(镜像Id)"` TaskId string `orm:"size(128)" description:"(任务Id)"` Target string `orm:"size(128)" description:"(扫描镜像名)"` Type string `orm:"size(32)" description:"(镜像系统类型)"` Vulnerabilities []*Vulnerabilities `orm:"reverse(many);" description:"(漏洞列表)"` CreateTime int64 `description:"(感染文件创建时间)"` }
func (*ImageVulnerabilities) Add ¶
func (this *ImageVulnerabilities) Add() Result
func (*ImageVulnerabilities) Delete ¶
func (this *ImageVulnerabilities) Delete() Result
func (*ImageVulnerabilities) List ¶
func (this *ImageVulnerabilities) List(from, limit int) Result
func (*ImageVulnerabilities) ScanList ¶
func (this *ImageVulnerabilities) ScanList(from, limit int) Result
type IntrudeDetectLog ¶
type IntrudeDetectLog struct { HostId string `description:"(主机Id)"` HostName string `description:"(主机名)"` TargeType string `description:"(类型)"` ContainerId string `description:"(容日Id 如果是主机该字段为:host, 如果是容器为:容器的实际ID)"` Output string `description:"(事件信息)"` StartTime int64 `description:"(开始时间)"` ToTime int64 `description:"(结束时间)"` AccountName string `description:"(租户)"` Priority string `description:"(安全等级)"` }
针对 es 解析使用的结构体
func (*IntrudeDetectLog) List ¶
func (this *IntrudeDetectLog) List(from, limit int) Result
func (*IntrudeDetectLog) List1 ¶
func (this *IntrudeDetectLog) List1(from, limit int) Result
type Job ¶
type Job struct { Id string `orm:"pk;" description:"(job id)"` Account string `orm:"default(admin)" description:"(租户)"` Name string `orm:"" description:"(名称)"` Description string `orm:"" description:"(描述)"` Spec string `orm:"" description:"(定时器)"` Type string `orm:"" description:"(类型 重复执行 单次执行)"` SystemTemplateType string `orm:"default(Disable)" description:"(模板类型)"` Status string `orm:"default(Disable)" description:"(状态: 执行中、启用、禁用)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` SystemTemplate *SystemTemplate `orm:"rel(fk);null;" description:"(策略)"` SystemTemplateGroup *SystemTemplateGroup `orm:"rel(fk);null;" description:"(策略组)"` Task []*Task `orm:"reverse(many);null" description:"(任务列表)"` HostConfig []*HostConfig `orm:"reverse(many);null" description:"(主机列表)"` ContainerConfig []*ContainerConfig `orm:"reverse(many);null" description:"(容器列表)"` JobLevel string `orm:"default(System)" description:"(任务级别)"` IsUpdateHost bool `orm:"-" description:"(是否联动更新相关host信息)"` }
func (*Job) GetDefaultJob ¶
type JobInterface ¶
type KubeScan ¶
type KubeScan struct { Id int `orm:"pk;auto" description:"(Id)"` ClusterId string `orm:"size(64)" description:"(集群Id)" json:"cluster_id"` TaskId string `orm:"size(64)" description:"(任务Id)" json:"task_id"` //Nodes []Nodes `orm:"" description:"(节点列表)"` //Services []Services `orm:"" description:"(服务列表)"` Vulnerabilities []*KubeVulnerabilities `orm:"reverse(many);" description:"(漏洞列表)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` Severity string `orm:"-" description:"(等级,查询参数)"` Latest bool `orm:"-" description:"(最新一条,查询参数)"` }
type KubeScanInterface ¶
type KubeVulnerabilities ¶
type KubeVulnerabilities struct { Id int `orm:"pk;auto" description:"(Id)"` Location string `orm:"" description:"(POD、服务、IP)"` Vid string `orm:"size(32)" description:"(漏洞ID)"` Category string `orm:"size(128)" description:"(类别)"` Severity string `orm:"size(32)" description:"(级别)"` Vulnerability string `orm:"size(128)" description:"(漏洞名)"` Description string `orm:"" description:"(漏洞描述)"` Evidence string `orm:"" description:"(证据)"` AvdReference string `orm:"" description:"(参考)" json:"avd_reference"` Hunter string `orm:"size(64)" description:"(扫描组件)"` KubeVuln *KubeScan `orm:"rel(fk);null" description:"(集群扫描记录)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` VulnerabilityLib *VulnerabilityLib `orm:"rel(one);null" description:"(漏洞库数据)"` }
func (*KubeVulnerabilities) Add ¶
func (this *KubeVulnerabilities) Add() Result
type KubeVulnerabilitiesInterface ¶
type KubeVulnerabilitiesInterface interface {
Add() Result
}
type KubernetesClientManager ¶
type KubernetesClientManager struct { ClientHub map[string]ClientGo DymaicClientHub map[string]DymaicClient }
func NewKubernetesClientManager ¶
func NewKubernetesClientManager() *KubernetesClientManager
type KubernetesHandler ¶
type KubernetesHandler struct { *ClientGo *DymaicClient IsActive bool File *os.File *Task *Cluster }
func (*KubernetesHandler) CreateOrDeleteResourceByYml ¶
func (this *KubernetesHandler) CreateOrDeleteResourceByYml() Result
func (*KubernetesHandler) UpdateKubeScanYml ¶
func (this *KubernetesHandler) UpdateKubeScanYml(unstruct unstructured.Unstructured) (*unstructured.Unstructured, error)
type LDAPConfig ¶
type LDAPManager ¶
type LDAPManager struct { Conn *ldap.Conn Config *LDAPConfig ConnectErr error }
func NewLDAPManager ¶
func NewLDAPManager() *LDAPManager
func (*LDAPManager) CreateLDAPConnection ¶
func (this *LDAPManager) CreateLDAPConnection()
type LicenseConfig ¶
type LicenseConfig struct { Id string `orm:"pk;" description:"(序列号)"` ProductName string `orm:"" description:"(产品名称)"` CustomerName string `orm:"" description:"(许可对象)"` Type string `orm:"" description:"(授权类型 测试授权 正式授权)"` BuyAt int64 `orm:"default(0)" description:"(授权购买时间)"` ActiveAt int64 `orm:"default(0)" description:"(激活时间)"` Modules []*LicenseModule `orm:"reverse(many);null" description:"(授权的模块)"` }
func (*LicenseConfig) Add ¶
func (this *LicenseConfig) Add() Result
func (*LicenseConfig) Get ¶
func (this *LicenseConfig) Get() Result
func (*LicenseConfig) Update ¶
func (this *LicenseConfig) Update() Result
type LicenseConfigInterface ¶
type LicenseHistory ¶
type LicenseHistory struct { Id string `orm:"pk;" description:"(history id)"` LicenseJson string `orm:"" description:"(license json 文件)"` UpdateTime time.Time `orm:"null;auto_now;type(datetime)" description:"(更新时间)"` }
func (*LicenseHistory) Add ¶
func (this *LicenseHistory) Add() Result
func (*LicenseHistory) List ¶
func (this *LicenseHistory) List(from, limit int) Result
type LicenseHistoryInterface ¶
type LicenseHistoryInterface interface { Add() Result List(from, limit int) Result Get() LicenseModule }
type LicenseModule ¶
type LicenseModule struct { Id string `orm:"pk;" description:"(license module id)"` LicenseConfig *LicenseConfig `orm:"rel(fk)" description:"(license file)"` ModuleCode string `orm:"size(128);" description:"(授权模块)"` LicenseCount int64 `orm:"size(64);default(0)" description:"(授权模块数量)"` IsLicensedCount int64 `orm:"size(64);default(0)" description:"(已使用授权模块数量)"` LicenseExpireAt int64 `orm:"default(0)" description:"(授权结束时间)"` }
func (*LicenseModule) Add ¶
func (this *LicenseModule) Add() Result
func (*LicenseModule) Get ¶
func (this *LicenseModule) Get() *LicenseModule
func (*LicenseModule) List ¶
func (this *LicenseModule) List() Result
func (*LicenseModule) Remove ¶
func (this *LicenseModule) Remove() Result
func (*LicenseModule) Update ¶
func (this *LicenseModule) Update() Result
type LinceseModuleInterface ¶
type LogConfig ¶
type LogConfig struct { Id string `orm:"pk;" description:"(Log配置id)"` ConfigName string `orm:"" description:"(配置项名称 支持的值 SysLogExport)"` Enabled bool `orm:"" description:"(是否启用)"` ServerUrl string `orm:"" description:"(服务器url)"` ServerPort string `orm:"" description:"(服务器端口)"` ExportedTypes string `orm:"" description:"(导出日志类型 多个枚举 以,分割)"` }
type LogConfigInterface ¶
type MailServerConfig ¶
type MailServerManager ¶
type MailServerManager struct { Dialer *gomail.Dialer MailServerConfig *MailServerConfig LogToMailConfig *map[string]map[string]bool LogChannel chan *map[string]string Status string }
func NewMailServerManager ¶
func NewMailServerManager() *MailServerManager
func (*MailServerManager) NewLogToMail ¶
func (this *MailServerManager) NewLogToMail()
func (*MailServerManager) NewMailDialer ¶
func (this *MailServerManager) NewMailDialer()
type MarkSummary ¶
type Module ¶
type Module struct { Id int `orm:"auto;pk" description:"模块ID"` Name string `orm:"unique" description:"模块名"` Description string `orm:"size(64)" description:"描述"` Code string `description:"模块密码"` Role *Role `orm:"rel(fk);null" description:"角色"` CreateTime int64 `orm:"default(0);" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` }
func (*Module) ModuleList ¶
type ModuleInterface ¶
type NameSpace ¶
type NameSpace struct { Id string `orm:"pk;" description:"(命名空间id)"` Name string `orm:"size(32)" description:"(命名空间)"` ClusterId string `orm:"size(64);" description:"(集群id)"` ClusterName string `orm:"size(32)" description:"(集群名)"` AccountName string `orm:"size(32);default(admin)" description:"(租户)"` SyncCheckPoint int64 `orm:"default(0);" description:"(同步检查点)"` Force bool `orm:"-" description:"(强制)"` KMetaData string `orm:"" description:"(源数据)"` KSpec string `orm:"" description:"(Spec数据)"` KStatus string `orm:"" description:"(状态数据)"` }
func (*NameSpace) BindAccount ¶
func (*NameSpace) EmptyDirtyData ¶
func (*NameSpace) ListByAccountGroupByClusterId ¶
func (*NameSpace) UnBindAccount ¶
type NameSpaceInterface ¶
type NatsData ¶
type NatsData struct { Code int `json:"code"` // 状态码 Msg string `json:"msg"` // 响应消息/错误信息 Type string `json:"type"` // nats 通信类型:如指标数据 metric,统计数据 statistics,控制数据:Control 配置信息config Tag string `json:"tag"` // 资源 RCType string `json:"rc_type"` // ResourceControlType 资源操作类型 Get Post Delete Put Data interface{} `json:"data"` // 数据 }
type NatsManager ¶
func NewNatsManager ¶
func NewNatsManager() *NatsManager
type NetworkPolicy ¶
type NetworkPolicy struct { Id string `orm:"pk;" description:"(id)"` Name string `orm:"size(128)" description:"(名)"` AccountName string `orm:"size(32)" description:"(租户)"` ClusterId string `orm:"size(256)" description:"(集群Id)"` ClusterName string `orm:"size(32)" description:"(集群名)"` IngressPolicy string `orm:"size(32)" description:"(入站策略 Allow Refuse 默认)"` EgressPolicy string `orm:"size(32)" description:"(出站策略 Allow Refuse 默认)"` NameSpaceName string `orm:"size(255);default(null);" description:"(命名空间)"` KMetaData string `orm:"" description:"(源数据)"` KSpec string `orm:"" description:"(Spec数据)"` }
func (*NetworkPolicy) Add ¶
func (this *NetworkPolicy) Add() Result
func (*NetworkPolicy) Delete ¶
func (this *NetworkPolicy) Delete() Result
func (*NetworkPolicy) List ¶
func (this *NetworkPolicy) List(from, limit int) Result
func (*NetworkPolicy) Update ¶
func (this *NetworkPolicy) Update() Result
type NetworkPolicyInterface ¶
type PackageInfo ¶
type Pod ¶
type Pod struct { Id string `orm:"pk;" description:"(pod id)"` Name string `orm:"size(128)" description:"(Pod名)"` AccountName string `orm:"size(32)" description:"(租户)"` GroupId string `orm:"size(64);default(null)" description:"(租户id)"` GroupName string `orm:"size(32);default(null)" description:"(租户名)"` SyncCheckPoint int64 `orm:"default(0);" description:"(同步检查点)"` NameSpaceName string `orm:"size(255);default(null);" description:"(命名空间)"` HostName string `orm:"size(64);default(null);" description:"(主机名)"` ClusterName string `orm:"size(32)" description:"(集群名)"` KMetaData string `orm:"" description:"(源数据)"` KSpec string `orm:"" description:"(Spec数据)"` KStatus string `orm:"" description:"(状态数据)"` Status string `orm:"" description:"(状态)"` }
func (*Pod) EmptyDirtyData ¶
type PodInterface ¶
type Registry ¶
type Registry struct { Id int64 `orm:"pk;auto" description:"(仓库id)"` AccountName string `orm:"" description:"(租户)"` Name string `orm:"size(64)" description:"(仓库名)"` Description string `orm:"size(256)" description:"(描述/备注)"` Type string `orm:"size(32)" description:"(仓库类型)"` Url string `orm:"size(512)" dqescription:"(地址)"` User string `orm:"size(32)" description:"(用户名)"` Pwd string `orm:"size(128)" description:"(密码)"` Insecure bool `orm:"default(true)" description:"(验证远程证书)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` Version string `orm:"size(64)" description:"(版本)"` }
func (*Registry) GetAccount ¶
type RegistryInterface ¶
type RespCenter ¶
type RespCenter struct { Id string `orm:"pk;size(128)" description:"(Id)"` HostId string `orm:"size(256)" description:"(主机Id agent采集数据)"` HostName string `orm:"size(256)" description:"(主机Name agent采集数据)"` Account string `orm:"size(256)" description:"(租户)"` Cluster string `orm:"size(256)" description:"(集群名)"` Namespace string `orm:"size(256)" description:"(命名空间)"` ContainerId string `orm:"size(256)" description:"(容器id)"` ContainerName string `orm:"size(256)" description:"(容器名称)"` PodName string `orm:"size(256)" description:"(pod名称)"` ImageName string `orm:"size(256)" description:"(镜像名称)"` CreateTime int64 `orm:"" description:"(发生时间)" json:"ct"` UpdateTime int64 `orm:"" description:"(更新时间)" json:"ut"` Status string `orm:"size(256)" description:"(状态)"` Analysis string `orm:"size(256)" description:"(建议)"` ProcessNote string `orm:"size(256)" description:"(处理说明)"` Msg string `orm:"size(1024)" description:"(消息)"` WarningInfoId string `orm:"size(128)" description:"(外键id)" ` Mode string `orm:"size(128)" description:"(方式)" ` Code int64 `orm:"" description:"(错误码)"` Action string `orm:"-" description:"(处理方式:resume、start)"` }
func (*RespCenter) Add ¶
func (this *RespCenter) Add() Result
func (*RespCenter) Delete ¶
func (this *RespCenter) Delete() Result
func (*RespCenter) Get ¶
func (this *RespCenter) Get() *RespCenter
func (*RespCenter) GetRespCenter ¶
func (this *RespCenter) GetRespCenter() Result
func (*RespCenter) List ¶
func (this *RespCenter) List(from, limit int) Result
func (*RespCenter) Update ¶
func (this *RespCenter) Update() Result
type RespCenterInterface ¶
type Role ¶
type Role struct { Id int64 `orm:"auto;pk" description:"角色ID"` Name string `orm:"size(64)" description:"角色名"` DispName string `orm:"size(64)" description:"显示名"` Code string `orm:"size(64);unique" description:"角色代码"` Description string `orm:"size(64)" description:"描述"` Users []*User `orm:"reverse(many)" description:"用户列表"` // 以casbin中的关联优先 Modules []*Module `orm:"reverse(many)" description:"模块列表"` // 使用casbin中的关联,ORM中不做关联操作 CreateTime int64 `orm:"default(0);" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` IsInBuild bool `orm:"default(false);" description:"(是否内置角色)"` }
func (*Role) PolicyList ¶
func (*Role) RemovePolicy ¶
func (*Role) RemoveUsers ¶
func (*Role) UpdatePolicy ¶
type RoleInterface ¶
type RuleDefine ¶
type RuleDefine struct { Id int64 `orm:"pk;auto" description:"(Id)"` Type string `orm:"size(64)" description:"(规则类型:如敏感信息、告警信息)"` Name string `orm:"size(256)" description:"(规则名称)"` Code string `orm:"size(64)" description:"(规则Code)"` Desc string `orm:"" description:"(规则描述)"` Info string `orm:"size(256)" description:"(规则定义)"` Level int `orm:"" description:"(等级:0查询全部 1系统级 2自定义)"` Enabled int `orm:"" description:"(是否启用:0查询全部 1启用 2禁用)"` SourceInfo string `orm:"size(256)" description:"(来源信息:来源的网址、漏洞编码等)" ` CreateTime int64 `orm:"" description:"(添加时间)"` UpdateTime int64 `orm:"" description:"(修改时间)"` RiskLevel string `orm:"size(64)" description:"(风险等级)"` }
func (*RuleDefine) Add ¶
func (this *RuleDefine) Add() Result
func (*RuleDefine) Delete ¶
func (this *RuleDefine) Delete() Result
func (*RuleDefine) Get ¶
func (this *RuleDefine) Get() (*RuleDefine, error)
func (*RuleDefine) List ¶
func (this *RuleDefine) List(from, limit int) Result
func (*RuleDefine) RuleDefineList ¶
func (this *RuleDefine) RuleDefineList(from, limit int) (ruleLists []*RuleDefine, count int64, err error)
func (*RuleDefine) Update ¶
func (this *RuleDefine) Update() Result
type RuleDefineInterface ¶
type RuleDefineInterface interface { List(from, limit int) Result Add() Result Update() Result Delete() Result RuleDefineList() ([]*RuleDefine, int64, error) Get() (*RuleDefine, error) }
type SecurityCheck ¶
type SecurityCheck struct { DockerCIS bool `description:"(required: false, 开启Docker基线检测)"` KubenetesCIS bool `description:"(required: false, 开启K8s基线检测)"` DockerScan bool `description:"(required: false, 开启Docker漏扫)"` KubenetesScan bool `description:"(required: false, 开启K8s漏扫)"` VirusScan bool `description:"(required: false, 开启病毒)"` LeakScan bool `description:"(required: false, 开启漏洞)"` HostImageVulnScan bool `description:"(required: false, 主机镜像漏洞)"` ImageVulnScan bool `description:"(required: false, 仓库镜像扫描)"` Host *HostConfig `description:"(required: false, 主机)"` Container *ContainerConfig `description:"(required: false, 容器)"` Image *ImageConfig `description:"(required: false, 镜像)"` Cluster *Cluster `description:"(required: false, 集群)"` Type string `description:"(required: false, 类型 host、container、image)"` Job *Job `description:"(required: false, 来源任务)"` PathList string `description:"(required: false, 目标目录列表 Path1,Path2,Path3)"` }
type SecurityCheckList ¶
type SecurityCheckList struct {
CheckList []*SecurityCheck
}
type SecurityCheckParams ¶
type SecurityCheckParams struct { DockerCIS bool `description:"(required: false, 开启Docker基线检测)"` KubenetesCIS bool `description:"(required: false, 开启K8s基线检测)"` KubenetesScan bool `description:"(required: false, 开启K8s漏洞扫描)"` DockerScan bool `description:"(required: false, 开启Docker漏洞扫描)"` VirusScan bool `description:"(required: false, 开启病毒)"` ImageVulnScan bool `description:"(required: false, 开启主仓库像漏洞扫描)"` HostImageVulnScan bool `description:"(required: false, 开启主机镜像漏洞扫描)"` FileImageVulnScan bool `description:"(required: false, 开启文件镜像漏洞扫描)"` RepoImageVulnScan bool `description:"(required: false, 开启代码仓库镜像漏洞扫描)"` HostIds string `description:"(required: false, 主机id列表 ID1,ID2,ID3)"` ContainerIds string `description:"(required: false, 容器id列表 ID1,ID2,ID3)"` ImageIds string `description:"(required: false, 镜像id列表 ID1,ID2,ID3)"` ClusterIds string `description:"(required: false, 集群id列表 ID1,ID2,ID3)"` PathList string `description:"(required: false, 目标目录列表 Path1,Path2,Path3)"` Type string `description:"(required: false, 类型 registry、 host、container、image)"` JobId string `description:"(required: false, JobId)"` TemplateId string `description:"(required: false, 自定义模板Id)"` }
type SensitiveInfo ¶
type SensitiveInfo struct { Id string `orm:"pk;" description:"(id)"` ImageId string `description:"(镜像ID)"` ImageConfigId string `description:"(镜像唯一标识)"` ImageName string `description:"(镜像名称)"` HostId string `description:"(主机ID)"` HostName string `description:"(主机名称)"` Type string `description:"(资源类型:host image)"` FileName string `description:"(文件名称)"` MD5 string `orm:"column(md5)" description:"(文件MD5码)"` Permission uint32 `description:"(文件权限)"` FileType string `description:"(文件类型)"` Size int64 `description:"(文件大小)"` CreateTime int64 `description:"(添加时间)"` Files []FileInfo Severity string `orm:"size(32)" description:"(等级)"` }
func (*SensitiveInfo) Add ¶
func (this *SensitiveInfo) Add() Result
func (*SensitiveInfo) BaseList ¶
func (this *SensitiveInfo) BaseList(from, limit int) ([]*SensitiveInfo, int64, error)
func (*SensitiveInfo) Count ¶
func (this *SensitiveInfo) Count() int64
func (*SensitiveInfo) List ¶
func (this *SensitiveInfo) List(from, limit int) Result
type SensitiveInfoInterface ¶
type Service ¶
type Service struct { Id string `orm:"pk;" description:"(Service id)"` Name string `orm:"size(128)" description:"(Service名)"` NameSpaceName string `orm:"size(255);default(null);" description:"(命名空间)"` ClusterId string `orm:"size(128)" description:"(集群Id)"` ClusterName string `orm:"size(128)" description:"(集群名)"` KMetaData string `orm:"" description:"(源数据)"` KSpec string `orm:"" description:"(Spec数据)"` KStatus string `orm:"" description:"(状态数据)"` }
type ServiceInterface ¶
type SysConfig ¶
type SysConfigInterface ¶
type SystemTemplate ¶
type SystemTemplate struct { Id string `orm:"pk;" description:"(id)"` Account string `orm:"default(admin)" description:"(租户)"` Name string `orm:"unique" description:"(名称)"` Description string `orm:"" description:"(描述)"` Type string `orm:"" description:"(类型)"` Version string `orm:"null" description:"(版本)"` Commands string `orm:"null;" description:"(操作命令)"` Status string `orm:"default(Enable);" description:"(类型 Enable Disable)"` IsDefault bool `orm:"default(false);" description:"(系统策略默认项)"` IsSystem bool `orm:"default(false);" description:"(是否是系统策略)"` SystemTemplateGroup []*SystemTemplateGroup `orm:"rel(m2m);" description:"(策略组)"` Job []*Job `orm:"reverse(many);null" description:"(job)"` Task []*Task `orm:"reverse(many);null" description:"(task)"` ConfigMode string `orm:"default(all);null" description:"(配置形式,如target、checks、group)"` DefaultTargets string `orm:"null;" description:"(默认的target枚举)"` CheckMasterJson string `orm:"null;" description:"(Master target的json内容)"` CheckNodeJson string `orm:"null;" description:"(Node target的json内容)"` CheckControlPlaneJson string `orm:"null;" description:"(ControlPlane target的json内容)"` CheckEtcdJson string `orm:"null;" description:"(Etcd target的json内容)"` CheckPoliciesJson string `orm:"null;" description:"(Polices target的json内容)"` CheckManagedServicesJson string `orm:"null;" description:"(ManagedServices target的json内容)"` CheckIdsMaster string `orm:"null;" description:"(选中的检查项Id列表-Master)"` CheckIdsNode string `orm:"null;" description:"(选中的检查项Id列表-Node)"` CheckIdsControlPlane string `orm:"null;" description:"(选中的检查项Id列表-ControlPlane)"` CheckIdsEtcd string `orm:"null;" description:"(选中的检查项Id列表-Etcd)"` CheckIdsPolicies string `orm:"null;" description:"(选中的检查项Id列表-Policies)"` CheckIdsManagedServices string `orm:"null;" description:"(选中的检查项Id列表-ManagedServices)"` CheckIdsDocker string `orm:"null;" description:"(选中的检查项Id列表-Docker)"` CheckIdsDockerCheck string `orm:"null;" description:"(选中的检查项Id列表-DockerCheck)"` CheckIds string `orm:"null;" description:"(选中的检查项集合)"` DefaultPathList string `orm:"null;" description:"(默认的路径集合)"` EngineCode string `orm:"null;" description:"(使用的引擎编码)"` CreateTime int64 `orm:"default(0);" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` }
func (*SystemTemplate) Add ¶
func (this *SystemTemplate) Add() Result
func (*SystemTemplate) Delete ¶
func (this *SystemTemplate) Delete() Result
func (*SystemTemplate) Get ¶
func (this *SystemTemplate) Get() (*SystemTemplate, error)
func (*SystemTemplate) GetDefaultTemplate ¶
func (this *SystemTemplate) GetDefaultTemplate() map[string]*SystemTemplate
func (*SystemTemplate) List ¶
func (this *SystemTemplate) List(from, limit int) Result
func (*SystemTemplate) Update ¶
func (this *SystemTemplate) Update() Result
type SystemTemplateGroup ¶
type SystemTemplateGroup struct { Id string `orm:"pk;" description:"(基线id)"` Account string `orm:"default(admin)" description:"(租户)"` Name string `orm:"" description:"(名称)"` Description string `orm:"" description:"(描述)"` Type string `orm:"" description:"(类型)"` Version string `orm:"null" description:"(版本)"` Status string `orm:"default(Enable);" description:"(类型 Enable Disable)"` IsDefault bool `orm:"default(false);" description:"(默认系统策略)"` SystemTemplate []*SystemTemplate `orm:"reverse(many);null" description:"(策略模板)"` Job []*Job `orm:"reverse(many);null" description:"(job)"` }
func (*SystemTemplateGroup) Add ¶
func (this *SystemTemplateGroup) Add() Result
func (*SystemTemplateGroup) Delete ¶
func (this *SystemTemplateGroup) Delete() Result
func (*SystemTemplateGroup) List ¶
func (this *SystemTemplateGroup) List(from, limit int) Result
func (*SystemTemplateGroup) Update ¶
func (this *SystemTemplateGroup) Update() Result
type SystemTemplateInterface ¶
type Task ¶
type Task struct { Id string `orm:"pk;" description:"(任务id)"` Account string `orm:"default(admin)" description:"(租户)"` Name string `orm:"" description:"(名称)"` Description string `orm:"" description:"(描述)"` Spec string `orm:"" description:"(定时器)"` Type string `orm:"" description:"(类型 重复执行 单次执行 )"` Status string `orm:"null;" description:"(状态: 未开始、执行中、完成、暂停)"` Batch int64 `orm:"default(0);" description:"(任务批次, 使用16位数据)"` SystemTemplate *SystemTemplate `orm:"rel(fk);null;" description:"(系统模板)"` Host *HostConfig `orm:"rel(fk);null;on_delete(do_nothing)"description:"(主机)"` Container *ContainerConfig `orm:"rel(fk);null;on_delete(do_nothing)" description:"(容器)"` Image *ImageConfig `orm:"rel(fk);null;on_delete(do_nothing)" description:"(镜像)"` ClusterOBJ *Cluster `orm:"rel(fk);null;on_delete(do_nothing)" description:"(集群)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` Job *Job `orm:"rel(fk);null;" description:"(job)"` ClusterId string `orm:"size(256)" description:"(集群Id)"` IsOne bool `orm:"-" description:"(是否取单条记录)"` RunCount int64 `orm:"" description:"(运行次数)"` Action string `orm:"size(256)" description:"(操作类型标记)"` ContainerHostId string `orm:"size(128)" description:"(主机id)"` PathList string `orm:"null;" description:"(要检查的路径集合)"` SearchHostId string `orm:"size(128)" description:"(任务搜索主机id)"` ScanStatus string `orm:"" description:"(扫描状态)"` VirusStatus string `orm:"" description:"(杀毒状态)"` SecurityStatus string `orm:"" description:"(是否受信 unknown Trustee NotTrustee)"` TemplateType string `orm:"" description:"(模版类型)"` }
func (*Task) GetCurrentBatchTaskList ¶
func (*Task) GetTaskList ¶
func (*Task) GetUnFinishedTaskList ¶
type TaskInterface ¶
type TaskLog ¶
type TaskLog struct { Id string `orm:"pk;size(64)" description:"(任务id)"` Account string `orm:"default(admin);size(32)" description:"(租户)"` Task string `orm:"" description:"(任务详情json)"` RawLog string `orm:"" description:"(日志)"` Level string `orm:"default(Info);size(32)" description:"(日志级别)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` StartTime int64 `orm:"-" description:"(开始时间, 注意时间格式为 local 时间)"` EndTime int64 `orm:"-" description:"(结束时间, 注意时间格式为 local 时间)"` }
type TaskLog1Interface ¶
type TaskLogInterface ¶
type TenantImage ¶
type TimeEdgePoint ¶
type TimeEdgePoint struct { TEPointId string `orm:"pk;" description:"(时间边界点id)"` EdgePointCode string `orm:"" description:"(时间边界Code)"` EdgePointName string `orm:"" description:"(时间边界名称/说明)"` TimePointA int64 `orm:"default(0)" description:"(时间边界A点)"` TimePointB int64 `orm:"default(0)" description:"(时间边界B点)"` Direction string `orm:"" description:"(时间区方向,回溯/范围/向前/展望/预期等)"` ScopeSymbol string `orm:"" description:"(时间区域图示, 如----|)"` }
func (*TimeEdgePoint) Add ¶
func (this *TimeEdgePoint) Add() Result
func (*TimeEdgePoint) Get ¶
func (this *TimeEdgePoint) Get() []*TimeEdgePoint
func (*TimeEdgePoint) Update ¶
func (this *TimeEdgePoint) Update() Result
type TimeEdgePointInterface ¶
type TimeEdgePointInterface interface { Add() Result Update() Result Get() []*TimeEdgePoint }
type UpdateAssets ¶
通过客户端更新资产数据(虚拟模型)
type User ¶
type User struct { Id int `orm:"auto;pk" description:"用户ID"` Name string `orm:"unique" description:"用户名"` DispName string `orm:"size(64)" description:"显示名"` Description string `orm:"size(64)" description:"描述"` Password string `description:"用户密码"` Role *Role `orm:"rel(fk);null" description:"角色"` CreateTime int64 `orm:"default(0);" description:"(创建时间)"` UpdateTime int64 `orm:"default(0)" description:"(更新时间)"` }
func (*User) RemoveRole ¶
func (*User) UpdateRole ¶
type UserEvent ¶
type UserEvent struct { Id string `orm:"pk;size(128)" description:"(pod id)"` UserName string `orm:"size(32)" description:"(用户名)"` AccountName string `orm:"size(32)" description:"(租户)"` RawLog string `orm:"default(null);" description:"(操作详情)"` ModelType string `orm:"size(32)" description:"(模块类型)"` CreateTime int64 `orm:"default(0)" description:"(创建时间)"` StartTime int64 `orm:"-" description:"(开始时间, 注意时间格式为 local 时间)"` EndTime int64 `orm:"-" description:"(结束时间, 注意时间格式为 local 时间)"` }
type UserEventInterface ¶
type UserInterface ¶
type Version ¶
type VirusRecord ¶
type VirusRecord struct { Id int `description:"(Id)"` VirusScanId int `description:"(VirusScan Id)"` Filename string `description:"(感染文件名称)"` Virus string `description:"(感染病毒名称)"` Database string `description:"(命中病毒库)"` Type string `description:"(感染文件类型)"` Size int64 `description:"(感染文件大小)"` Owner string `description:"(感染文件所属用户)"` Permission uint32 `description:"(感染文件权限)"` ModifyTime int64 `description:"(感染文件最近修改时间)"` CreateTime int64 `description:"(感染文件创建时间)"` Severity string `orm:"size(32)" description:"(等级)"` }
func (*VirusRecord) Add ¶
func (this *VirusRecord) Add() Result
type VirusRecordInterface ¶
type VirusScan ¶
type VirusScan struct { Id int `description:"(id)"` Name string `description:"(本次扫描任务名)"` TaskId string `description:"(任务ID)"` HostId string `description:"(主机ID)"` HostName string `description:"(主机名称)"` ImageId string `description:"(镜像ID)"` ImageName string `description:"(镜像名称)"` ContainerId string `description:"(容器ID)"` ContainerName string `description:"(容器名称)"` InternalAddr string `description:"(内网IP)"` PublicAddr string `description:"(外网IP)"` Type string `description:"(扫描类型,HostVirusScan, ImageVirusScan, ContainerVirusScan)"` CreatedAt int64 `description:"(创建时间)"` Records []VirusRecord FileName string Severity string `orm:"-" description:"(等级)"` }
type VirusScanInterface ¶
type VirusScanRecord ¶
type VirusScanRecord struct { Id int `description:"(id)"` Name string `description:"(本次扫描任务名)"` TaskId string `description:"(任务ID)"` HostId string `description:"(主机ID)"` HostName string `description:"(主机名称)"` ImageId string `description:"(镜像ID)"` ImageName string `description:"(镜像名称)"` ContainerId string `description:"(容器ID)"` ContainerName string `description:"(容器名称)"` InternalAddr string `description:"(内网IP)"` PublicAddr string `description:"(外网IP)"` Type string `description:"(扫描类型,HostVirusScan, ImageVirusScan, ContainerVirusScan)"` CreatedAt int64 `description:"(创建时间)"` VirusScanId int `description:"(VirusScan Id)"` Filename string `description:"(感染文件名称)"` Virus string `description:"(感染病毒名称)"` Database string `description:"(命中病毒库)"` FileType string `description:"(感染文件类型)"` Size int64 `description:"(感染文件大小)"` Owner string `description:"(感染文件所属用户)"` Permission uint32 `description:"(感染文件权限)"` ModifyTime int64 `description:"(感染文件最近修改时间)"` CreateTime int64 `description:"(感染文件创建时间)"` Severity string `description:"(等级)"` }
func (*VirusScanRecord) Count ¶
func (this *VirusScanRecord) Count() int64
type VulnerRule ¶
type Vulnerabilities ¶
type Vulnerabilities struct { Id int `orm:"pk;auto" description:"(Id)" description:"(id)"` VulnerabilityID string `orm:"column(vulnerability_id)" description:"(漏洞Id)"` PkgName string `orm:"size(128)" description:"(包名)"` InstalledVersion string `orm:"size(64)" description:"(安装版本)"` FixedVersion string `orm:"size(128)" description:"(已解决版本)"` SeveritySource string `orm:"size(128)" description:"(来源)"` PrimaryURL string `orm:"size(512)" description:"(漏洞地址)"` Title string `description:"(漏洞标题)"` Description string `description:"(漏洞描述)"` Severity string `orm:"size(32)" description:"(等级)"` PublishedDate int64 `description:"(发布日期)"` LastModifiedDate int64 `description:"(最后修改日期)"` ImageVulnerabilities *ImageVulnerabilities `orm:"rel(fk);null" description:"(镜像漏洞)"` }
func (*Vulnerabilities) Add ¶
func (this *Vulnerabilities) Add() Result
func (*Vulnerabilities) Count ¶
func (this *Vulnerabilities) Count() int64
func (*Vulnerabilities) List ¶
func (this *Vulnerabilities) List(from, limit int) Result
type VulnerabilitiesInterface ¶
type VulnerabilitiesInterface interface {
Add() Result
}
type VulnerabilityLib ¶
type VulnerabilityLib struct { Id int64 `orm:"pk;auto" description:"(Id)"` Language string `orm:"size(64);default(zh-cn)" description:"(语言)"` VId string `orm:"size(64)" description:"(Kube-hunter Id)"` VCategory string `orm:"size(64)" description:"(Kube-hunter Category)"` CVEId string `orm:"size(64)" description:"(CVE Id)"` Cvss string `orm:"size(64)" description:"(CVSS)"` CvssScore float32 `orm:"" description:"(CVSS Score)"` Access string `orm:"size(64)" description:"(访问方式)"` Type string `orm:"size(128)" description:"(风险类型)"` Category string `orm:"size(128)" description:"(应用类别: harbor , docker ,k8s)"` SubCategory string `orm:"size(128)" description:"(应用子类别: 如dockerEngine, runc, containerd)"` ResType string `orm:"size(128)" description:"(资源类型:如all, master, worker等)"` Name string `orm:"size(256)" description:"(风险项名)"` RiskProp string `orm:"size(128)" description:"(风险特征,多个)"` Severity int `orm:"" description:"(风险等级)"` Description string `orm:"" description:"(描述信息)"` RiskInfoLink string `orm:"" description:"(RiskInf Link)"` RefLinks string `orm:"" description:"(Risk Ref Link)"` Recommend string `orm:"" description:"(修复建议)"` SuiteVersions string `orm:"" description:"(适用版本)"` PublishTime int64 `orm:"" description:"(发布时间)"` Enabled int `orm:"default(1)" description:"(是否启用:0查询全部 0禁用 1启用)"` CreateTime int64 `orm:"" description:"(添加时间)"` UpdateTime int64 `orm:"" description:"(修改时间)"` KubeVulnerabilities *KubeVulnerabilities `orm:"reverse(one)" description:"(kubernates vulnerabilities)"` }
func (*VulnerabilityLib) Add ¶
func (this *VulnerabilityLib) Add() Result
func (*VulnerabilityLib) Delete ¶
func (this *VulnerabilityLib) Delete() Result
func (*VulnerabilityLib) Get ¶
func (this *VulnerabilityLib) Get() (*VulnerabilityLib, error)
func (*VulnerabilityLib) List ¶
func (this *VulnerabilityLib) List(from, limit int) Result
func (*VulnerabilityLib) Update ¶
func (this *VulnerabilityLib) Update() Result
func (*VulnerabilityLib) VulnerabilityList ¶
func (this *VulnerabilityLib) VulnerabilityList(from, limit int) ([]*VulnerabilityLib, int64, error)
type WSManager ¶
type WSManager struct { Conn *websocket.Conn Err error Response *context.Response Request *http.Request }
func (*WSManager) NewWSManager ¶
type WarningInfo ¶
type WarningInfo struct { Id string `orm:"pk;size(128)" description:"(Id)"` Name string `orm:"size(256)" description:"(告警名称)"` HostId string `orm:"size(256)" description:"(主机Id agent采集数据)"` HostName string `orm:"size(256)" description:"(主机Name agent采集数据)"` Cluster string `orm:"size(256)" description:"(集群名)"` Account string `orm:"size(256)" description:"(租户)"` Type string `orm:"size(32)" description:"(类型 如:基线检测、病毒检查、入侵检测、镜像安全等)"` Info string `orm:"size(1024)" description:"(告警详情,json,请自定义内部结构)"` Level string `orm:"size(32)" description:"(告警级别)"` Status string `orm:"size(256)" description:"(状态)"` CreateTime int64 `orm:"" description:"(发生时间)"` UpdateTime int64 `orm:"" description:"(更新时间)"` StartTime int64 `orm:"-" description:"(开始时间, 注意时间格式为 local 时间)"` EndTime int64 `orm:"-" description:"(结束时间, 注意时间格式为 local 时间)"` Proposal string `orm:"size(256)" description:"(建议)"` Analysis string `orm:"size(256)" description:"(关联分析)"` Mode string `orm:"size(128)" description:"(方式)"` ContainerId string `orm:"size(256)" description:"(容器id)"` ContainerName string `orm:"size(256)" description:"(容器名称)"` Ip string `orm:"" description:"(ip)"` ProcessName string `orm:"" description:"(进程名)"` Pid int `orm:"" description:"(进程id)"` Ppid int `orm:"" description:"(进程父id)"` ImageName string `orm:"-"` Action string `orm:"-" description:"(处理方式:isolation、pause、stop、kill)"` }
func (*WarningInfo) Add ¶
func (this *WarningInfo) Add() Result
func (*WarningInfo) Count ¶
func (this *WarningInfo) Count() int64
func (*WarningInfo) Get ¶
func (this *WarningInfo) Get() *WarningInfo
func (*WarningInfo) List ¶
func (this *WarningInfo) List(from, limit int) Result
func (*WarningInfo) Update ¶
func (this *WarningInfo) Update() Result
type WarningInfoInterface ¶
type WarningInfoInterface interface { List(from, limit int) Result Add() Result Get() *WarningInfo Update() Result }
type WarningWhiteList ¶
type WarningWhiteList struct { Id string `orm:"pk;size(128)" description:"(Id)"` Name string `orm:"size(256)" description:"(白名单项名称)"` Desc string `orm:"" description:"(描述)"` WarningInfoType string `orm:"size(64)" description:"(告警类型)"` WarningInfoName string `orm:"size(64)" description:"(告警名称)"` RuleNode string `orm:"" description:"(节点规则,如主机IP,主机名、容器名、容器ID等)"` Rule string `orm:"" description:"(规则)"` Enabled bool `orm:"" description:"(是否启用)"` IsAll bool `orm:"-" description:"(是否获取全部)"` WarningInfoId string `orm:"size(128)" description:"(外键id)" ` CreateTime int64 `orm:"" description:"(创建时间)"` UpdateTime int64 `orm:"" description:"(修改时间)"` RuleNode_IP string `orm:"-" description:"(节点信息-IP,虚拟字段)"` RuleNode_ContainerId string `orm:"-" description:"(节点信息-容器ID,虚拟字段)"` }
func (*WarningWhiteList) Add ¶
func (this *WarningWhiteList) Add() Result
func (*WarningWhiteList) Delete ¶
func (this *WarningWhiteList) Delete() Result
func (*WarningWhiteList) Get ¶
func (this *WarningWhiteList) Get() (*WarningWhiteList, error)
func (*WarningWhiteList) List ¶
func (this *WarningWhiteList) List(from, limit int) Result
func (*WarningWhiteList) Update ¶
func (this *WarningWhiteList) Update() Result
func (*WarningWhiteList) WhiteList ¶
func (this *WarningWhiteList) WhiteList(from, limit int) (whiteLists []*WarningWhiteList, count int64, err error)
type WarningWhiteListInterface ¶
type WarningWhiteListInterface interface { List(from, limit int) Result Add() Result Update() Result Delete() Result WhiteList() ([]*WarningWhiteList, int64, error) Get() (*WarningWhiteList, error) }
Source Files ¶
- Intrudedetectlog.go
- benchmarklog.go
- casbin.go
- client.go
- clientmoduleset.go
- cmdhistory.go
- containerconfig.go
- containerinfo.go
- containerps.go
- disposalmode.go
- docker_vuln.go
- dockerevent.go
- global.go
- goroutine.go
- group.go
- hostconfig.go
- hostinfo.go
- hostpackage.go
- hostps.go
- hub.go
- imageblocking.go
- imageconfig.go
- imagedetail.go
- imageinfo.go
- job.go
- kubernetes_client.go
- kubernetes_cluster.go
- kubernetes_deployment.go
- kubernetes_namespace.go
- kubernetes_networkpolicy.go
- kubernetes_pod.go
- kubernetes_service.go
- kubernetes_vuln.go
- ldapmanager.go
- license.go
- logconfig.go
- mailservermanager.go
- module.go
- nats.go
- natsmanager.go
- registry.go
- respcenter.go
- result.go
- role.go
- ruledefine.go
- securitycheck.go
- sensitiveinfo.go
- sysconfig.go
- systemtemplate.go
- task.go
- tasklog.go
- tenantimage.go
- timeedgepoint.go
- user.go
- userevent.go
- util.go
- version.go
- viruslog.go
- vulnerabilities.go
- vulnerabilitylib.go
- warninginfo.go
- warningwhitelist.go
- wsdata.go
- wsmanager.go
Click to show internal directories.
Click to hide internal directories.