Documentation ¶
Index ¶
Constants ¶
View Source
const ( Schema = "https" Domain = "www.cnnvd.org.cn" )
View Source
const ( VulnDetailPath = "web/cnnvdVul/getCnnnvdDetailOnDatasource" VulDetailFile = "vuln_detail" )
View Source
const ( FirstPage = 1 MaxPageSize = 50 VulnListPath = "web/homePage/cnnvdVulList" VulListFile = "vuln_list" )
View Source
const (
HazardLevelPath = "web/dictionaries/type/hazardLevel"
)
View Source
const (
ProductPath = "web/homePage/getProductSelectList"
)
View Source
const (
VendorPath = "web/homePage/getVendorSelectList"
)
View Source
const (
VulnTypePath = "web/homePage/vulTypeList"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CNNVD ¶
func (*CNNVD) FormatCNNVD ¶
type CnnvdClient ¶
type ReqHazardLevel ¶
type ReqHazardLevel struct { }
ReqHazardLevel 威胁等级请求参数
func (*ReqHazardLevel) Fetch ¶
func (r *ReqHazardLevel) Fetch(retry int) ([]*model.HazardLevel, error)
type ReqProduct ¶
type ReqProduct struct {
ProductKeyword string `json:"productKeyword"` // 产品关键词
}
ReqProduct 产品选择列表请求参数
type ReqVendor ¶
type ReqVendor struct {
VendorKeyword string `json:"vendorKeyword"` // 供应商关键词
}
ReqVendor 供应商选择列表请求参数
type ReqVulDetail ¶
type ReqVulDetail struct { Id string `json:"id"` // 漏洞id VulType string `json:"vulType"` // 漏洞类型 CnnvdCode string `json:"cnnvdCode"` // cnnvd编号 }
ReqVulDetail cnnvd漏洞详情请求参数
type ReqVulList ¶
type ReqVulList struct { PageIndex int `json:"pageIndex"` // 分页索引 PageSize int `json:"pageSize"` // 分页大小 Keyword string `json:"keyword"` // 关键字 HazardLevel string `json:"hazardLevel"` // 漏洞等级 VulType string `json:"vulType"` // 漏洞类型 Vendor string `json:"vendor"` // 供应商 Product string `json:"product"` // 产品 DateType string `json:"dateType"` // 数据类型 }
ReqVulList cnnvd漏洞列表请求参数
func NewReqVulList ¶
func NewReqVulList(keyword string) *ReqVulList
func (*ReqVulList) GetPageInfo ¶
func (r *ReqVulList) GetPageInfo(retry int) (loopNum int, total int, err error)
type ResCode ¶
type ResCode struct { Code int `json:"code,omitempty"` // 代码 Success bool `json:"success,omitempty"` // 是否成功 Message string `json:"message,omitempty"` // 消息 Time string `json:"time,omitempty"` // 时间 }
ResCode 响应码
type ResHazardLevel ¶
type ResHazardLevel struct { ResCode // 响应码 Data []*model.HazardLevel `json:"data,omitempty"` // 威胁等级列表 }
ResHazardLevel 威胁等级响应参数
type ResProduct ¶
ResProduct 产品选择列表响应参数
type ResVulDetail ¶
ResVulDetail cnnvd漏洞详情响应参数
type ResVulList ¶
ResVulList 供应商选择列表响应参数
type ResVulType ¶
ResVulType 漏洞类型列表响应参数
Click to show internal directories.
Click to hide internal directories.