issue

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package issue 封装 事件 相关操作

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	// contains filtered or unexported fields
}

Issue 事件操作封装

func New

func New(options ...Option) *Issue

New 新建 Issue 实例

func (*Issue) BatchConvert

func (svc *Issue) BatchConvert(models []dao.Issue, issueTypes []apistructs.IssueType, identityInfo apistructs.IdentityInfo) ([]apistructs.Issue, error)

BatchConvert 批量转换

func (*Issue) BatchUpdateIssue

func (svc *Issue) BatchUpdateIssue(req *apistructs.IssueBatchUpdateRequest) error

BatchUpdateIssue 批量更新 issue

func (*Issue) BatchUpdateIssuesSubscriber

func (svc *Issue) BatchUpdateIssuesSubscriber(req apistructs.IssueSubscriberBatchUpdateRequest) error

BatchUpdateIssuesSubscriber batch update issue subscriber

func (*Issue) Convert

func (svc *Issue) Convert(model dao.Issue, identityInfo apistructs.IdentityInfo) (*apistructs.Issue, error)

Convert: dao.Issue -> apistructs.Issue

func (*Issue) ConvertWithoutButton

func (svc *Issue) ConvertWithoutButton(model dao.Issue,
	needQueryLabelRef bool, labelIDs []uint64,
	needQueryLabels bool, projectLabels map[uint64]apistructs.ProjectLabel,
) *apistructs.Issue

ConvertWithoutButton 不包括 button

func (*Issue) Create

func (svc *Issue) Create(req *apistructs.IssueCreateRequest) (*dao.Issue, error)

Create 创建事件

func (*Issue) CreateIssueStage

func (svc *Issue) CreateIssueStage(req *apistructs.IssueStageRequest) error

func (*Issue) CreateStream

func (svc *Issue) CreateStream(updateReq apistructs.IssueUpdateRequest, streamFields map[string][]interface{}) error

CreateStream 创建事件流

func (*Issue) Delete

func (svc *Issue) Delete(issueID uint64, identityInfo apistructs.IdentityInfo) error

Delete .

func (*Issue) ExportExcel

func (svc *Issue) ExportExcel(issues []apistructs.Issue, properties []apistructs.IssuePropertyIndex, projectID uint64, isDownload bool, orgID int64, locale string) (io.Reader, string, error)

func (*Issue) ExportExcel2

func (svc *Issue) ExportExcel2(data [][]string, sheetName string) (string, error)

func (*Issue) ExportFalseExcel

func (svc *Issue) ExportFalseExcel(r io.Reader, falseIndex []int, falseReason []string, allNumber int) (*apistructs.IssueImportExcelResponse, error)

func (*Issue) FilterByStateBelong

func (svc *Issue) FilterByStateBelong(stateMap map[int64]dao.IssueState, req *apistructs.IssuePagingRequest) error

FilterByStateBelong 根据主状态过滤

func (*Issue) FilterByStateBelongForPros

func (svc *Issue) FilterByStateBelongForPros(stateMap map[int64]dao.IssueState, projectIDList []uint64, req *apistructs.IssuePagingRequest) error

FilterByStateBelong

func (*Issue) GetAllIssuesByProject added in v1.3.1

func (svc *Issue) GetAllIssuesByProject(req apistructs.IssueListRequest) ([]dao.IssueItem, error)

func (*Issue) GetIssue

func (svc *Issue) GetIssue(req apistructs.IssueGetRequest) (*apistructs.Issue, error)

GetIssue 获取事件

func (*Issue) GetIssueBugPercentage

func (svc *Issue) GetIssueBugPercentage(req apistructs.IssuesStageRequest) (*apistructs.IssueBugPercentageResponse, error)

GetIssueBugPercentage 缺陷率

func (*Issue) GetIssueBugSeverityPercentage

