query

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BatchConvert

func BatchConvert(properties []dao.IssueProperty) []*pb.IssuePropertyIndex

func CheckValid

func CheckValid(r *pb.BatchUpdateIssueRequest) error

CheckValid 仅需求、缺陷的处理人/状态可批量更新

func Convert

func Convert(is *dao.IssueProperty) *pb.IssuePropertyIndex

func GetArb

func GetArb(i *pb.IssuePropertyInstance) string

func GetCustomPropertyColumnValue

func GetCustomPropertyColumnValue(pro *pb.IssuePropertyIndex, relations []dao.IssuePropertyRelation, mp map[PropertyEnumPair]string, users map[string]apistructs.Member) string

func GetPbLabelDetail

func GetPbLabelDetail(l apistructs.ProjectLabel) *pb.ProjectLabel

func GetStageMap

func GetStageMap(stages []dao.IssueStage) map[IssueStage]string

GetStageMap return a map,the key is the struct of dice_issue_stage.Value and dice_issue_stage.IssueType, the value is dice_issue_stage.Name example: name: 代码研发, value: codeDevelopment

func GetStateBelongIndex

func GetStateBelongIndex(t string) []string

func GetZhName

func GetZhName(t string) string

func IsEmpty

func IsEmpty(r *pb.UpdateIssueRequest) bool

IsEmpty 判断更新请求里的字段是否均为空

func NewIssueCache

func NewIssueCache(db *dao.DBClient) (*issueCache, error)

Types

type Interface

type Interface interface {
	Paging(req pb.PagingIssueRequest) ([]*pb.Issue, uint64, error)
	GetIssue(id int64, identityInfo *commonpb.IdentityInfo) (*pb.Issue, error)
	AfterIssueUpdate(u *IssueUpdated) error
	UpdateIssue(req *pb.UpdateIssueRequest) error
	UpdateLabels(id, projectID uint64, labelNames []string) (err error)
	SyncLabels(value *syncpb.Value, issueIDs []uint64) error
	BatchUpdateIssue(req *pb.BatchUpdateIssueRequest) error
	GetProperties(req *pb.GetIssuePropertyRequest) ([]*pb.IssuePropertyIndex, error)
	BatchGetProperties(orgID int64, issuesType []string) ([]*pb.IssuePropertyIndex, error)
	CreatePropertyRelation(req *pb.CreateIssuePropertyInstanceRequest) error
	GetIssuePropertyInstance(req *pb.GetIssuePropertyInstanceRequest) (*pb.IssueAndPropertyAndValue, error)
	BatchGetIssuePropertyInstances(orgID int64, projectID uint64, issueType string, issueIDs []uint64) (map[uint64]*pb.IssueAndPropertyAndValue, error)
	GetIssueStage(req *pb.IssueStageRequest) ([]*pb.IssueStage, error)
	GetIssueRelationsByIssueIDs(issueID uint64, relationType []string) ([]uint64, []uint64, error)
	GetIssuesByIssueIDs(issueIDs []uint64) ([]*pb.Issue, error)
	SyncIssueChildrenIteration(issue *pb.Issue, iterationID int64) error
	AfterIssueAppRelationCreate(issueIDs []int64) error
	GetIssueLabelsByProjectID(projectID uint64) ([]dao.IssueLabel, error)
	GetIssuesStatesByProjectID(projectID uint64, issueType string) ([]dao.IssueState, error)
	GetAllIssuesByProject(req pb.IssueListRequest) ([]dao.IssueItem, error)
	GetIssueChildren(id uint64, req pb.PagingIssueRequest) ([]dao.IssueItem, uint64, error)
	GetIssueItem(id uint64) (*dao.IssueItem, error)
	GetIssueParents(issueID uint64, relationType []string) ([]dao.IssueItem, error)
	ListStatesTransByProjectID(projectID uint64) ([]dao.IssueStateTransition, error)
	GetIssueStateIDsByTypes(req *apistructs.IssueStatesRequest) ([]int64, error)
	GetIssueStatesMap(req *pb.GetIssueStatesRequest) (map[string][]pb.IssueStatus, error)
	GetIssueStateIDs(req *pb.GetIssueStatesRequest) ([]int64, error)
	GetIssueStatesBelong(req *pb.GetIssueStateRelationRequest) ([]apistructs.IssueStateState, error)
	AfterIssueInclusionRelationChange(id uint64) error
}

Interface . How to generate mock code:

mockgen -destination pkg/mock/issue_query_mock.go -package mock -source internal/apps/dop/providers/issue/core/query/provider.go -mock_names Interface=MockIssueQuery

type IssueStage

type IssueStage struct {
	Type  string
	Value string
}

type IssueUpdated

type IssueUpdated struct {
	Id uint64

	PlanStartedAt  *time.Time
	PlanFinishedAt *time.Time
	IterationID    int64
	// contains filtered or unexported fields
}

type PropertyEnumPair

type PropertyEnumPair struct {
	PropertyID int64
	ValueID    int64
}

Jump to

Keyboard shortcuts

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