Documentation ¶
Index ¶
- Constants
- Variables
- type Column
- type DefectDetails
- type HttpService
- func (svc *HttpService) DoAuthRequest(method, endPoint string, headers, params map[string]string, body interface{}, ...) error
- func (svc *HttpService) DoAuthRequestReturnSession(method, endPoint string, headers, params map[string]string, body interface{}, ...) (*http.Cookie, error)
- func (svc *HttpService) DoCookieRequest(method, endPoint string, cookie *http.Cookie, ...) error
- type NextPagePost
- type Project
- type ProjectSearchResult
- type ProjectSearchResultSet
- type ProjectService
- type ReportResult
- type ReportResultSet
- type ReportService
- type ReportsResponse
- type SourceBrowserService
- func (svc *SourceBrowserService) GenerateCweUrl(cweCategory int) string
- func (svc *SourceBrowserService) GetDefectDetails(projectId, defectInstanceId int) (*DefectDetails, error)
- func (svc *SourceBrowserService) GetSourceEvents(projectId, fileInstanceId, defectInstanceId, mergedDefectId int) ([]*SourceEvent, error)
- type SourceEvent
- type SourceEventsResponse
- type View
- type ViewKey
- type ViewService
- type ViewsResponse
Constants ¶
View Source
const (
CweMitreOrgDefinitionsUrl = "http://cwe.mitre.org/data/definitions"
)
Variables ¶
View Source
var ( ReportStatusAll = []string{"新增", "已分类", "已忽略", "已修复", "显式忽略"} ReportStatusFixedOrIgnored = []string{"已忽略", "已修复", "显式忽略"} ReportStatusToFixed = []string{"新增", "已分类"} )
Functions ¶
This section is empty.
Types ¶
type DefectDetails ¶
type HttpService ¶
func (*HttpService) DoAuthRequest ¶
func (svc *HttpService) DoAuthRequest(method, endPoint string, headers, params map[string]string, body interface{}, v interface{}) error
func (*HttpService) DoAuthRequestReturnSession ¶
func (*HttpService) DoCookieRequest ¶
type NextPagePost ¶
type ProjectSearchResult ¶
type ProjectSearchResult struct {
Result []Project `json:"Result"`
}
type ProjectSearchResultSet ¶
type ProjectSearchResultSet struct {
ResultSet ProjectSearchResult `json:"ResultSet"`
}
type ProjectService ¶
type ProjectService struct {
HttpSvc *HttpService
}
func (*ProjectService) GetProjectByName ¶
func (svc *ProjectService) GetProjectByName(name string) (*Project, error)
"https://coverity.d.xiaomi.net/projectsandhierarchies/autocomplete.json?text=xtrace-dlt_test-v9.git.n.xiaomi.com" 只能模糊匹配搜索不能精确搜索,比如搜索xxx,会出来 xxx, xxx-a, xxx-b等 SOAP协议的configuration的GetProjects接口也是返回[]Project数组
type ReportResult ¶
type ReportResult struct { Action string `json:"action"` Checker string `json:"checker"` Cid int `json:"cid"` Classification string `json:"classification"` Comment string `json:"comment"` Committed bool `json:"committed"` Cwe int `json:"cwe"` DisplayCategory string `json:"displayCategory"` DisplayComparison string `json:"displayComparison"` DisplayComponent string `json:"displayComponent"` DisplayFile string `json:"displayFile"` DisplayFirstDetectedBy string `json:"displayFirstDetectedBy"` DisplayFunction string `json:"displayFunction"` DisplayImpact string `json:"displayImpact"` DisplayIssueKind string `json:"displayIssueKind"` DisplayType string `json:"displayType"` Domain string `json:"domain"` ExternalReference string `json:"externalReference"` FileInstanceId int `json:"fileInstanceId"` FileLanguage string `json:"fileLanguage"` FirstDetected string `json:"firstDetected"` FirstSnapshotDate string `json:"firstSnapshotDate"` FirstSnapshotDescription string `json:"firstSnapshotDescription"` FirstSnapshotId int `json:"firstSnapshotId"` FirstSnapshotStream string `json:"firstSnapshotStream"` FirstSnapshotTarget string `json:"firstSnapshotTarget"` FirstSnapshotVersion string `json:"firstSnapshotVersion"` FixTarget string `json:"fixTarget"` FunctionMergeName string `json:"functionMergeName"` Id int `json:"id"` LastDefectInstanceId int `json:"lastDefectInstanceId"` LastDetected string `json:"lastDetected"` LastDetectedDescription string `json:"lastDetectedDescription"` LastDetectedId int `json:"lastDetectedId"` LastDetectedStream string `json:"lastDetectedStream"` LastDetectedTarget string `json:"lastDetectedTarget"` LastDetectedVersion string `json:"lastDetectedVersion"` LastFixed string `json:"lastFixed"` LastTriaged string `json:"lastTriaged"` Legacy string `json:"legacy"` MergeExtra string `json:"mergeExtra"` MergeKey string `json:"mergeKey"` OccurrenceCount int `json:"occurrenceCount"` Owner string `json:"owner"` OwnerFullName string `json:"ownerFullName"` OwnerId int `json:"ownerId"` PivotKey string `json:"pivotKey"` ProjectId int `json:"projectId"` RuleStrength string `json:"ruleStrength"` Severity string `json:"severity"` Status string `json:"status"` Subcategory string `json:"subcategory"` }
type ReportResultSet ¶
type ReportResultSet struct { Limit int `json:"limit"` PageNum int `json:"pageNum"` TotalCount int `json:"totalCount"` Results []ReportResult `json:"results"` }
type ReportService ¶
type ReportService struct {
HttpSvc *HttpService
}
func (*ReportService) GetProjectReports ¶
func (svc *ReportService) GetProjectReports(projectId int, viewId int, statusRange []string) ([]*ReportResult, error)
"https://coverity.d.xiaomi.net/reports/table.json?projectId=10336&viewId=10025"
type ReportsResponse ¶
type ReportsResponse struct { ActiveViewKey ViewKey `json:"activeViewKey"` ResultSet ReportResultSet `json:"resultSet"` }
type SourceBrowserService ¶
type SourceBrowserService struct {
HttpSvc *HttpService
}
func (*SourceBrowserService) GenerateCweUrl ¶
func (svc *SourceBrowserService) GenerateCweUrl(cweCategory int) string
func (*SourceBrowserService) GetDefectDetails ¶
func (svc *SourceBrowserService) GetDefectDetails(projectId, defectInstanceId int) (*DefectDetails, error)
func (*SourceBrowserService) GetSourceEvents ¶
func (svc *SourceBrowserService) GetSourceEvents(projectId, fileInstanceId, defectInstanceId, mergedDefectId int) ([]*SourceEvent, error)
type SourceEvent ¶
type SourceEventsResponse ¶
type SourceEventsResponse struct {
Events []SourceEvent `json:"events"`
}
type ViewService ¶
type ViewService struct {
HttpSvc *HttpService
}
func (*ViewService) GetDefectsView ¶
func (svc *ViewService) GetDefectsView(opt *View) (*View, error)
type ViewsResponse ¶
type ViewsResponse struct {
Views []View `json:"views"`
}
Click to show internal directories.
Click to hide internal directories.