func (svc *Issue) GetIssueBugSeverityPercentage(req apistructs.IssuesStageRequest) ([]apistructs.IssueBugSeverityPercentageResponse, error)

GetIssueBugSeverityPercentage 缺陷等级

func (*Issue) GetIssueBugStatusPercentage

func (svc *Issue) GetIssueBugStatusPercentage(req apistructs.IssuesStageRequest) ([]apistructs.IssueBugStatusPercentageResponse, error)

GetIssueBugStatusPercentage 缺陷状态

func (*Issue) GetIssueLabelsByProjectID added in v1.3.1

func (svc *Issue) GetIssueLabelsByProjectID(projectID uint64) ([]dao.IssueLabel, error)

func (*Issue) GetIssueManHourSum

GetIssueManHourSum 事件流任务总和查询

func (*Issue) GetIssueNumByPros added in v1.2.1

func (svc *Issue) GetIssueNumByPros(projectIDS []uint64, req apistructs.IssuePagingRequest) ([]apistructs.IssueNum, error)

GetIssueNumByPros query by issue request and group by project id list, optimization for workbench issue num

func (*Issue) GetIssueStage

func (svc *Issue) GetIssueStage(req *apistructs.IssueStageRequest) ([]apistructs.IssueStage, error)

func (*Issue) GetIssuesByIssueIDs

func (svc *Issue) GetIssuesByIssueIDs(issueIDs []uint64, identityInfo apistructs.IdentityInfo) ([]apistructs.Issue, error)

GetIssuesByIssueIDs 通过issueIDs获取事件列表

func (*Issue) GetIssuesByStates added in v1.3.0

func (svc *Issue) GetIssuesByStates(req apistructs.WorkbenchRequest) (map[uint64]*apistructs.WorkbenchProjectItem, error)

func (*Issue) GetIssuesStatesByProjectID added in v1.3.1

func (svc *Issue) GetIssuesStatesByProjectID(projectID uint64, issueType apistructs.IssueType) ([]dao.IssueState, error)

func (*Issue) Paging

Paging 分页查询事件

func (*Issue) PagingForWorkbench

func (svc *Issue) PagingForWorkbench(req apistructs.IssuePagingRequest) ([]apistructs.Issue, uint64, error)

get all undone issues by orgid

func (*Issue) RequirementPool

func (svc *Issue) RequirementPool() ([]apistructs.Issue, error)

func (*Issue) StateCheckPermission

func (svc *Issue) StateCheckPermission(req *apistructs.PermissionCheckRequest, st int64, ed int64) (bool, error)

StateCheckPermission 事件状态Button鉴权

func (*Issue) Subscribe

func (svc *Issue) Subscribe(id int64, identityInfo apistructs.IdentityInfo) error

Subscribe subscribe issue

func (*Issue) Unsubscribe

func (svc *Issue) Unsubscribe(id int64, identityInfo apistructs.IdentityInfo) error

Unsubscribe unsubscribe issue

func (*Issue) UpdateIssue

func (svc *Issue) UpdateIssue(req apistructs.IssueUpdateRequest) error

UpdateIssue 更新事件

func (*Issue) UpdateIssueType

func (svc *Issue) UpdateIssueType(req *apistructs.IssueTypeUpdateRequest) (int64, error)

UpdateIssueType 转换issue类型

type Option

type Option func(*Issue)

Option 定义 Issue 配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bdl

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 Issue 数据库选项

func WithIssueRelated added in v1.3.0

func WithIssueRelated(issueRelated *issuerelated.IssueRelated) Option

WithIssueRelated set issue related svc

func WithIssueStream

func WithIssueStream(stream *issuestream.IssueStream) Option

WithIssueStream 配置 事件流 选项

func WithTranslator added in v1.3.0

func WithTranslator(tran i18n.Translator) Option

func WithUCClient

func WithUCClient(uc *ucauth.UCClient) Option

WithUCClient 配置 uc client

Jump to

Keyboard shortcuts

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