model

package
v0.0.72 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRulesetRequest

type CreateRulesetRequest struct {
	ContentType string `json:"Content-Type"`

	Body *Ruleset `json:"body,omitempty"`
}

Request Object

func (CreateRulesetRequest) String

func (o CreateRulesetRequest) String() string

type CreateRulesetResponse

type CreateRulesetResponse struct {
	TemplateId     *string `json:"template_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateRulesetResponse) String

func (o CreateRulesetResponse) String() string

type CreateTaskRequest

type CreateTaskRequest struct {
	Body *CreateTaskRequestV2 `json:"body,omitempty"`
}

Request Object

func (CreateTaskRequest) String

func (o CreateTaskRequest) String() string

type CreateTaskRequestV2

type CreateTaskRequestV2 struct {
	CheckType *[]string `json:"check_type,omitempty"`

	GitUrl string `json:"git_url"`

	GitBranch string `json:"git_branch"`

	Language []string `json:"language"`

	RuleSets *[]RuleSetV2 `json:"rule_sets,omitempty"`

	TaskType *string `json:"task_type,omitempty"`

	Username *string `json:"username,omitempty"`

	AccessToken *string `json:"access_token,omitempty"`

	IncConfig *IncConfigV2 `json:"inc_config,omitempty"`

	EnableFossbot *bool `json:"enable_fossbot,omitempty"`

	ResourcePoolId *string `json:"resource_pool_id,omitempty"`
}

func (CreateTaskRequestV2) String

func (o CreateTaskRequestV2) String() string

type CreateTaskResponse

type CreateTaskResponse struct {
	TaskId         *string `json:"task_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateTaskResponse) String

func (o CreateTaskResponse) String() string

type DefectFragmentV2

type DefectFragmentV2 struct {
	LineNum *string `json:"line_num,omitempty"`

	LineContent *string `json:"line_content,omitempty"`

	StartOffset *int32 `json:"start_offset,omitempty"`

	EndOffset *int32 `json:"end_offset,omitempty"`
}

start_offset和end_offset均为-1,表示该行不是缺陷片段或者整行都是,需要结合DefectInfoV2中的line_number属性一起判断哪一行是具体的缺陷片段。

func (DefectFragmentV2) String

func (o DefectFragmentV2) String() string

type DefectInfoV2

type DefectInfoV2 struct {
	DefectId *string `json:"defect_id,omitempty"`

	DefectCheckerName *string `json:"defect_checker_name,omitempty"`

	DefectStatus *string `json:"defect_status,omitempty"`

	RuleSystemTags *string `json:"rule_system_tags,omitempty"`

	RuleName *string `json:"rule_name,omitempty"`

	LineNumber *string `json:"line_number,omitempty"`

	DefectContent *string `json:"defect_content,omitempty"`

	DefectLevel *string `json:"defect_level,omitempty"`

	FilePath *string `json:"file_path,omitempty"`

	CreatedAt *string `json:"created_at,omitempty"`

	IssueKey *string `json:"issue_key,omitempty"`

	Fragment *[]DefectFragmentV2 `json:"fragment,omitempty"`
}

缺陷信息

func (DefectInfoV2) String

func (o DefectInfoV2) String() string

type DeleteTaskRequest

type DeleteTaskRequest struct {
	TaskId string `json:"task_id"`
}

Request Object

func (DeleteTaskRequest) String

func (o DeleteTaskRequest) String() string

type DeleteTaskResponse

type DeleteTaskResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (DeleteTaskResponse) String

func (o DeleteTaskResponse) String() string

type IncConfigV2

type IncConfigV2 struct {
	ParentTaskId *string `json:"parent_task_id,omitempty"`

	GitSourceBranch *string `json:"git_source_branch,omitempty"`

	GitTargetBranch *string `json:"git_target_branch,omitempty"`

	MergeId *string `json:"merge_id,omitempty"`

	EventType *string `json:"event_type,omitempty"`

	Action *string `json:"action,omitempty"`

	Title *string `json:"title,omitempty"`
}

增量检查相关的参数

func (IncConfigV2) String

func (o IncConfigV2) String() string

type ListRulesRequest

type ListRulesRequest struct {
	RuleLanguages *string `json:"rule_languages,omitempty"`

	RuleSeverity *string `json:"rule_severity,omitempty"`

	Offset *int32 `json:"offset,omitempty"`

	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListRulesRequest) String

func (o ListRulesRequest) String() string

type ListRulesResponse

type ListRulesResponse struct {
	Info *[]RuleListItem `json:"info,omitempty"`

	Total          *int32 `json:"total,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListRulesResponse) String

func (o ListRulesResponse) String() string

type ListRulesetsRequest

type ListRulesetsRequest struct {
	Category *string `json:"category,omitempty"`

	Offset *int32 `json:"offset,omitempty"`

	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListRulesetsRequest) String

func (o ListRulesetsRequest) String() string

type ListRulesetsResponse

type ListRulesetsResponse struct {
	Info *[]RulesetItem `json:"info,omitempty"`

	Total          *int32 `json:"total,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListRulesetsResponse) String

func (o ListRulesetsResponse) String() string

type ListTaskRulesetRequest added in v0.0.71

type ListTaskRulesetRequest struct {
	ContentType string `json:"Content-Type"`

	TaskId string `json:"task_id"`
}

Request Object

func (ListTaskRulesetRequest) String added in v0.0.71

func (o ListTaskRulesetRequest) String() string

type ListTaskRulesetRes added in v0.0.71

type ListTaskRulesetRes struct {
	TemplateId *string `json:"template_id,omitempty"`

	Language *string `json:"language,omitempty"`

	TemplateName *string `json:"template_name,omitempty"`

	Type *string `json:"type,omitempty"`

	Status *string `json:"status,omitempty"`
}

func (ListTaskRulesetRes) String added in v0.0.71

func (o ListTaskRulesetRes) String() string

type ListTaskRulesetResponse added in v0.0.71

type ListTaskRulesetResponse struct {
	Body           *[]ListTaskRulesetRes `json:"body,omitempty"`
	HttpStatusCode int                   `json:"-"`
}

Response Object

func (ListTaskRulesetResponse) String added in v0.0.71

func (o ListTaskRulesetResponse) String() string

type ListTemplateRulesRequest added in v0.0.71

type ListTemplateRulesRequest struct {
	RulesetId string `json:"ruleset_id"`

	Types string `json:"types"`

	Languages *string `json:"languages,omitempty"`

	Offset *int32 `json:"offset,omitempty"`

	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListTemplateRulesRequest) String added in v0.0.71

func (o ListTemplateRulesRequest) String() string

type ListTemplateRulesResponse added in v0.0.71

type ListTemplateRulesResponse struct {
	Info *[]RuleItem `json:"info,omitempty"`

	Total          *int32 `json:"total,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListTemplateRulesResponse) String added in v0.0.71

func (o ListTemplateRulesResponse) String() string

type MetricInfo added in v0.0.71

type MetricInfo struct {
	CodeSize *string `json:"code_size,omitempty"`

	RawLines *string `json:"raw_lines,omitempty"`

	MethodsTotal *string `json:"methods_total,omitempty"`

	CyclomaticComplexityTotal *string `json:"cyclomatic_complexity_total,omitempty"`

	CyclomaticComplexityPerMethod *string `json:"cyclomatic_complexity_per_method,omitempty"`

	MaximumCyclomaticComplexity *string `json:"maximum_cyclomatic_complexity,omitempty"`

	HugeCyclomaticComplexityTotal *string `json:"huge_cyclomatic_complexity_total,omitempty"`

	HugeCyclomaticComplexityRatio *string `json:"huge_cyclomatic_complexity_ratio,omitempty"`

	CcaCyclomaticComplexityTotal *string `json:"cca_cyclomatic_complexity_total,omitempty"`

	CcaCyclomaticComplexityPerMethod *string `json:"cca_cyclomatic_complexity_per_method,omitempty"`

	MaximumCcaCyclomaticComplexity *string `json:"maximum_cca_cyclomatic_complexity,omitempty"`

	HugeCcaCyclomaticComplexityTotal *string `json:"huge_cca_cyclomatic_complexity_total,omitempty"`

	CyclomaticComplexityAdequacy *string `json:"cyclomatic_complexity_adequacy,omitempty"`

	MaximumDepth *string `json:"maximum_depth,omitempty"`

	HugeDepthTotal *string `json:"huge_depth_total,omitempty"`

	HugeDepthRatio *string `json:"huge_depth_ratio,omitempty"`

	MethodLines *string `json:"method_lines,omitempty"`

	LinesPerMethod *string `json:"lines_per_method,omitempty"`

	HugeMethodTotal *string `json:"huge_method_total,omitempty"`

	HugeMethodRatio *string `json:"huge_method_ratio,omitempty"`

	FilesTotal *string `json:"files_total,omitempty"`

	FoldersTotal *string `json:"folders_total,omitempty"`

	LinesPerFile *string `json:"lines_per_file,omitempty"`

	HugeHeaderfileTotal *string `json:"huge_headerfile_total,omitempty"`

	HugeHeaderfileRatio *string `json:"huge_headerfile_ratio,omitempty"`

	HugeNonHeaderfileTotal *string `json:"huge_non_headerfile_total,omitempty"`

	HugeNonHeaderfileRatio *string `json:"huge_non_headerfile_ratio,omitempty"`

	HugeFolderTotal *string `json:"huge_folder_total,omitempty"`

	HugeFolderRatio *string `json:"huge_folder_ratio,omitempty"`

	FileDuplicationTotal *string `json:"file_duplication_total,omitempty"`

	FileDuplicationRatio *string `json:"file_duplication_ratio,omitempty"`

	NonHfileDuplicationTotal *string `json:"non_hfile_duplication_total,omitempty"`

	NonHfileDuplicationRatio *string `json:"non_hfile_duplication_ratio,omitempty"`

	CodeDuplicationTotal *string `json:"code_duplication_total,omitempty"`

	CodeDuplicationRatio *string `json:"code_duplication_ratio,omitempty"`

	NonHfileCodeDuplicationTotal *string `json:"non_hfile_code_duplication_total,omitempty"`

	NonHfileCodeDuplicationRatio *string `json:"non_hfile_code_duplication_ratio,omitempty"`

	UnsafeFunctionsTotal *string `json:"unsafe_functions_total,omitempty"`

	UnsafeFunctionsKloc *string `json:"unsafe_functions_kloc,omitempty"`

	RedundantCodeTotal *string `json:"redundant_code_total,omitempty"`

	RedundantCodeKloc *string `json:"redundant_code_kloc,omitempty"`

	WarningSuppressionTotal *string `json:"warning_suppression_total,omitempty"`

	WarningSuppressionKloc *string `json:"warning_suppression_kloc,omitempty"`
}

度量项

func (MetricInfo) String added in v0.0.71

func (o MetricInfo) String() string

type ProgressDetailV2

type ProgressDetailV2 struct {
	Ratio *string `json:"ratio,omitempty"`

	Info *string `json:"info,omitempty"`
}

func (ProgressDetailV2) String

func (o ProgressDetailV2) String() string

type RuleItem added in v0.0.71

type RuleItem struct {
	RuleId *string `json:"rule_id,omitempty"`

	RuleLanguage *string `json:"rule_language,omitempty"`

	RuleName *string `json:"rule_name,omitempty"`

	RuleSeverity *string `json:"rule_severity,omitempty"`

	RuleTages *string `json:"rule_tages,omitempty"`

	Checked *string `json:"checked,omitempty"`
}

func (RuleItem) String added in v0.0.71

func (o RuleItem) String() string

type RuleListItem

type RuleListItem struct {
	RuleId *string `json:"rule_id,omitempty"`

	RuleLanguage *string `json:"rule_language,omitempty"`

	RuleName *string `json:"rule_name,omitempty"`

	RuleSeverity *string `json:"rule_severity,omitempty"`

	RuleTages *string `json:"rule_tages,omitempty"`

	RightExample *string `json:"right_example,omitempty"`

	ErrorExample *string `json:"error_example,omitempty"`

	ReviseOpinion *string `json:"revise_opinion,omitempty"`
}

func (RuleListItem) String

func (o RuleListItem) String() string

type RuleSetV2

type RuleSetV2 struct {
	RulesetId *string `json:"ruleset_id,omitempty"`

	Language string `json:"language"`
}

func (RuleSetV2) String

func (o RuleSetV2) String() string

type Ruleset

type Ruleset struct {
	ProjectId string `json:"project_id"`

	TemplateName string `json:"template_name"`

	Language string `json:"language"`

	IsDefault string `json:"is_default"`

	RuleIds string `json:"rule_ids"`

	UncheckIds *string `json:"uncheck_ids,omitempty"`

	TemplateId *string `json:"template_id,omitempty"`
}

创建规则集信息

func (Ruleset) String

func (o Ruleset) String() string

type RulesetItem

type RulesetItem struct {
	TemplateId *string `json:"template_id,omitempty"`

	Language *string `json:"language,omitempty"`

	TemplateName *string `json:"template_name,omitempty"`

	CreatorId *string `json:"creator_id,omitempty"`

	CreatorName *string `json:"creator_name,omitempty"`

	TemplateCreateTime *string `json:"template_create_time,omitempty"`

	IsUsed *string `json:"is_used,omitempty"`

	RuleIds *string `json:"rule_ids,omitempty"`

	IsDefault *string `json:"is_default,omitempty"`
}

func (RulesetItem) String

func (o RulesetItem) String() string

type RunRequestV2

type RunRequestV2 struct {
	Username *string `json:"username,omitempty"`

	AccessToken *string `json:"access_token,omitempty"`

	GitUrl *string `json:"git_url,omitempty"`

	GitBranch *string `json:"git_branch,omitempty"`
}

代码仓相关的信息非必填,主要是用于CodeFever临时仓库使用,不填时直接使用创建任务时已经提供的信息

func (RunRequestV2) String

func (o RunRequestV2) String() string

type RunTaskRequest

type RunTaskRequest struct {
	TaskId string `json:"task_id"`

	Body *RunRequestV2 `json:"body,omitempty"`
}

Request Object

func (RunTaskRequest) String

func (o RunTaskRequest) String() string

type RunTaskResponse

type RunTaskResponse struct {
	ExecId         *string `json:"exec_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RunTaskResponse) String

func (o RunTaskResponse) String() string

type ShowProgressDetailRequest

type ShowProgressDetailRequest struct {
	TaskId string `json:"task_id"`
}

Request Object

func (ShowProgressDetailRequest) String

func (o ShowProgressDetailRequest) String() string

type ShowProgressDetailResponse

type ShowProgressDetailResponse struct {
	TaskStatus *int32 `json:"task_status,omitempty"`

	Progress       *ProgressDetailV2 `json:"progress,omitempty"`
	HttpStatusCode int               `json:"-"`
}

Response Object

func (ShowProgressDetailResponse) String

type ShowTaskCmetricsRequest added in v0.0.71

type ShowTaskCmetricsRequest struct {
	TaskId string `json:"task_id"`
}

Request Object

func (ShowTaskCmetricsRequest) String added in v0.0.71

func (o ShowTaskCmetricsRequest) String() string

type ShowTaskCmetricsResponse added in v0.0.71

type ShowTaskCmetricsResponse struct {
	TaskId *string `json:"task_id,omitempty"`

	TaskName *string `json:"task_name,omitempty"`

	CreatorId *string `json:"creator_id,omitempty"`

	GitUrl *string `json:"git_url,omitempty"`

	GitBranch *string `json:"git_branch,omitempty"`

	LastCheckTime *string `json:"last_check_time,omitempty"`

	LastExecTime *string `json:"last_exec_time,omitempty"`

	CheckType *string `json:"check_type,omitempty"`

	CreatedAt *string `json:"created_at,omitempty"`

	MetricInfo     *MetricInfo `json:"metric_info,omitempty"`
	HttpStatusCode int         `json:"-"`
}

Response Object

func (ShowTaskCmetricsResponse) String added in v0.0.71

func (o ShowTaskCmetricsResponse) String() string

type ShowTaskDefectsRequest

type ShowTaskDefectsRequest struct {
	TaskId string `json:"task_id"`

	Offset *int32 `json:"offset,omitempty"`

	Limit *int32 `json:"limit,omitempty"`

	StatusIds *string `json:"status_ids,omitempty"`

	Severity *string `json:"severity,omitempty"`
}

Request Object

func (ShowTaskDefectsRequest) String

func (o ShowTaskDefectsRequest) String() string

type ShowTaskDefectsResponse

type ShowTaskDefectsResponse struct {
	Defects *[]DefectInfoV2 `json:"defects,omitempty"`

	Total          *int32 `json:"total,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ShowTaskDefectsResponse) String

func (o ShowTaskDefectsResponse) String() string

type ShowTaskDefectsStatisticRequest

type ShowTaskDefectsStatisticRequest struct {
	TaskId string `json:"task_id"`
}

Request Object

func (ShowTaskDefectsStatisticRequest) String

type ShowTaskDefectsStatisticResponse

type ShowTaskDefectsStatisticResponse struct {
	Severity *StatisticSeverityV2 `json:"severity,omitempty"`

	Status         *StatisticStatusV2 `json:"status,omitempty"`
	HttpStatusCode int                `json:"-"`
}

Response Object

func (ShowTaskDefectsStatisticResponse) String

type ShowTaskDetailRequest

type ShowTaskDetailRequest struct {
	TaskId string `json:"task_id"`
}

Request Object

func (ShowTaskDetailRequest) String

func (o ShowTaskDetailRequest) String() string

type ShowTaskDetailResponse

type ShowTaskDetailResponse struct {
	TaskId *string `json:"task_id,omitempty"`

	TaskName *string `json:"task_name,omitempty"`

	CreatorId *string `json:"creator_id,omitempty"`

	GitUrl *string `json:"git_url,omitempty"`

	GitBranch *string `json:"git_branch,omitempty"`

	LastCheckTime *string `json:"last_check_time,omitempty"`

	CodeLineTotal *int32 `json:"code_line_total,omitempty"`

	CodeLine *int32 `json:"code_line,omitempty"`

	CodeQuality float32 `json:"code_quality,omitempty"`

	IssueCount *int32 `json:"issue_count,omitempty"`

	RiskCoefficient float32 `json:"risk_coefficient,omitempty"`

	DuplicationRatio *string `json:"duplication_ratio,omitempty"`

	ComplexityCount *int32 `json:"complexity_count,omitempty"`

	DuplicatedLines *int32 `json:"duplicated_lines,omitempty"`

	CommentLines *int32 `json:"comment_lines,omitempty"`

	CommentRatio *string `json:"comment_ratio,omitempty"`

	DuplicatedBlocks *int32 `json:"duplicated_blocks,omitempty"`

	LastExecTime *string `json:"last_exec_time,omitempty"`

	CheckType *string `json:"check_type,omitempty"`

	CreatedAt *string `json:"created_at,omitempty"`

	CyclomaticComplexityPerMethod *string `json:"cyclomatic_complexity_per_method,omitempty"`

	CriticalCount *string `json:"critical_count,omitempty"`

	MajorCount *string `json:"major_count,omitempty"`

	MinorCount *string `json:"minor_count,omitempty"`

	SuggestionCount *string `json:"suggestion_count,omitempty"`

	IsAccess *string `json:"is_access,omitempty"`

	TriggerType    *string `json:"trigger_type,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowTaskDetailResponse) String

func (o ShowTaskDetailResponse) String() string

type ShowTaskListByProjectIdRequest

type ShowTaskListByProjectIdRequest struct {
	Offset *int32 `json:"offset,omitempty"`

	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ShowTaskListByProjectIdRequest) String

type ShowTaskListByProjectIdResponse

type ShowTaskListByProjectIdResponse struct {
	Tasks *[]SimpleTaskInfoV2 `json:"tasks,omitempty"`

	Total          *int32 `json:"total,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ShowTaskListByProjectIdResponse) String

type SimpleTaskInfoV2

type SimpleTaskInfoV2 struct {
	TaskId *string `json:"task_id,omitempty"`

	TaskName *string `json:"task_name,omitempty"`

	CreatorId *string `json:"creator_id,omitempty"`

	GitUrl *string `json:"git_url,omitempty"`

	GitBranch *string `json:"git_branch,omitempty"`

	CreatedAt *string `json:"created_at,omitempty"`

	LastCheckTime *string `json:"last_check_time,omitempty"`
}

func (SimpleTaskInfoV2) String

func (o SimpleTaskInfoV2) String() string

type StatisticSeverityV2

type StatisticSeverityV2 struct {
	Critical *int32 `json:"critical,omitempty"`

	Major *int32 `json:"major,omitempty"`

	Minor *int32 `json:"minor,omitempty"`

	Suggestion *int32 `json:"suggestion,omitempty"`
}

func (StatisticSeverityV2) String

func (o StatisticSeverityV2) String() string

type StatisticStatusV2

type StatisticStatusV2 struct {
	Unresolved *int32 `json:"unresolved,omitempty"`

	Resolved *int32 `json:"resolved,omitempty"`

	Dismissed *int32 `json:"dismissed,omitempty"`
}

func (StatisticStatusV2) String

func (o StatisticStatusV2) String() string

type StopTaskByIdRequest

type StopTaskByIdRequest struct {
	TaskId string `json:"task_id"`
}

Request Object

func (StopTaskByIdRequest) String

func (o StopTaskByIdRequest) String() string

type StopTaskByIdResponse

type StopTaskByIdResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (StopTaskByIdResponse) String

func (o StopTaskByIdResponse) String() string

type UpdateDefectRequestBody

type UpdateDefectRequestBody struct {
	DefectId *string `json:"defect_id,omitempty"`

	DefectStatus *string `json:"defect_status,omitempty"`
}

func (UpdateDefectRequestBody) String

func (o UpdateDefectRequestBody) String() string

type UpdateDefectStatusRequest

type UpdateDefectStatusRequest struct {
	TaskId string `json:"task_id"`

	Body *UpdateDefectRequestBody `json:"body,omitempty"`
}

Request Object

func (UpdateDefectStatusRequest) String

func (o UpdateDefectStatusRequest) String() string

type UpdateDefectStatusResponse

type UpdateDefectStatusResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (UpdateDefectStatusResponse) String

type UpdateTaskRulesetItem

type UpdateTaskRulesetItem struct {
	Language string `json:"language"`

	RuleSetId string `json:"rule_set_id"`

	IfUse string `json:"if_use"`

	Status string `json:"status"`
}

func (UpdateTaskRulesetItem) String

func (o UpdateTaskRulesetItem) String() string

type UpdateTaskRulesetRequest

type UpdateTaskRulesetRequest struct {
	ContentType string `json:"Content-Type"`

	TaskId string `json:"task_id"`

	Body *[]UpdateTaskRulesetItem `json:"body,omitempty"`
}

Request Object

func (UpdateTaskRulesetRequest) String

func (o UpdateTaskRulesetRequest) String() string

type UpdateTaskRulesetResponse

type UpdateTaskRulesetResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (UpdateTaskRulesetResponse) String

func (o UpdateTaskRulesetResponse) String() string

Source Files

Jump to

Keyboard shortcuts

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