Documentation ¶
Overview ¶
Package dbclient 定义数据库操作的方法, orm 等。
Index ¶
- Constants
- Variables
- func NotDeleted(db *gorm.DB) *gorm.DB
- func ValidateTestSetDirectoryLength(dir string) error
- type AutoTestExecHistory
- type AutoTestFileTreeNode
- type AutoTestFileTreeNodeHistory
- type AutoTestFileTreeNodeMeta
- type AutoTestPlanMember
- type AutoTestScene
- type AutoTestSceneInput
- type AutoTestSceneOutput
- type AutoTestSceneStep
- type AutoTestSpace
- type AutoTestSpaceSceneSetStats
- type AutoTestSpaceSceneStats
- type AutoTestSpaceSceneStepStats
- type CodeCoverageExecRecord
- type CodeCoverageExecRecordShort
- type CodeCoverageNodes
- type CodeCoverageSetting
- type DBClient
- func (client *DBClient) AddTestPlanV2Step(req *apistructs.TestPlanV2StepAddRequest) (uint64, error)
- func (db *DBClient) AfterUpdateAutoTestSpaceElements(spaceID uint64)
- func (db *DBClient) BatchClearScore() error
- func (client *DBClient) BatchCopyTestCases(req apistructs.TestCaseBatchCopyRequest) error
- func (client *DBClient) BatchCreateAutoTestPlanMembers(members []AutoTestPlanMember) error
- func (client *DBClient) BatchCreateLabelRelations(lr []LabelRelation) error
- func (client *DBClient) BatchCreateTestPlanCaseRels(rels []TestPlanCaseRel) error
- func (client *DBClient) BatchCreateTestPlanMembers(members []TestPlanMember) error
- func (client *DBClient) BatchDeleteSonarMetricRules(rules []QASonarMetricRules) (err error)
- func (client *DBClient) BatchDeleteTestCases(ids []uint64) error
- func (client *DBClient) BatchInsertSonarMetricRules(rules []*QASonarMetricRules) (err error)
- func (client *DBClient) BatchQueryIssueLabelIDMap(issueIDs []int64) (map[uint64][]uint64, error)
- func (client *DBClient) BatchUpdateRecords() error
- func (client *DBClient) BatchUpdateTestCases(req apistructs.TestCaseBatchUpdateRequest) error
- func (client *DBClient) BatchUpdateTestPlanCaseRels(req apistructs.TestPlanCaseRelBatchUpdateRequest) error
- func (db *DBClient) BulkInsert(objects interface{}, excludeColumns ...string) error
- func (client *DBClient) CancelCodeCoverage(projectID uint64, workspace string, record *CodeCoverageExecRecord) error
- func (client *DBClient) CancelQuoteCertificate(quoteCertificateID int64) error
- func (client *DBClient) CheckRelatedSceneSet(setId uint64) (bool, error)
- func (client *DBClient) CheckSceneSetIsExists(setID uint64) error
- func (client *DBClient) CheckTestPlanCaseRelIDsExistOrNot(planID uint64, caseIDs []uint64) ([]uint64, []uint64, error)
- func (client *DBClient) CheckTestPlanV2NameExist(name string) error
- func (client *DBClient) CleanTestCasesByTestSetID(projectID, testSetID uint64) error
- func (db *DBClient) CleanTestSetFromRecycleBin(testSetID uint64) error
- func (db *DBClient) Close() error
- func (db *DBClient) CommitScore() error
- func (db *DBClient) Copy(scene *AutoTestScene, isCopyTo bool) error
- func (db *DBClient) CopyAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
- func (db *DBClient) CountAutoTestSceneSteps(planIDs []uint64) (stepCount apistructs.AutoTestSceneStepCount, err error)
- func (db *DBClient) CountSceneByPlanIDs(planIDs ...uint64) (sceneCount apistructs.AutoTestSceneCount, err error)
- func (db *DBClient) CountSceneBySetID(setId uint64) (uint64, error)
- func (db *DBClient) CountSceneBySpaceID(spaceID uint64) (uint64, error)
- func (client *DBClient) CountSceneSetByName(name string, spaceID uint64) (int, error)
- func (db *DBClient) CreateAutoTestFileTreeNode(node *AutoTestFileTreeNode) error
- func (db *DBClient) CreateAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
- func (db *DBClient) CreateAutoTestFileTreeNodeMeta(meta *AutoTestFileTreeNodeMeta) error
- func (client *DBClient) CreateAutoTestPlanMember(mem *AutoTestPlanMember) error
- func (db *DBClient) CreateAutoTestSceneInput(input *AutoTestSceneInput) error
- func (db *DBClient) CreateAutoTestSceneInputs(input []AutoTestSceneInput) error
- func (db *DBClient) CreateAutoTestSceneOutput(output *AutoTestSceneOutput) error
- func (db *DBClient) CreateAutoTestSceneOutputs(output []AutoTestSceneOutput) error
- func (db *DBClient) CreateAutoTestSceneStep(step *AutoTestSceneStep) error
- func (db *DBClient) CreateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
- func (db *DBClient) CreateAutotestScene(scene *AutoTestScene) error
- func (client *DBClient) CreateBranchRule(branchRule *model.BranchRule) error
- func (client *DBClient) CreateCertificate(certificate *model.Certificate) error
- func (client *DBClient) CreateCodeCoverage(record *CodeCoverageExecRecord) error
- func (client *DBClient) CreateComment(comment *model.Comment) error
- func (client *DBClient) CreateFile(file *File) error
- func (db *DBClient) CreateIssueFilterBookmark(bm *IssueFilterBookmark) error
- func (client *DBClient) CreateIteration(Iteration *Iteration) error
- func (client *DBClient) CreateLabelRelation(lr *LabelRelation) error
- func (client *DBClient) CreateLibReference(libReference *LibReference) error
- func (db *DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaAddExtraByInode(inode string, addExtra map[string]interface{}) error
- func (db *DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaPipelineYmlAndSnippetObjByInode(inode, pipelineYml string, snippetAction pb.PipelineYmlAction) error
- func (db *DBClient) CreateOrUpdateMemberActiveRank(r *MemberActiveScore) error
- func (client *DBClient) CreateOrUpdateNexusRepository(repo *NexusRepository) error
- func (client *DBClient) CreateOrUpdateNexusUser(user *NexusUser) error
- func (db *DBClient) CreateOrUpdateProjectHome(projectID string, readme string, links string, updater string) error
- func (client *DBClient) CreatePublisher(publisher *model.Publisher) error
- func (client *DBClient) CreateRecord(record *TestFileRecord) error
- func (client *DBClient) CreateSceneSet(sceneSet *SceneSet) error
- func (client *DBClient) CreateTestCase(uc *TestCase) error
- func (client *DBClient) CreateTestPlan(testPlan *TestPlan) error
- func (client *DBClient) CreateTestPlanCaseRel(testPlanCaseRel *TestPlanCaseRel) error
- func (client *DBClient) CreateTestPlanMember(mem *TestPlanMember) error
- func (client *DBClient) CreateTestPlanV2(testPlan *TestPlanV2) error
- func (client *DBClient) CreateTestReportRecord(record *TestReportRecord) error
- func (db *DBClient) CreateTestSet(testset *TestSet) error
- func (client *DBClient) CreateTicket(ticket *model.Ticket) error
- func (db *DBClient) DeleteAutoTestFileTreeNodeByInode(inode string) error
- func (db *DBClient) DeleteAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
- func (client *DBClient) DeleteAutoTestPlanMemberByPlanID(planID uint64) error
- func (db *DBClient) DeleteAutoTestScene(id uint64) (err error)
- func (db *DBClient) DeleteAutoTestSceneInput(id uint64) error
- func (db *DBClient) DeleteAutoTestSceneOutput(id uint64) error
- func (db *DBClient) DeleteAutoTestSceneStep(id uint64) error
- func (db *DBClient) DeleteAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
- func (db *DBClient) DeleteAutoTestSpaceRelation(spaceID uint64) error
- func (client *DBClient) DeleteBranchRule(id int64) error
- func (client *DBClient) DeleteBranchRuleByScope(scopeType apistructs.ScopeType, scopeID int64) error
- func (client *DBClient) DeleteCertificate(certificateID int64) error
- func (client *DBClient) DeleteFile(id uint64) error
- func (db *DBClient) DeleteIssueFilterBookmarkByID(id string) error
- func (client *DBClient) DeleteIteration(id uint64) error
- func (client *DBClient) DeleteLabelRelations(refType apistructs.ProjectLabelType, refID string, labelIDs []uint64) error
- func (client *DBClient) DeleteLabelRelationsByLabel(labelID uint64) error
- func (client *DBClient) DeleteLibReference(libReferenceID uint64) error
- func (client *DBClient) DeletePublisher(publisherID int64) error
- func (client *DBClient) DeleteRecordBy(id uint64) error
- func (client *DBClient) DeleteSceneSet(sceneSet *SceneSet, scenes []uint64) error
- func (client *DBClient) DeleteTestPlan(testPlanID uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelByTestCaseID(testCaseID uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelByTestPlanID(testPlanID uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelations(testPlanID uint64, relIDs []uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelationsByTestCaseIds(testCaseIds []uint64) error
- func (client *DBClient) DeleteTestPlanMemberByPlanID(planID uint64) error
- func (client *DBClient) DeleteTestPlanV2ByID(testPlanID uint64) error
- func (client *DBClient) DeleteTestPlanV2Step(req *apistructs.TestPlanV2StepDeleteRequest) error
- func (client *DBClient) DeleteTicket(targetID, targetType, ticketType string) error
- func (client *DBClient) ExecHistoryApiAvgCostTime(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistoryApiAvgCostTime, err error)
- func (client *DBClient) ExecHistoryApiStatusCount(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistoryApiStatusCount, err error)
- func (client *DBClient) ExecHistorySceneApiStatusCount(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistorySceneApiStatusCount, err error)
- func (client *DBClient) ExecHistorySceneAvgCostTime(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistorySceneAvgCostTime, err error)
- func (client *DBClient) ExecHistorySceneStatusCount(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistorySceneStatusCount, err error)
- func (client *DBClient) FindByPreId(id uint64) (*SceneSet, error)
- func (client *DBClient) FindIterations(projectID uint64) (iterations []Iteration, err error)
- func (db *DBClient) FindMemberRank(orgID, userID string) (*MemberActiveRank, uint64, error)
- func (db *DBClient) FindSceneBySetAndName(setId uint64, name string) ([]AutoTestScene, error)
- func (client *DBClient) FindSceneSetsByName(name string, spaceID uint64) ([]SceneSet, error)
- func (client *DBClient) FirstFileReady(actionType ...apistructs.FileActionType) (bool, *TestFileRecord, error)
- func (db *DBClient) FuzzySearchAutoTestFileTreeNodes(scope, scopeID string, prefixFuzzy, suffixFuzzy, fuzzy string, ...) ([]AutoTestFileTreeNode, error)
- func (db *DBClient) GetAllTestSets() ([]TestSet, error)
- func (client *DBClient) GetAppCertificateByAppIDAndCertificateID(appID, quoteCertificateID uint64) (*model.AppCertificate, error)
- func (client *DBClient) GetAppCertificateByApprovalID(approvalID int64) (*model.AppCertificate, error)
- func (client *DBClient) GetAppCertificateByID(quoteCertificateID uint64) (model.AppCertificate, error)
- func (client *DBClient) GetAppCertificatesByOrgIDAndName(params *apistructs.AppCertificateListRequest) (int, []model.AppCertificate, error)
- func (client *DBClient) GetApplicationByID(applicationID int64) (model.Application, error)
- func (client *DBClient) GetAutoTestExecHistoryByPipelineID(pipelineID uint64) (AutoTestExecHistory, error)
- func (db *DBClient) GetAutoTestFileTreeNodeByInode(inode string) (*AutoTestFileTreeNode, bool, error)
- func (db *DBClient) GetAutoTestFileTreeNodeMetaByInode(inode string) (*AutoTestFileTreeNodeMeta, bool, error)
- func (db *DBClient) GetAutoTestFileTreeScopeRootDir(scope, scopeID string) (*AutoTestFileTreeNode, bool, error)
- func (db *DBClient) GetAutoTestSceneInput(id uint64) (*AutoTestSceneInput, error)
- func (db *DBClient) GetAutoTestSceneOutput(id uint64) (*AutoTestSceneOutput, error)
- func (db *DBClient) GetAutoTestScenePreByPosition(req apistructs.AutotestSceneRequest) (uint64, uint64, bool, error)
- func (db *DBClient) GetAutoTestSceneStep(id uint64) (*AutoTestSceneStep, error)
- func (db *DBClient) GetAutoTestSceneStepByPreID(preID uint64, preType apistructs.PreType) (*AutoTestSceneStep, error)
- func (db *DBClient) GetAutoTestSceneStepCount(sceneID []uint64) ([]GetNum, error)
- func (db *DBClient) GetAutoTestSceneStepNumber(sceneID uint64) (uint64, error)
- func (db *DBClient) GetAutoTestSpace(id uint64) (*AutoTestSpace, error)
- func (db *DBClient) GetAutoTestSpaceStats(spaceIDs []uint64) ([]AutoTestSpaceSceneSetStats, []AutoTestSpaceSceneStats, ...)
- func (db *DBClient) GetAutoTestSpaceStepNumber(spaceID uint64) (uint64, error)
- func (db *DBClient) GetAutotestScene(id uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSceneByName(name string, setID uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSceneByPreID(preID uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSceneFirst(setID uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSceneTx(id uint64, tx *gorm.DB) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSpaceByName(name string, projectID int64) (*AutoTestSpace, error)
- func (client *DBClient) GetBranchRule(id int64) (model.BranchRule, error)
- func (client *DBClient) GetBranchRulesCount(scopeType apistructs.ScopeType) (int64, error)
- func (client *DBClient) GetCertificateByID(certificateID int64) (model.Certificate, error)
- func (client *DBClient) GetCertificateByOrgAndName(orgID int64, name string) (*model.Certificate, error)
- func (client *DBClient) GetCertificatesByIDs(certificateIDs []int64, params *apistructs.CertificateListRequest) (int, []model.Certificate, error)
- func (client *DBClient) GetCertificatesByOrgIDAndName(orgID int64, params *apistructs.CertificateListRequest) (int, []model.Certificate, error)
- func (client *DBClient) GetClusterOpenTicketsNum(ticketType, targetType, targetID string) (uint64, error)
- func (client *DBClient) GetCodeCoverageByID(id uint64) (*CodeCoverageExecRecord, error)
- func (client *DBClient) GetCodeCoverageSettingByProjectID(projectID uint64, workSpace string) (*CodeCoverageSetting, error)
- func (client *DBClient) GetCommentByID(commentID int64) (*model.Comment, error)
- func (client *DBClient) GetCommentsByTicketID(ticketID int64, pageNo, pageSize int) (int64, []model.Comment, error)
- func (client *DBClient) GetCountByCertificateID(certificateID int64) (int64, error)
- func (client *DBClient) GetEnvConfigByID(configID int64) (*model.ConfigItem, error)
- func (client *DBClient) GetEnvConfigByKey(namespaceID int64, key string) (*model.ConfigItem, error)
- func (client *DBClient) GetEnvConfigsByNamespaceID(namespaceID int64) ([]model.ConfigItem, error)
- func (client *DBClient) GetFile(id uint64) (File, error)
- func (client *DBClient) GetFileByUUID(uuid string) (File, error)
- func (client *DBClient) GetIteration(id uint64) (*Iteration, error)
- func (client *DBClient) GetIterationByTitle(projectID uint64, title string) (*Iteration, error)
- func (client *DBClient) GetLabelRelationsByLabels(refType apistructs.ProjectLabelType, labelIDs []uint64) ([]LabelRelation, error)
- func (client *DBClient) GetLabelRelationsByRef(refType apistructs.ProjectLabelType, refID string) ([]LabelRelation, error)
- func (client *DBClient) GetLastCommentByTicket(ticketID int64) (*model.Comment, error)
- func (client *DBClient) GetLibReference(libReferenceID uint64) (*LibReference, error)
- func (db *DBClient) GetMaxOrderNumUnderParentTestSet(projectID, parentID uint64, recycled bool) (int, error)
- func (db *DBClient) GetMemberActiveRank(orgID, userID string) (*MemberActiveRank, error)
- func (db *DBClient) GetMemberActiveRankList(orgID string, limit int) ([]MemberActiveRank, error)
- func (client *DBClient) GetNamespaceByName(name string) (*model.ConfigNamespace, error)
- func (client *DBClient) GetNamespaceRelationByName(name string) (*model.ConfigNamespaceRelation, error)
- func (client *DBClient) GetNamespaceRelationsByDefaultName(name string) ([]model.ConfigNamespaceRelation, error)
- func (client *DBClient) GetNamespacesByNames(names []string) ([]model.ConfigNamespace, error)
- func (client *DBClient) GetNexusRepository(id uint64) (*NexusRepository, error)
- func (client *DBClient) GetNexusRepositoryByName(name string) (*NexusRepository, error)
- func (client *DBClient) GetNexusUser(id uint64) (*NexusUser, error)
- func (client *DBClient) GetNexusUserByName(name string) (*NexusUser, error)
- func (client *DBClient) GetOpenTicketByKey(key string) (*model.Ticket, error)
- func (client *DBClient) GetOrgClusterRelationsByOrg(orgID uint64) ([]model.OrgClusterRelation, error)
- func (client *DBClient) GetOrgPublishersCount(orgID uint64) (int64, error)
- func (db *DBClient) GetProjectHome(projectID string) (*ProjectHome, error)
- func (client *DBClient) GetPublisherByID(publisherID int64) (model.Publisher, error)
- func (client *DBClient) GetPublisherByOrgAndName(orgID int64, name string) (*model.Publisher, error)
- func (client *DBClient) GetPublisherByOrgID(orgID int64) (*model.Publisher, error)
- func (client *DBClient) GetPublishersByIDs(publisherIDs []int64, params *apistructs.PublisherListRequest) (int, []model.Publisher, error)
- func (client *DBClient) GetPublishersByOrgIDAndName(orgID int64, params *apistructs.PublisherListRequest) (int, []model.Publisher, error)
- func (client *DBClient) GetRecord(id uint64) (*TestFileRecord, error)
- func (client *DBClient) GetSceneSet(id uint64) (*SceneSet, error)
- func (client *DBClient) GetSceneSetByPreID(preID uint64) (*SceneSet, error)
- func (client *DBClient) GetSonarMetricRules(ID int64) (*QASonarMetricRules, error)
- func (client *DBClient) GetStepByTestPlanID(testPlanID uint64, needSort bool) ([]TestPlanV2StepJoin, int64, error)
- func (client *DBClient) GetTestCaseByID(id uint64) (*TestCase, error)
- func (client *DBClient) GetTestPlan(testPlanID uint64) (*TestPlan, error)
- func (client *DBClient) GetTestPlanByName(projectID uint64, name string) (*TestPlan, error)
- func (client *DBClient) GetTestPlanCaseRel(relID uint64) (*TestPlanCaseRel, error)
- func (client *DBClient) GetTestPlanCaseRelByPlanIDAndCaseID(planID, caseID uint64) (*TestPlanCaseRel, error)
- func (client *DBClient) GetTestPlanV2ByID(testPlanID uint64) (*TestPlanV2, error)
- func (client *DBClient) GetTestPlanV2Step(ID uint64) (*TestPlanV2StepJoin, error)
- func (client *DBClient) GetTestPlanV2StepByPreID(preID uint64) (*TestPlanV2Step, error)
- func (client *DBClient) GetTestReportRecordByID(id uint64) (TestReportRecord, error)
- func (db *DBClient) GetTestSetByID(id uint64) (*TestSet, error)
- func (db *DBClient) GetTestSetByNameAndParentIDAndProjectID(projectID, parentID uint64, recycled bool, name string) (*TestSet, error)
- func (db *DBClient) GetTestSetByParentID(parentID, projectID uint64) (*[]TestSet, error)
- func (db *DBClient) GetTestSetByParentIDAndProjectIDAsc(parentIDs []uint64, projectID uint64, recycled bool, testSetIDs []uint64) ([]TestSet, error)
- func (db *DBClient) GetTestSetByParentIDsAndProjectID(parentIDs []uint64, projectID uint64, recycled bool) ([]TestSet, error)
- func (db *DBClient) GetTestSetDirectoryByID(id uint64) (string, error)
- func (client *DBClient) GetTicket(ticketID int64) (*model.Ticket, error)
- func (client *DBClient) GetTicketByRequestID(requestID string) (*model.Ticket, error)
- func (client *DBClient) GetUserAutoTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
- func (client *DBClient) GetUserTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
- func (db *DBClient) Insert(scene *AutoTestScene, id uint64) error
- func (db *DBClient) InsertAutoTestSceneStep(req apistructs.AutotestSceneRequest, preID uint64) (uint64, error)
- func (db *DBClient) IssueScore() error
- func (client *DBClient) ListAutoTestExecHistory(timeStart, timeEnd string, planIDs ...uint64) ([]AutoTestExecHistory, error)
- func (db *DBClient) ListAutoTestFileTreeNodeByPinode(pinode string) ([]AutoTestFileTreeNode, error)
- func (db *DBClient) ListAutoTestFileTreeNodeByPinodeAndNamePrefix(pinode, namePrefix string) ([]AutoTestFileTreeNode, error)
- func (db *DBClient) ListAutoTestFileTreeNodeHistoryByinode(inode string) ([]AutoTestFileTreeNodeHistory, error)
- func (client *DBClient) ListAutoTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]AutoTestPlanMember, error)
- func (client *DBClient) ListAutoTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]AutoTestPlanMember, error)
- func (client *DBClient) ListAutoTestPlanOwnersByOwners(owners []string) ([]AutoTestPlanMember, error)
- func (client *DBClient) ListAutoTestPlanOwnersByPlanID(testPlanID uint64) ([]AutoTestPlanMember, error)
- func (db *DBClient) ListAutoTestSceneInput(sceneID uint64) ([]AutoTestSceneInput, error)
- func (db *DBClient) ListAutoTestSceneInputByScenes(sceneID []uint64) ([]AutoTestSceneInput, error)
- func (db *DBClient) ListAutoTestSceneOutput(sceneID uint64) ([]AutoTestSceneOutput, error)
- func (db *DBClient) ListAutoTestSceneOutputByScenes(sceneID []uint64) ([]AutoTestSceneOutput, error)
- func (db *DBClient) ListAutoTestSceneStep(sceneID uint64) ([]AutoTestSceneStep, error)
- func (db *DBClient) ListAutoTestSceneSteps(sceneID []uint64) ([]AutoTestSceneStep, error)
- func (db *DBClient) ListAutoTestSpaceByProject(req apistructs.AutoTestSpaceListRequest) ([]AutoTestSpace, int, error)
- func (db *DBClient) ListAutotestScene(req apistructs.AutotestSceneRequest) (uint64, []AutoTestScene, error)
- func (db *DBClient) ListAutotestSceneByGroupID(setID, groupID uint64) (scenes []AutoTestScene, err error)
- func (db *DBClient) ListAutotestSceneTx(req apistructs.AutotestSceneRequest, tx *gorm.DB) (uint64, []AutoTestScene, error)
- func (db *DBClient) ListAutotestScenes(setIDs []uint64) ([]AutoTestScene, error)
- func (client *DBClient) ListCodeCoverage(req apistructs.CodeCoverageListRequest) (records []CodeCoverageExecRecordShort, total uint64, err error)
- func (client *DBClient) ListCodeCoverageByStatus(projectID uint64, status []apistructs.CodeCoverageExecStatus, workspace string) (records []CodeCoverageExecRecord, err error)
- func (client *DBClient) ListEnvConfigsByNamespaceID(namespaceIDList []int64) ([]model.ConfigItem, error)
- func (client *DBClient) ListExecHistorySceneSetByParentPID(parentPID uint64) (list []AutoTestExecHistory, err error)
- func (client *DBClient) ListExpiredFiles(expiredAt time.Time) ([]File, error)
- func (client *DBClient) ListFileRecordApiFileUUIDsByTime(t time.Time) ([]FileUUIDStr, error)
- func (client *DBClient) ListFileRecordsByState(state apistructs.FileRecordState) ([]*TestFileRecord, error)
- func (db *DBClient) ListIssueFilterBookmarkByUserIDAndProjectID(userID, projectID string) ([]IssueFilterBookmark, error)
- func (client *DBClient) ListLibReference(req *apistructs.LibReferenceListRequest) (uint64, []LibReference, error)
- func (client *DBClient) ListNamespaceByAppID(name string) ([]model.ConfigNamespace, error)
- func (client *DBClient) ListNamespaceByName(names []string) ([]model.ConfigNamespace, error)
- func (client *DBClient) ListNexusRepositories(req apistructs.NexusRepositoryListRequest) ([]*NexusRepository, error)
- func (client *DBClient) ListNexusUsers(req apistructs.NexusUserListRequest) ([]NexusUser, error)
- func (client *DBClient) ListRecordsByProject(req apistructs.ListTestFileRecordsRequest) ([]TestFileRecord, map[string]int, int, error)
- func (db *DBClient) ListSceneBySceneSetID(setIDs ...uint64) ([]AutoTestScene, int64, error)
- func (client *DBClient) ListSonarMetricRules(query *QASonarMetricRules, otherQueryFuncList ...func(sql *gorm.DB) *gorm.DB) (dbRules []QASonarMetricRules, err error)
- func (client *DBClient) ListStepByPlanID(planIDs ...uint64) ([]TestPlanV2StepJoin, error)
- func (client *DBClient) ListTestCasesByIDs(ids []uint64) ([]TestCase, error)
- func (client *DBClient) ListTestCasesByTestSetIDs(req apistructs.TestCaseListRequest) ([]TestCase, error)
- func (client *DBClient) ListTestPlanCaseRels(req apistructs.TestPlanCaseRelListRequest) ([]TestPlanCaseRel, error)
- func (client *DBClient) ListTestPlanCaseRelsCount(testPlanIDs []uint64) (map[uint64]apistructs.TestPlanRelsCount, error)
- func (client *DBClient) ListTestPlanIDsByOwnerIDs(ownerIDs []string) ([]uint64, error)
- func (client *DBClient) ListTestPlanIDsByPartnerIDs(partnerIDs []string) ([]uint64, error)
- func (client *DBClient) ListTestPlanIDsByUserIDs(userIDs []string, roles ...apistructs.TestPlanMemberRole) ([]uint64, error)
- func (client *DBClient) ListTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]TestPlanMember, error)
- func (client *DBClient) ListTestPlanOwnersByOwners(owners []string) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanOwnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanPartnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanTestSetIDs(testPlanID uint64) ([]uint64, error)
- func (client *DBClient) ListTestPlanV2ByID(ids ...uint64) ([]TestPlanV2, error)
- func (client *DBClient) ListTestPlanV2Step(testPlanID, groupID uint64) ([]TestPlanV2StepJoin, error)
- func (client *DBClient) ListTestReportRecord(req apistructs.TestReportRecordListRequest) ([]TestReportRecord, uint64, error)
- func (db *DBClient) ListTestSetByIDs(ids []uint64) ([]TestSet, error)
- func (db *DBClient) ListTestSets(req apistructs.TestSetListRequest) ([]TestSet, error)
- func (db *DBClient) ListTestSetsRecursive(req apistructs.TestSetListRequest) ([]uint64, []TestSet, error)
- func (db *DBClient) MoveAutoTestFileTreeNode(inode, pinode, name, updaterID string) error
- func (db *DBClient) MoveAutoTestScene(id, newPreID, newSetID uint64, tx *gorm.DB) (err error)
- func (db *DBClient) MoveAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
- func (db *DBClient) MoveAutoTestSceneStepGroup(req apistructs.AutotestSceneRequest) error
- func (db *DBClient) MoveAutoTestSceneStepToGroup(req apistructs.AutotestSceneRequest) error
- func (db *DBClient) MoveAutoTestSceneV2(req apistructs.AutotestSceneMoveRequest) error
- func (client *DBClient) MoveSceneSet(req apistructs.SceneSetRequest) error
- func (client *DBClient) MoveTestPlanV2Step(req *apistructs.TestPlanV2StepMoveRequest) error
- func (client *DBClient) OverwriteAutoTestPlanMembers(testPlanID uint64, members []AutoTestPlanMember) error
- func (client *DBClient) OverwriteAutoTestPlanOwner(testPlanID uint64, ownerID string) error
- func (client *DBClient) OverwriteAutoTestPlanPartners(testPlanID uint64, partnerIDs []string) error
- func (client *DBClient) OverwriteTestPlanMembers(testPlanID uint64, members []TestPlanMember) error
- func (client *DBClient) OverwriteTestPlanOwner(testPlanID uint64, ownerID string) error
- func (client *DBClient) OverwriteTestPlanPartners(testPlanID uint64, partnerIDs []string) error
- func (client *DBClient) PagingIterations(req apistructs.IterationPagingRequest) ([]Iteration, uint64, error)
- func (client *DBClient) PagingSonarMetricRules(req apistructs.SonarMetricRulesPagingRequest) (*dbclient.Paging, error)
- func (client *DBClient) PagingTestCases(req apistructs.TestCasePagingRequest) ([]TestCase, uint64, error)
- func (client *DBClient) PagingTestPlan(req apistructs.TestPlanPagingRequest) (uint64, []TestPlan, error)
- func (client *DBClient) PagingTestPlanCaseRelations(req apistructs.TestPlanCaseRelPagingRequest) ([]TestPlanCaseRelDetail, uint64, error)
- func (client *DBClient) PagingTestPlanV2(req *apistructs.TestPlanV2PagingRequest) (int, []*apistructs.TestPlanV2, []string, error)
- func (db *DBClient) QualityScore() error
- func (client *DBClient) QueryAppPublishItemRelations(req apistructs.QueryAppPublishItemRelationRequest) ([]apistructs.AppPublishItemRelation, error)
- func (client *DBClient) QueryBranchRules(scopeType apistructs.ScopeType, scopeID int64) ([]model.BranchRule, error)
- func (client *DBClient) QueryBranchRulesByScope(scopeType apistructs.ScopeType) ([]model.BranchRule, error)
- func (client *DBClient) QuoteCertificate(certificate *model.AppCertificate) error
- func (client *DBClient) RecoverTestCasesByTestSetID(projectID, testSetID uint64) error
- func (db *DBClient) RecoverTestSet(testSetID, targetTestSetID uint64, name string) error
- func (db *DBClient) RecycleTestSet(testSetID uint64, newParentID *uint64) error
- func (client *DBClient) RecycledTestCasesByTestSetID(projectID, testSetID uint64) error
- func (client *DBClient) RemovePublishItemRelations(request *apistructs.RemoveAppPublishItemRelationsRequest) error
- func (client *DBClient) SaveCodeCoverageSettingByProjectID(record *CodeCoverageSetting) (*CodeCoverageSetting, error)
- func (client *DBClient) SceneSetsBySpaceID(spaceID uint64) ([]SceneSet, error)
- func (client *DBClient) SoftDeleteEnvConfig(config *model.ConfigItem) error
- func (client *DBClient) SoftDeleteNamespace(namespace *model.ConfigNamespace) error
- func (client *DBClient) SoftDeleteNamespaceRelation(namespaceRelation *model.ConfigNamespaceRelation) error
- func (db *DBClient) Sq() *gorm.DB
- func (db *DBClient) Transaction(f func(tx *gorm.DB) error) error
- func (db *DBClient) Tx() *TX
- func (client *DBClient) UpdateAppPublishItemRelations(request *apistructs.UpdateAppPublishItemRelationRequest) error
- func (client *DBClient) UpdateApprovalStatusByApprovalID(approvalID uint64, status apistructs.ApprovalStatus) error
- func (db *DBClient) UpdateAutoTestFileTreeNodeBasicInfo(inode string, updateColumns map[string]interface{}) error
- func (client *DBClient) UpdateAutoTestPlanMember(mem *AutoTestPlanMember) error
- func (db *DBClient) UpdateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
- func (db *DBClient) UpdateAutotestScene(node *AutoTestScene) error
- func (db *DBClient) UpdateAutotestSceneInput(input *AutoTestSceneInput) error
- func (db *DBClient) UpdateAutotestSceneOutput(output *AutoTestSceneOutput) error
- func (db *DBClient) UpdateAutotestSceneStep(step *AutoTestSceneStep) error
- func (db *DBClient) UpdateAutotestSceneUpdateAt(sceneID uint64, time time.Time) error
- func (db *DBClient) UpdateAutotestSceneUpdater(sceneID uint64, userID string) error
- func (client *DBClient) UpdateBranchRule(branchRule *model.BranchRule) error
- func (client *DBClient) UpdateCertificate(certificate *model.Certificate) error
- func (client *DBClient) UpdateCodeCoverage(record *CodeCoverageExecRecord) error
- func (client *DBClient) UpdateComment(comment *model.Comment) error
- func (client *DBClient) UpdateIteration(Iteration *Iteration) error
- func (client *DBClient) UpdateOrAddEnvConfig(config *model.ConfigItem) error
- func (client *DBClient) UpdateOrAddNamespace(namespace *model.ConfigNamespace) error
- func (client *DBClient) UpdateOrAddNamespaceRelation(namespaceRelation *model.ConfigNamespaceRelation) error
- func (client *DBClient) UpdatePublisher(publisher *model.Publisher) error
- func (client *DBClient) UpdateQuoteCertificate(certificate *model.AppCertificate) error
- func (client *DBClient) UpdateRecord(record *TestFileRecord) error
- func (db *DBClient) UpdateSceneRefSetID(copyRefs apistructs.AutoTestSceneCopyRef) error
- func (client *DBClient) UpdateSceneSet(sceneSet *SceneSet) (*SceneSet, error)
- func (client *DBClient) UpdateSonarMetricRules(updateObj *QASonarMetricRules) (err error)
- func (client *DBClient) UpdateTestCase(uc *TestCase) error
- func (client *DBClient) UpdateTestPlan(testPlan *TestPlan) error
- func (client *DBClient) UpdateTestPlanMember(mem *TestPlanMember) error
- func (client *DBClient) UpdateTestPlanTestCaseRel(testPlanCaseRel *TestPlanCaseRel) error
- func (client *DBClient) UpdateTestPlanV2(testPlanID uint64, fields map[string]interface{}) error
- func (client *DBClient) UpdateTestPlanV2Step(step TestPlanV2Step) error
- func (client *DBClient) UpdateTestReportRecord(record *TestReportRecord) error
- func (db *DBClient) UpdateTestSet(testset *TestSet) error
- func (client *DBClient) UpdateTicket(ticket *model.Ticket) error
- type File
- type FileExtra
- type FileUUIDStr
- type GetNum
- type IssueFilterBookmark
- type Iteration
- type LabelRelation
- type LibReference
- type MemberActiveRank
- type MemberActiveScore
- type NexusRepository
- type NexusRepositoryConfig
- type NexusUser
- type NexusUserConfig
- type OSSSnapshot
- type PartnerIDs
- type ProjectHome
- type QASonarMetricRules
- type SceneSet
- type TX
- type TestCase
- type TestCaseStepAndResults
- type TestFileExtra
- type TestFileRecord
- type TestPlan
- type TestPlanCaseRel
- type TestPlanCaseRelDetail
- type TestPlanMember
- type TestPlanV2
- type TestPlanV2Join
- type TestPlanV2Step
- type TestPlanV2StepJoin
- type TestReportData
- type TestReportRecord
- type TestSet
Constants ¶
const BULK_INSERT_CHUNK_SIZE = 3000
const IsDeleteValue = "Y"
Variables ¶
var ( ErrNotFoundOrg = errors.New("org not found") ErrNotFoundProject = errors.New("project not found") ErrNotFoundApplication = errors.New("application not found") ErrNotFoundMember = errors.New("member not found") ErrNotFoundTicket = errors.New("ticket not found") ErrNotFoundPublisher = errors.New("publisher not found") ErrNotFoundCertificate = errors.New("certificate not found") ErrNotFoundApprove = errors.New("approve not found") ErrNotFoundUsecase = errors.New("usecase not found") )
dao层错误码统一定义
Functions ¶
Types ¶
type AutoTestExecHistory ¶
type AutoTestExecHistory struct { dbengine.BaseModel CreatorID string ProjectID uint64 SpaceID uint64 IterationID uint64 PlanID uint64 SceneID uint64 SceneSetID uint64 StepID uint64 ParentPID uint64 Type apistructs.StepAPIType Status apistructs.PipelineStatus PipelineYml string // Used to record the order of scenes,sceneSets and steps ExecuteApiNum int64 SuccessApiNum int64 PassRate float64 ExecuteRate float64 TotalApiNum int64 ExecuteTime time.Time CostTimeSec int64 OrgID uint64 TimeBegin time.Time TimeEnd time.Time PipelineID uint64 }
func (*AutoTestExecHistory) Convert ¶
func (a *AutoTestExecHistory) Convert() apistructs.AutoTestExecHistoryDto
func (AutoTestExecHistory) TableName ¶
func (AutoTestExecHistory) TableName() string
type AutoTestFileTreeNode ¶
type AutoTestFileTreeNode struct { dbengine.BaseModel Type apistructs.UnifiedFileTreeNodeType Scope string ScopeID string Pinode string `gorm:"type:bigint(20)"` // root dir 的 pinode 为 "0",表示无 pinode Inode string `gorm:"type:bigint(20)"` Name string Desc string CreatorID string UpdaterID string }
Inode / Pinode 使用 snowflake uuid
func (AutoTestFileTreeNode) TableName ¶
func (AutoTestFileTreeNode) TableName() string
type AutoTestFileTreeNodeHistory ¶
type AutoTestFileTreeNodeHistory struct { dbengine.BaseModel Pinode string `gorm:"type:bigint(20)"` // root dir 的 pinode 为 "0",表示无 pinode Inode string `gorm:"type:bigint(20)"` Name string `gorm:"name"` Desc string `gorm:"desc"` CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` PipelineYml string `gorm:"pipeline_yml"` // 节点的 pipeline yml 文件,pipeline 可以通过 snippetAction 配置 SnippetAction snippetActionType `gorm:"snippet_action"` // 其他用例或计划通过 snippet 方式引用时当前节点时, 根据该参数拼装出 snippet action Extra autoTestFileTreeNodeMetaExtra `gorm:"extra"` }
func (AutoTestFileTreeNodeHistory) TableName ¶
func (AutoTestFileTreeNodeHistory) TableName() string
type AutoTestFileTreeNodeMeta ¶
type AutoTestFileTreeNodeMeta struct { dbengine.BaseModel Inode string `gorm:"type:bigint(20)"` PipelineYml string // 节点的 pipeline yml 文件,pipeline 可以通过 snippetAction 配置 SnippetAction snippetActionType // 其他用例或计划通过 snippet 方式引用时当前节点时, 根据该参数拼装出 snippet action Extra autoTestFileTreeNodeMetaExtra }
func (AutoTestFileTreeNodeMeta) TableName ¶
func (AutoTestFileTreeNodeMeta) TableName() string
type AutoTestPlanMember ¶
type AutoTestPlanMember struct { dbengine.BaseModel TestPlanID uint64 `json:"testPlanID"` Role apistructs.TestPlanMemberRole `json:"role"` UserID string `json:"userID"` }
AutoTestPlanMember 自动测试计划成员表
func (AutoTestPlanMember) TableName ¶
func (AutoTestPlanMember) TableName() string
type AutoTestScene ¶
type AutoTestScene struct { dbengine.BaseModel Name string `gorm:"name"` Description string `gorm:"description"` // 描述 SpaceID uint64 `gorm:"space_id"` // 场景所属测试空间ID SetID uint64 `gorm:"set_id"` // 场景集ID PreID uint64 `gorm:"pre_id"` // 排序的前驱ID CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` Status apistructs.SceneStatus `gorm:"status"` RefSetID uint64 `gorm:"ref_set_id"` // 引用场景集ID GroupID uint64 `gorm:"group_id"` // scene group, in the same group run with parallel Policy apistructs.PolicyType `gorm:"policy"` }
func (*AutoTestScene) Convert ¶
func (s *AutoTestScene) Convert() apistructs.AutoTestScene
func (AutoTestScene) TableName ¶
func (AutoTestScene) TableName() string
type AutoTestSceneInput ¶
type AutoTestSceneInput struct { dbengine.BaseModel Name string `gorm:"name"` Value string `gorm:"value"` // 默认值 Temp string `gorm:"temp"` // 当前值 Description string `gorm:"description"` // 描述 SceneID uint64 `gorm:"scene_id"` // 场景ID SpaceID uint64 `gorm:"space_id"` // 所属测试空间ID CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` }
func (AutoTestSceneInput) TableName ¶
func (AutoTestSceneInput) TableName() string
type AutoTestSceneOutput ¶
type AutoTestSceneOutput struct { dbengine.BaseModel Name string `gorm:"name"` Value string `gorm:"value"` // 值表达式 Description string `gorm:"description"` // 描述 SceneID uint64 `gorm:"scene_id"` // 场景ID SpaceID uint64 `gorm:"space_id"` // 所属测试空间ID CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` }
func (AutoTestSceneOutput) TableName ¶
func (AutoTestSceneOutput) TableName() string
type AutoTestSceneStep ¶
type AutoTestSceneStep struct { dbengine.BaseModel Type apistructs.StepAPIType `gorm:"type"` // 类型 Value string `gorm:"value"` // 值 Name string `gorm:"name"` // 名称 PreID uint64 `gorm:"pre_id"` // 排序id PreType apistructs.PreType `gorm:"pre_type"` // 串行/并行类型 SceneID uint64 `gorm:"scene_id"` // 场景ID SpaceID uint64 `gorm:"space_id"` // 所属测试空间ID APISpecID uint64 `gorm:"column:api_spec_id"` // api集市id IsDisabled bool `gorm:"is_disabled"` // disable or enable step execute CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` }
func (*AutoTestSceneStep) Convert ¶
func (v *AutoTestSceneStep) Convert() *apistructs.AutoTestSceneStep
func (AutoTestSceneStep) TableName ¶
func (AutoTestSceneStep) TableName() string
type AutoTestSpace ¶
type AutoTestSpace struct { dbengine.BaseModel Name string ProjectID int64 Description string CreatorID string UpdaterID string Status apistructs.AutoTestSpaceStatus ArchiveStatus apistructs.AutoTestSpaceArchiveStatus // 被复制的源测试空间 SourceSpaceID *uint64 // DeletedAt 删除时间 DeletedAt *time.Time }
AutoTestSpace 测试空间
type AutoTestSpaceSceneStats ¶
type CodeCoverageExecRecord ¶
type CodeCoverageExecRecord struct { dbengine.BaseModel ProjectID uint64 `json:"project_id"` Status apistructs.CodeCoverageExecStatus `json:"status"` ReportStatus apistructs.CodeCoverageExecStatus `json:"report_status"` Msg string `json:"msg"` ReportMsg string `json:"report_msg"` Coverage float64 `json:"coverage"` ReportUrl string `json:"report_url"` ReportTime time.Time `json:"report_time"` ReportContent CodeCoverageNodes `json:"report_content" sql:"TYPE:json"` StartExecutor string `json:"start_executor"` EndExecutor string `json:"end_executor"` TimeBegin time.Time `json:"time_begin"` TimeEnd time.Time `json:"time_end"` Workspace string `json:"workspace"` }
func (*CodeCoverageExecRecord) Covert ¶
func (c *CodeCoverageExecRecord) Covert() *apistructs.CodeCoverageExecRecordDto
func (CodeCoverageExecRecord) TableName ¶
func (CodeCoverageExecRecord) TableName() string
type CodeCoverageExecRecordShort ¶
type CodeCoverageExecRecordShort struct { dbengine.BaseModel ProjectID uint64 `json:"project_id"` Status apistructs.CodeCoverageExecStatus `json:"status"` ReportStatus apistructs.CodeCoverageExecStatus `json:"report_status"` Msg string `json:"msg"` ReportMsg string `json:"report_msg"` Coverage float64 `json:"coverage"` ReportUrl string `json:"report_url"` StartExecutor string `json:"start_executor"` EndExecutor string `json:"end_executor"` TimeBegin time.Time `json:"time_begin"` TimeEnd time.Time `json:"time_end"` ReportTime time.Time `json:"report_time"` }
func (*CodeCoverageExecRecordShort) Covert ¶
func (c *CodeCoverageExecRecordShort) Covert() apistructs.CodeCoverageExecRecordDto
func (CodeCoverageExecRecordShort) TableName ¶
func (CodeCoverageExecRecordShort) TableName() string
type CodeCoverageNodes ¶
type CodeCoverageNodes []*apistructs.CodeCoverageNode
func (*CodeCoverageNodes) Scan ¶
func (c *CodeCoverageNodes) Scan(input interface{}) error
type CodeCoverageSetting ¶
type CodeCoverageSetting struct { dbengine.BaseModel ProjectID uint64 `json:"project_id"` MavenSetting string `json:"maven_setting"` Includes string `json:"includes"` Excludes string `json:"excludes"` Workspace string `json:"workspace"` }
func (CodeCoverageSetting) TableName ¶
func (CodeCoverageSetting) TableName() string
type DBClient ¶
func (*DBClient) AddTestPlanV2Step ¶
func (client *DBClient) AddTestPlanV2Step(req *apistructs.TestPlanV2StepAddRequest) (uint64, error)
AddTestPlanV2Step Insert a step in the test plan
func (*DBClient) AfterUpdateAutoTestSpaceElements ¶
func (*DBClient) BatchClearScore ¶
func (*DBClient) BatchCopyTestCases ¶
func (client *DBClient) BatchCopyTestCases(req apistructs.TestCaseBatchCopyRequest) error
func (*DBClient) BatchCreateAutoTestPlanMembers ¶
func (client *DBClient) BatchCreateAutoTestPlanMembers(members []AutoTestPlanMember) error
func (*DBClient) BatchCreateLabelRelations ¶
func (client *DBClient) BatchCreateLabelRelations(lr []LabelRelation) error
func (*DBClient) BatchCreateTestPlanCaseRels ¶
func (client *DBClient) BatchCreateTestPlanCaseRels(rels []TestPlanCaseRel) error
func (*DBClient) BatchCreateTestPlanMembers ¶
func (client *DBClient) BatchCreateTestPlanMembers(members []TestPlanMember) error
func (*DBClient) BatchDeleteSonarMetricRules ¶
func (client *DBClient) BatchDeleteSonarMetricRules(rules []QASonarMetricRules) (err error)
func (*DBClient) BatchDeleteTestCases ¶
func (*DBClient) BatchInsertSonarMetricRules ¶
func (client *DBClient) BatchInsertSonarMetricRules(rules []*QASonarMetricRules) (err error)
func (*DBClient) BatchQueryIssueLabelIDMap ¶
BatchGetIssueLabelIDMap 批量查询 issue label id
func (*DBClient) BatchUpdateRecords ¶
func (*DBClient) BatchUpdateTestCases ¶
func (client *DBClient) BatchUpdateTestCases(req apistructs.TestCaseBatchUpdateRequest) error
func (*DBClient) BatchUpdateTestPlanCaseRels ¶
func (client *DBClient) BatchUpdateTestPlanCaseRels(req apistructs.TestPlanCaseRelBatchUpdateRequest) error
BatchUpdateTestPlanCaseRels 批量更新测试计划用例
func (*DBClient) BulkInsert ¶
func (*DBClient) CancelCodeCoverage ¶
func (client *DBClient) CancelCodeCoverage(projectID uint64, workspace string, record *CodeCoverageExecRecord) error
CancelCodeCoverage .
func (*DBClient) CancelQuoteCertificate ¶
CancelQuoteCertificate 取消引用Certificate
func (*DBClient) CheckRelatedSceneSet ¶
func (*DBClient) CheckSceneSetIsExists ¶
CheckSceneSetIsExists check the SceneSet is exists
func (*DBClient) CheckTestPlanCaseRelIDsExistOrNot ¶
func (client *DBClient) CheckTestPlanCaseRelIDsExistOrNot(planID uint64, caseIDs []uint64) ([]uint64, []uint64, error)
CheckTestPlanCaseRelIDsExistOrNot 返回已存在和不存在的 id 列表 return: existIDs, notExistIDs, error
func (*DBClient) CheckTestPlanV2NameExist ¶
CheckTestPlanV2NameExist Check if the name of the test plan is repeated
func (*DBClient) CleanTestCasesByTestSetID ¶
CleanTestCasesByTestSetID 彻底删除测试集下的测试用例
func (*DBClient) CleanTestSetFromRecycleBin ¶
func (*DBClient) CommitScore ¶
func (*DBClient) CopyAutoTestSceneStep ¶
func (db *DBClient) CopyAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
func (*DBClient) CountAutoTestSceneSteps ¶
func (db *DBClient) CountAutoTestSceneSteps(planIDs []uint64) (stepCount apistructs.AutoTestSceneStepCount, err error)
func (*DBClient) CountSceneByPlanIDs ¶
func (db *DBClient) CountSceneByPlanIDs(planIDs ...uint64) (sceneCount apistructs.AutoTestSceneCount, err error)
func (*DBClient) CountSceneBySetID ¶
func (*DBClient) CountSceneBySpaceID ¶
func (*DBClient) CountSceneSetByName ¶
func (*DBClient) CreateAutoTestFileTreeNode ¶
func (db *DBClient) CreateAutoTestFileTreeNode(node *AutoTestFileTreeNode) error
func (*DBClient) CreateAutoTestFileTreeNodeHistory ¶
func (db *DBClient) CreateAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
func (*DBClient) CreateAutoTestFileTreeNodeMeta ¶
func (db *DBClient) CreateAutoTestFileTreeNodeMeta(meta *AutoTestFileTreeNodeMeta) error
func (*DBClient) CreateAutoTestPlanMember ¶
func (client *DBClient) CreateAutoTestPlanMember(mem *AutoTestPlanMember) error
func (*DBClient) CreateAutoTestSceneInput ¶
func (db *DBClient) CreateAutoTestSceneInput(input *AutoTestSceneInput) error
func (*DBClient) CreateAutoTestSceneInputs ¶
func (db *DBClient) CreateAutoTestSceneInputs(input []AutoTestSceneInput) error
func (*DBClient) CreateAutoTestSceneOutput ¶
func (db *DBClient) CreateAutoTestSceneOutput(output *AutoTestSceneOutput) error
func (*DBClient) CreateAutoTestSceneOutputs ¶
func (db *DBClient) CreateAutoTestSceneOutputs(output []AutoTestSceneOutput) error
func (*DBClient) CreateAutoTestSceneStep ¶
func (db *DBClient) CreateAutoTestSceneStep(step *AutoTestSceneStep) error
func (*DBClient) CreateAutoTestSpace ¶
func (db *DBClient) CreateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
CreateAutoTestSpace 创建测试空间
func (*DBClient) CreateAutotestScene ¶
func (db *DBClient) CreateAutotestScene(scene *AutoTestScene) error
func (*DBClient) CreateBranchRule ¶
func (client *DBClient) CreateBranchRule(branchRule *model.BranchRule) error
CreateBranchRule 创建分支规则
func (*DBClient) CreateCertificate ¶
func (client *DBClient) CreateCertificate(certificate *model.Certificate) error
CreateCertificate 创建Certificate
func (*DBClient) CreateCodeCoverage ¶
func (client *DBClient) CreateCodeCoverage(record *CodeCoverageExecRecord) error
CreateCodeCoverage .
func (*DBClient) CreateComment ¶
CreateComment 创建工单评论
func (*DBClient) CreateFile ¶
func (*DBClient) CreateIssueFilterBookmark ¶
func (db *DBClient) CreateIssueFilterBookmark(bm *IssueFilterBookmark) error
func (*DBClient) CreateIteration ¶
CreateIteration 创建
func (*DBClient) CreateLabelRelation ¶
func (client *DBClient) CreateLabelRelation(lr *LabelRelation) error
CreateLabelRelation 创建标签关联关系
func (*DBClient) CreateLibReference ¶
func (client *DBClient) CreateLibReference(libReference *LibReference) error
CreateLibReference 创建库引用
func (*DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaAddExtraByInode ¶
func (*DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaPipelineYmlAndSnippetObjByInode ¶
func (db *DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaPipelineYmlAndSnippetObjByInode(inode, pipelineYml string, snippetAction pb.PipelineYmlAction) error
func (*DBClient) CreateOrUpdateMemberActiveRank ¶
func (db *DBClient) CreateOrUpdateMemberActiveRank(r *MemberActiveScore) error
func (*DBClient) CreateOrUpdateNexusRepository ¶
func (client *DBClient) CreateOrUpdateNexusRepository(repo *NexusRepository) error
func (*DBClient) CreateOrUpdateNexusUser ¶
func (*DBClient) CreateOrUpdateProjectHome ¶
func (*DBClient) CreatePublisher ¶
CreatePublisher 创建Publisher
func (*DBClient) CreateRecord ¶
func (client *DBClient) CreateRecord(record *TestFileRecord) error
Create Record
func (*DBClient) CreateSceneSet ¶
Create Scene Set
func (*DBClient) CreateTestCase ¶
CreateTestCase 创建测试用例
func (*DBClient) CreateTestPlan ¶
CreateTestPlan Create test plan
func (*DBClient) CreateTestPlanCaseRel ¶
func (client *DBClient) CreateTestPlanCaseRel(testPlanCaseRel *TestPlanCaseRel) error
CreateTestPlanCaseRel Create testPlanCaseRel
func (*DBClient) CreateTestPlanMember ¶
func (client *DBClient) CreateTestPlanMember(mem *TestPlanMember) error
func (*DBClient) CreateTestPlanV2 ¶
func (client *DBClient) CreateTestPlanV2(testPlan *TestPlanV2) error
CreateTestPlanV2 Create test plan
func (*DBClient) CreateTestReportRecord ¶
func (client *DBClient) CreateTestReportRecord(record *TestReportRecord) error
func (*DBClient) CreateTestSet ¶
CreateTestSet insert testset
func (*DBClient) CreateTicket ¶
CreateTicket 创建工单
func (*DBClient) DeleteAutoTestFileTreeNodeByInode ¶
func (*DBClient) DeleteAutoTestFileTreeNodeHistory ¶
func (db *DBClient) DeleteAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
func (*DBClient) DeleteAutoTestPlanMemberByPlanID ¶
func (*DBClient) DeleteAutoTestScene ¶
func (*DBClient) DeleteAutoTestSceneInput ¶
func (*DBClient) DeleteAutoTestSceneOutput ¶
func (*DBClient) DeleteAutoTestSceneStep ¶
func (*DBClient) DeleteAutoTestSpace ¶
func (db *DBClient) DeleteAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
DeleteAutoTestSpace 删除测试空间
func (*DBClient) DeleteAutoTestSpaceRelation ¶
DeleteAutoTestSpaceRelation 删除测试空间关联
func (*DBClient) DeleteBranchRule ¶
DeleteBranchRule 删除分支规则
func (*DBClient) DeleteBranchRuleByScope ¶
func (client *DBClient) DeleteBranchRuleByScope(scopeType apistructs.ScopeType, scopeID int64) error
DeleteBranchRuleByScope 批量删除分支规则
func (*DBClient) DeleteCertificate ¶
DeleteCertificate 删除Certificate
func (*DBClient) DeleteFile ¶
func (*DBClient) DeleteIssueFilterBookmarkByID ¶
func (*DBClient) DeleteIteration ¶
DeleteIteration 删除
func (*DBClient) DeleteLabelRelations ¶
func (client *DBClient) DeleteLabelRelations(refType apistructs.ProjectLabelType, refID string, labelIDs []uint64) error
DeleteLabelRelations 删除标签关联关系
func (*DBClient) DeleteLabelRelationsByLabel ¶
DeleteLabelRelationsByLabel 根据 labelID 删除标签
func (*DBClient) DeleteLibReference ¶
DeleteLibReference 删除库引用
func (*DBClient) DeletePublisher ¶
DeletePublisher 删除Publisher
func (*DBClient) DeleteRecordBy ¶
Delete Record by id
func (*DBClient) DeleteSceneSet ¶
Delete Sceneset
func (*DBClient) DeleteTestPlan ¶
DeleteTestPlan Delete test plan
func (*DBClient) DeleteTestPlanCaseRelByTestCaseID ¶
DeleteTestPlanCaseRelByTestCaseID Delete relations by testCaseID
func (*DBClient) DeleteTestPlanCaseRelByTestPlanID ¶
DeleteTestPlanCaseRelByTestPlanID Delete relations by testPlanID
func (*DBClient) DeleteTestPlanCaseRelations ¶
DeleteTestPlanCaseRelations
func (*DBClient) DeleteTestPlanCaseRelationsByTestCaseIds ¶
DeleteTestPlanCaseRelationsByTestCaseIds
func (*DBClient) DeleteTestPlanMemberByPlanID ¶
func (*DBClient) DeleteTestPlanV2ByID ¶
DeleteTestPlanV2ByID Delete test plan and his all steps by ID
func (*DBClient) DeleteTestPlanV2Step ¶
func (client *DBClient) DeleteTestPlanV2Step(req *apistructs.TestPlanV2StepDeleteRequest) error
DeleteTestPlanV2Step Delete a step in the test plan
func (*DBClient) DeleteTicket ¶
DeleteTicket 删除工单
func (*DBClient) ExecHistoryApiAvgCostTime ¶
func (client *DBClient) ExecHistoryApiAvgCostTime(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistoryApiAvgCostTime, err error)
ExecHistoryApiAvgCostTime .
func (*DBClient) ExecHistoryApiStatusCount ¶
func (client *DBClient) ExecHistoryApiStatusCount(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistoryApiStatusCount, err error)
ExecHistoryApiStatusCount .
func (*DBClient) ExecHistorySceneApiStatusCount ¶
func (client *DBClient) ExecHistorySceneApiStatusCount(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistorySceneApiStatusCount, err error)
ExecHistorySceneApiStatusCount .
func (*DBClient) ExecHistorySceneAvgCostTime ¶
func (client *DBClient) ExecHistorySceneAvgCostTime(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistorySceneAvgCostTime, err error)
ExecHistorySceneAvgCostTime .
func (*DBClient) ExecHistorySceneStatusCount ¶
func (client *DBClient) ExecHistorySceneStatusCount(req apistructs.StatisticsExecHistoryRequest) (list []apistructs.ExecHistorySceneStatusCount, err error)
ExecHistorySceneStatusCount .
func (*DBClient) FindIterations ¶
func (*DBClient) FindMemberRank ¶
func (db *DBClient) FindMemberRank(orgID, userID string) (*MemberActiveRank, uint64, error)
func (*DBClient) FindSceneBySetAndName ¶
func (db *DBClient) FindSceneBySetAndName(setId uint64, name string) ([]AutoTestScene, error)
func (*DBClient) FindSceneSetsByName ¶
func (*DBClient) FirstFileReady ¶
func (client *DBClient) FirstFileReady(actionType ...apistructs.FileActionType) (bool, *TestFileRecord, error)
func (*DBClient) FuzzySearchAutoTestFileTreeNodes ¶
func (*DBClient) GetAllTestSets ¶
func (*DBClient) GetAppCertificateByAppIDAndCertificateID ¶
func (client *DBClient) GetAppCertificateByAppIDAndCertificateID(appID, quoteCertificateID uint64) (*model.AppCertificate, error)
GetAppCertificateByAppIDAndCertificateID 根据certificateID获取应用Certificate信息
func (*DBClient) GetAppCertificateByApprovalID ¶
func (client *DBClient) GetAppCertificateByApprovalID(approvalID int64) (*model.AppCertificate, error)
GetAppCertificateByApprovalID 根据certificateID获取应用Certificate信息
func (*DBClient) GetAppCertificateByID ¶
func (client *DBClient) GetAppCertificateByID(quoteCertificateID uint64) (model.AppCertificate, error)
GetAppCertificateByID 根据certificateID获取应用Certificate信息
func (*DBClient) GetAppCertificatesByOrgIDAndName ¶
func (client *DBClient) GetAppCertificatesByOrgIDAndName(params *apistructs.AppCertificateListRequest) ( int, []model.AppCertificate, error)
GetAppCertificatesByOrgIDAndName 根据appID和状态获取Certificate列表
func (*DBClient) GetApplicationByID ¶
func (client *DBClient) GetApplicationByID(applicationID int64) (model.Application, error)
func (*DBClient) GetAutoTestExecHistoryByPipelineID ¶
func (client *DBClient) GetAutoTestExecHistoryByPipelineID(pipelineID uint64) (AutoTestExecHistory, error)
GetAutoTestExecHistoryByPipelineID .
func (*DBClient) GetAutoTestFileTreeNodeByInode ¶
func (db *DBClient) GetAutoTestFileTreeNodeByInode(inode string) (*AutoTestFileTreeNode, bool, error)
func (*DBClient) GetAutoTestFileTreeNodeMetaByInode ¶
func (db *DBClient) GetAutoTestFileTreeNodeMetaByInode(inode string) (*AutoTestFileTreeNodeMeta, bool, error)
func (*DBClient) GetAutoTestFileTreeScopeRootDir ¶
func (db *DBClient) GetAutoTestFileTreeScopeRootDir(scope, scopeID string) (*AutoTestFileTreeNode, bool, error)
func (*DBClient) GetAutoTestSceneInput ¶
func (db *DBClient) GetAutoTestSceneInput(id uint64) (*AutoTestSceneInput, error)
func (*DBClient) GetAutoTestSceneOutput ¶
func (db *DBClient) GetAutoTestSceneOutput(id uint64) (*AutoTestSceneOutput, error)
func (*DBClient) GetAutoTestScenePreByPosition ¶
func (db *DBClient) GetAutoTestScenePreByPosition(req apistructs.AutotestSceneRequest) (uint64, uint64, bool, error)
func (*DBClient) GetAutoTestSceneStep ¶
func (db *DBClient) GetAutoTestSceneStep(id uint64) (*AutoTestSceneStep, error)
func (*DBClient) GetAutoTestSceneStepByPreID ¶
func (db *DBClient) GetAutoTestSceneStepByPreID(preID uint64, preType apistructs.PreType) (*AutoTestSceneStep, error)
func (*DBClient) GetAutoTestSceneStepCount ¶
func (*DBClient) GetAutoTestSceneStepNumber ¶
func (*DBClient) GetAutoTestSpace ¶
func (db *DBClient) GetAutoTestSpace(id uint64) (*AutoTestSpace, error)
GetAutoTestSpace 获取测试空间
func (*DBClient) GetAutoTestSpaceStats ¶
func (db *DBClient) GetAutoTestSpaceStats(spaceIDs []uint64) ([]AutoTestSpaceSceneSetStats, []AutoTestSpaceSceneStats, []AutoTestSpaceSceneStepStats, error)
func (*DBClient) GetAutoTestSpaceStepNumber ¶
func (*DBClient) GetAutotestScene ¶
func (db *DBClient) GetAutotestScene(id uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSceneByName ¶
func (db *DBClient) GetAutotestSceneByName(name string, setID uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSceneByPreID ¶
func (db *DBClient) GetAutotestSceneByPreID(preID uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSceneFirst ¶
func (db *DBClient) GetAutotestSceneFirst(setID uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSceneTx ¶
func (*DBClient) GetAutotestSpaceByName ¶
func (db *DBClient) GetAutotestSpaceByName(name string, projectID int64) (*AutoTestSpace, error)
GetAutotestSpaceByName 通过空间名获取空间
func (*DBClient) GetBranchRule ¶
func (client *DBClient) GetBranchRule(id int64) (model.BranchRule, error)
GetBranchRule 获取分支规则
func (*DBClient) GetBranchRulesCount ¶
func (client *DBClient) GetBranchRulesCount(scopeType apistructs.ScopeType) (int64, error)
GetBranchRulesCount 查询分支规则数量
func (*DBClient) GetCertificateByID ¶
func (client *DBClient) GetCertificateByID(certificateID int64) (model.Certificate, error)
GetCertificateByID 根据certificateID获取Certificate信息
func (*DBClient) GetCertificateByOrgAndName ¶
func (client *DBClient) GetCertificateByOrgAndName(orgID int64, name string) (*model.Certificate, error)
GetCertificateByOrgAndName 根据orgID & Certificate名称 获取证书信息
func (*DBClient) GetCertificatesByIDs ¶
func (client *DBClient) GetCertificatesByIDs(certificateIDs []int64, params *apistructs.CertificateListRequest) ( int, []model.Certificate, error)
GetCertificatesByIDs 根据certificateIDs获取Certificate列表
func (*DBClient) GetCertificatesByOrgIDAndName ¶
func (client *DBClient) GetCertificatesByOrgIDAndName(orgID int64, params *apistructs.CertificateListRequest) ( int, []model.Certificate, error)
GetCertificatesByOrgIDAndName 根据orgID与名称获取Certificate列表
func (*DBClient) GetClusterOpenTicketsNum ¶
func (client *DBClient) GetClusterOpenTicketsNum(ticketType, targetType, targetID string) (uint64, error)
GetClusterOpenTicketsNum 获取指定集群open状态的工单总数
func (*DBClient) GetCodeCoverageByID ¶
func (client *DBClient) GetCodeCoverageByID(id uint64) (*CodeCoverageExecRecord, error)
GetCodeCoverageByID .
func (*DBClient) GetCodeCoverageSettingByProjectID ¶
func (client *DBClient) GetCodeCoverageSettingByProjectID(projectID uint64, workSpace string) (*CodeCoverageSetting, error)
func (*DBClient) GetCommentByID ¶
GetCommentByID 根据commentID获取评论
func (*DBClient) GetCommentsByTicketID ¶
func (client *DBClient) GetCommentsByTicketID(ticketID int64, pageNo, pageSize int) (int64, []model.Comment, error)
GetCommentsByTicketID 根据ticketID获取工单评论
func (*DBClient) GetCountByCertificateID ¶
GetCountByCertificateID 根据certificateID获取引用总数
func (*DBClient) GetEnvConfigByID ¶
func (client *DBClient) GetEnvConfigByID(configID int64) (*model.ConfigItem, error)
GetEnvConfigByID 根据 ID 获取 配置信息
func (*DBClient) GetEnvConfigByKey ¶
GetEnvConfigByKey 根据 namespaceID, key 获取某个配置信息
func (*DBClient) GetEnvConfigsByNamespaceID ¶
func (client *DBClient) GetEnvConfigsByNamespaceID(namespaceID int64) ([]model.ConfigItem, error)
GetEnvConfigsByNamespaceID 根据 namespaceID 获取所有配置信息
func (*DBClient) GetIteration ¶
GetIteration Iteration 详情
func (*DBClient) GetIterationByTitle ¶
GetIterationByTitle 根据 title 获取 Iteration 信息
func (*DBClient) GetLabelRelationsByLabels ¶
func (client *DBClient) GetLabelRelationsByLabels(refType apistructs.ProjectLabelType, labelIDs []uint64) ([]LabelRelation, error)
GetLabelRelationsByLabels 获取标签关联关系列表
func (*DBClient) GetLabelRelationsByRef ¶
func (client *DBClient) GetLabelRelationsByRef(refType apistructs.ProjectLabelType, refID string) ([]LabelRelation, error)
GetLabelRelationsByRef 获取标签关联关系列表
func (*DBClient) GetLastCommentByTicket ¶
GetLastCommentByTicket 根据 ticketID 获取最新评论
func (*DBClient) GetLibReference ¶
func (client *DBClient) GetLibReference(libReferenceID uint64) (*LibReference, error)
GetLibReference 库引用详情
func (*DBClient) GetMaxOrderNumUnderParentTestSet ¶
func (db *DBClient) GetMaxOrderNumUnderParentTestSet(projectID, parentID uint64, recycled bool) (int, error)
GetMaxOrderNumUnderParentTestSet 返回当前父测试集下的最大 order num 若当前父测试集下没有子测试集,则返回 -1
func (*DBClient) GetMemberActiveRank ¶
func (db *DBClient) GetMemberActiveRank(orgID, userID string) (*MemberActiveRank, error)
func (*DBClient) GetMemberActiveRankList ¶
func (db *DBClient) GetMemberActiveRankList(orgID string, limit int) ([]MemberActiveRank, error)
func (*DBClient) GetNamespaceByName ¶
func (client *DBClient) GetNamespaceByName(name string) (*model.ConfigNamespace, error)
GetNamespaceByName 根据 name 获取 namespac
func (*DBClient) GetNamespaceRelationByName ¶
func (client *DBClient) GetNamespaceRelationByName(name string) (*model.ConfigNamespaceRelation, error)
GetNamespaceRelationByName 根据 name 获取 namespace 关联关系
func (*DBClient) GetNamespaceRelationsByDefaultName ¶
func (client *DBClient) GetNamespaceRelationsByDefaultName(name string) ([]model.ConfigNamespaceRelation, error)
GetNamespaceRelationByDefaultName 根据 defaultName 获取 namespace 关联关系
func (*DBClient) GetNamespacesByNames ¶
func (client *DBClient) GetNamespacesByNames(names []string) ([]model.ConfigNamespace, error)
GetNamespacesByNames 根据 多个names 获取 多个namespace
func (*DBClient) GetNexusRepository ¶
func (client *DBClient) GetNexusRepository(id uint64) (*NexusRepository, error)
func (*DBClient) GetNexusRepositoryByName ¶
func (client *DBClient) GetNexusRepositoryByName(name string) (*NexusRepository, error)
func (*DBClient) GetNexusUserByName ¶
func (*DBClient) GetOpenTicketByKey ¶
GetOpenTicketByKey 获取open状态的工单
func (*DBClient) GetOrgClusterRelationsByOrg ¶
func (client *DBClient) GetOrgClusterRelationsByOrg(orgID uint64) ([]model.OrgClusterRelation, error)
GetOrgClusterRelationsByOrg 根据 orgID 获取企业对应集群关系
func (*DBClient) GetOrgPublishersCount ¶
GetPublishersByIDs 获取企业的Publisher个数
func (*DBClient) GetProjectHome ¶
func (db *DBClient) GetProjectHome(projectID string) (*ProjectHome, error)
func (*DBClient) GetPublisherByID ¶
GetPublisherByID 根据publisherID获取Publisher信息
func (*DBClient) GetPublisherByOrgAndName ¶
func (client *DBClient) GetPublisherByOrgAndName(orgID int64, name string) (*model.Publisher, error)
GetPublisherByOrgAndName 根据orgID & Publisher名称 获取Publisher
func (*DBClient) GetPublisherByOrgID ¶
GetPublisherByOrgID 根据orgID 获取Publisher
func (*DBClient) GetPublishersByIDs ¶
func (client *DBClient) GetPublishersByIDs(publisherIDs []int64, params *apistructs.PublisherListRequest) ( int, []model.Publisher, error)
GetPublishersByIDs 根据publisherIDs获取Publisher列表
func (*DBClient) GetPublishersByOrgIDAndName ¶
func (client *DBClient) GetPublishersByOrgIDAndName(orgID int64, params *apistructs.PublisherListRequest) ( int, []model.Publisher, error)
GetPublishersByOrgIDAndName 根据orgID与名称获取Publisher列表
func (*DBClient) GetRecord ¶
func (client *DBClient) GetRecord(id uint64) (*TestFileRecord, error)
Get Record by id
func (*DBClient) GetSceneSet ¶
Get Sceneset by id
func (*DBClient) GetSceneSetByPreID ¶
func (*DBClient) GetSonarMetricRules ¶
func (client *DBClient) GetSonarMetricRules(ID int64) (*QASonarMetricRules, error)
func (*DBClient) GetStepByTestPlanID ¶
func (client *DBClient) GetStepByTestPlanID(testPlanID uint64, needSort bool) ([]TestPlanV2StepJoin, int64, error)
GetStepByTestPlanID Get steps of test plan if needSort is true then return a sorted list
func (*DBClient) GetTestCaseByID ¶
func (*DBClient) GetTestPlan ¶
GetTestPlan Fetch test plan
func (*DBClient) GetTestPlanByName ¶
GetTestPlanByName
func (*DBClient) GetTestPlanCaseRel ¶
func (client *DBClient) GetTestPlanCaseRel(relID uint64) (*TestPlanCaseRel, error)
GetTestPlanCaseRel Fetch testPlanCaseRel
func (*DBClient) GetTestPlanCaseRelByPlanIDAndCaseID ¶
func (client *DBClient) GetTestPlanCaseRelByPlanIDAndCaseID(planID, caseID uint64) (*TestPlanCaseRel, error)
func (*DBClient) GetTestPlanV2ByID ¶
func (client *DBClient) GetTestPlanV2ByID(testPlanID uint64) (*TestPlanV2, error)
GetTestPlanV2ByID Get test plan by id
func (*DBClient) GetTestPlanV2Step ¶
func (client *DBClient) GetTestPlanV2Step(ID uint64) (*TestPlanV2StepJoin, error)
func (*DBClient) GetTestPlanV2StepByPreID ¶
func (client *DBClient) GetTestPlanV2StepByPreID(preID uint64) (*TestPlanV2Step, error)
func (*DBClient) GetTestReportRecordByID ¶
func (client *DBClient) GetTestReportRecordByID(id uint64) (TestReportRecord, error)
func (*DBClient) GetTestSetByID ¶
GetTestSetByID 根据ID获取测试集
func (*DBClient) GetTestSetByNameAndParentIDAndProjectID ¶
func (db *DBClient) GetTestSetByNameAndParentIDAndProjectID(projectID, parentID uint64, recycled bool, name string) (*TestSet, error)
ListTestSets 根据父ID和项目ID获取测试集
func (*DBClient) GetTestSetByParentID ¶
GetTestSetByParentID 根据父ID和项目ID获取测试集
func (*DBClient) GetTestSetByParentIDAndProjectIDAsc ¶
func (db *DBClient) GetTestSetByParentIDAndProjectIDAsc(parentIDs []uint64, projectID uint64, recycled bool, testSetIDs []uint64) ([]TestSet, error)
GetTestSetByParentIDAndProjectIDAsc 根据父ID和项目ID获取子测试集信息,升序排列
func (*DBClient) GetTestSetByParentIDsAndProjectID ¶
func (db *DBClient) GetTestSetByParentIDsAndProjectID(parentIDs []uint64, projectID uint64, recycled bool) ([]TestSet, error)
GetTestSetByParentIDsAndProjectID 根据父ID和项目ID获取测试集
func (*DBClient) GetTestSetDirectoryByID ¶
GetTestSetDirectoryByID 根据ID获取测试集的路径
func (*DBClient) GetTicketByRequestID ¶
GetTicketByRequestID 根据requestID header获取记录
func (*DBClient) GetUserAutoTestPlanRole ¶
func (client *DBClient) GetUserAutoTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
func (*DBClient) GetUserTestPlanRole ¶
func (client *DBClient) GetUserTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
func (*DBClient) InsertAutoTestSceneStep ¶
func (db *DBClient) InsertAutoTestSceneStep(req apistructs.AutotestSceneRequest, preID uint64) (uint64, error)
func (*DBClient) IssueScore ¶
func (*DBClient) ListAutoTestExecHistory ¶
func (client *DBClient) ListAutoTestExecHistory(timeStart, timeEnd string, planIDs ...uint64) ([]AutoTestExecHistory, error)
ListAutoTestExecHistory .
func (*DBClient) ListAutoTestFileTreeNodeByPinode ¶
func (db *DBClient) ListAutoTestFileTreeNodeByPinode(pinode string) ([]AutoTestFileTreeNode, error)
func (*DBClient) ListAutoTestFileTreeNodeByPinodeAndNamePrefix ¶
func (db *DBClient) ListAutoTestFileTreeNodeByPinodeAndNamePrefix(pinode, namePrefix string) ([]AutoTestFileTreeNode, error)
func (*DBClient) ListAutoTestFileTreeNodeHistoryByinode ¶
func (db *DBClient) ListAutoTestFileTreeNodeHistoryByinode(inode string) ([]AutoTestFileTreeNodeHistory, error)
func (*DBClient) ListAutoTestPlanMembersByPlanID ¶
func (client *DBClient) ListAutoTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestPlanMembersByPlanIDs ¶
func (client *DBClient) ListAutoTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestPlanOwnersByOwners ¶
func (client *DBClient) ListAutoTestPlanOwnersByOwners(owners []string) ([]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestPlanOwnersByPlanID ¶
func (client *DBClient) ListAutoTestPlanOwnersByPlanID(testPlanID uint64) ([]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestSceneInput ¶
func (db *DBClient) ListAutoTestSceneInput(sceneID uint64) ([]AutoTestSceneInput, error)
func (*DBClient) ListAutoTestSceneInputByScenes ¶
func (db *DBClient) ListAutoTestSceneInputByScenes(sceneID []uint64) ([]AutoTestSceneInput, error)
func (*DBClient) ListAutoTestSceneOutput ¶
func (db *DBClient) ListAutoTestSceneOutput(sceneID uint64) ([]AutoTestSceneOutput, error)
func (*DBClient) ListAutoTestSceneOutputByScenes ¶
func (db *DBClient) ListAutoTestSceneOutputByScenes(sceneID []uint64) ([]AutoTestSceneOutput, error)
func (*DBClient) ListAutoTestSceneStep ¶
func (db *DBClient) ListAutoTestSceneStep(sceneID uint64) ([]AutoTestSceneStep, error)
func (*DBClient) ListAutoTestSceneSteps ¶
func (db *DBClient) ListAutoTestSceneSteps(sceneID []uint64) ([]AutoTestSceneStep, error)
func (*DBClient) ListAutoTestSpaceByProject ¶
func (db *DBClient) ListAutoTestSpaceByProject(req apistructs.AutoTestSpaceListRequest) ([]AutoTestSpace, int, error)
ListAutoTestSpaceByProject 项目下获取测试空间列表
func (*DBClient) ListAutotestScene ¶
func (db *DBClient) ListAutotestScene(req apistructs.AutotestSceneRequest) (uint64, []AutoTestScene, error)
func (*DBClient) ListAutotestSceneByGroupID ¶
func (db *DBClient) ListAutotestSceneByGroupID(setID, groupID uint64) (scenes []AutoTestScene, err error)
ListAutotestSceneByGroupID .
func (*DBClient) ListAutotestSceneTx ¶
func (db *DBClient) ListAutotestSceneTx(req apistructs.AutotestSceneRequest, tx *gorm.DB) (uint64, []AutoTestScene, error)
func (*DBClient) ListAutotestScenes ¶
func (db *DBClient) ListAutotestScenes(setIDs []uint64) ([]AutoTestScene, error)
ListAutotestScenes 批量查询场景
func (*DBClient) ListCodeCoverage ¶
func (client *DBClient) ListCodeCoverage(req apistructs.CodeCoverageListRequest) (records []CodeCoverageExecRecordShort, total uint64, err error)
ListCodeCoverage .
func (*DBClient) ListCodeCoverageByStatus ¶
func (client *DBClient) ListCodeCoverageByStatus(projectID uint64, status []apistructs.CodeCoverageExecStatus, workspace string) (records []CodeCoverageExecRecord, err error)
ListCodeCoverageByStatus .
func (*DBClient) ListEnvConfigsByNamespaceID ¶
func (client *DBClient) ListEnvConfigsByNamespaceID(namespaceIDList []int64) ([]model.ConfigItem, error)
func (*DBClient) ListExecHistorySceneSetByParentPID ¶
func (client *DBClient) ListExecHistorySceneSetByParentPID(parentPID uint64) (list []AutoTestExecHistory, err error)
ListExecHistorySceneSetByParentPID .
func (*DBClient) ListExpiredFiles ¶
func (*DBClient) ListFileRecordApiFileUUIDsByTime ¶
func (client *DBClient) ListFileRecordApiFileUUIDsByTime(t time.Time) ([]FileUUIDStr, error)
func (*DBClient) ListFileRecordsByState ¶
func (client *DBClient) ListFileRecordsByState(state apistructs.FileRecordState) ([]*TestFileRecord, error)
func (*DBClient) ListIssueFilterBookmarkByUserIDAndProjectID ¶
func (db *DBClient) ListIssueFilterBookmarkByUserIDAndProjectID(userID, projectID string) ([]IssueFilterBookmark, error)
func (*DBClient) ListLibReference ¶
func (client *DBClient) ListLibReference(req *apistructs.LibReferenceListRequest) (uint64, []LibReference, error)
ListLibReference 库引用列表
func (*DBClient) ListNamespaceByAppID ¶
func (client *DBClient) ListNamespaceByAppID(name string) ([]model.ConfigNamespace, error)
ListNamespaceByAppID 修复数据库老数据使用 name = app-2079
func (*DBClient) ListNamespaceByName ¶
func (client *DBClient) ListNamespaceByName(names []string) ([]model.ConfigNamespace, error)
func (*DBClient) ListNexusRepositories ¶
func (client *DBClient) ListNexusRepositories(req apistructs.NexusRepositoryListRequest) ([]*NexusRepository, error)
func (*DBClient) ListNexusUsers ¶
func (client *DBClient) ListNexusUsers(req apistructs.NexusUserListRequest) ([]NexusUser, error)
func (*DBClient) ListRecordsByProject ¶
func (client *DBClient) ListRecordsByProject(req apistructs.ListTestFileRecordsRequest) ([]TestFileRecord, map[string]int, int, error)
Get Records by projectId, spaceId, types
func (*DBClient) ListSceneBySceneSetID ¶
func (db *DBClient) ListSceneBySceneSetID(setIDs ...uint64) ([]AutoTestScene, int64, error)
ListSceneBySceneSetID .
func (*DBClient) ListSonarMetricRules ¶
func (client *DBClient) ListSonarMetricRules(query *QASonarMetricRules, otherQueryFuncList ...func(sql *gorm.DB) *gorm.DB) (dbRules []QASonarMetricRules, err error)
func (*DBClient) ListStepByPlanID ¶
func (client *DBClient) ListStepByPlanID(planIDs ...uint64) ([]TestPlanV2StepJoin, error)
ListStepByPlanID .
func (*DBClient) ListTestCasesByIDs ¶
func (*DBClient) ListTestCasesByTestSetIDs ¶
func (client *DBClient) ListTestCasesByTestSetIDs(req apistructs.TestCaseListRequest) ([]TestCase, error)
func (*DBClient) ListTestPlanCaseRels ¶
func (client *DBClient) ListTestPlanCaseRels(req apistructs.TestPlanCaseRelListRequest) ([]TestPlanCaseRel, error)
ListTestPlanCaseRels List testPlanCaseRel
func (*DBClient) ListTestPlanCaseRelsCount ¶
func (client *DBClient) ListTestPlanCaseRelsCount(testPlanIDs []uint64) (map[uint64]apistructs.TestPlanRelsCount, error)
func (*DBClient) ListTestPlanIDsByOwnerIDs ¶
func (*DBClient) ListTestPlanIDsByPartnerIDs ¶
func (*DBClient) ListTestPlanIDsByUserIDs ¶
func (client *DBClient) ListTestPlanIDsByUserIDs(userIDs []string, roles ...apistructs.TestPlanMemberRole) ([]uint64, error)
func (*DBClient) ListTestPlanMembersByPlanID ¶
func (client *DBClient) ListTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanMembersByPlanIDs ¶
func (client *DBClient) ListTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]TestPlanMember, error)
func (*DBClient) ListTestPlanOwnersByOwners ¶
func (client *DBClient) ListTestPlanOwnersByOwners(owners []string) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanOwnersByPlanID ¶
func (client *DBClient) ListTestPlanOwnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanPartnersByPlanID ¶
func (client *DBClient) ListTestPlanPartnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanTestSetIDs ¶
ListTestPlanTestSetIDs 获取测试计划下的测试集 ID 列表,从关联关系而来
func (*DBClient) ListTestPlanV2ByID ¶
func (client *DBClient) ListTestPlanV2ByID(ids ...uint64) ([]TestPlanV2, error)
ListTestPlanV2ByID .
func (*DBClient) ListTestPlanV2Step ¶
func (client *DBClient) ListTestPlanV2Step(testPlanID, groupID uint64) ([]TestPlanV2StepJoin, error)
ListTestPlanV2Step list testPlan step
func (*DBClient) ListTestReportRecord ¶
func (client *DBClient) ListTestReportRecord(req apistructs.TestReportRecordListRequest) ([]TestReportRecord, uint64, error)
func (*DBClient) ListTestSetByIDs ¶
func (*DBClient) ListTestSets ¶
func (db *DBClient) ListTestSets(req apistructs.TestSetListRequest) ([]TestSet, error)
ListTestSets
func (*DBClient) ListTestSetsRecursive ¶
func (db *DBClient) ListTestSetsRecursive(req apistructs.TestSetListRequest) ([]uint64, []TestSet, error)
ListTestSetsRecursive 获取测试集列表,可选是否包含子测试集
func (*DBClient) MoveAutoTestFileTreeNode ¶
func (*DBClient) MoveAutoTestScene ¶
like linklist change to node index
func (*DBClient) MoveAutoTestSceneStep ¶
func (db *DBClient) MoveAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
单个移动
func (*DBClient) MoveAutoTestSceneStepGroup ¶
func (db *DBClient) MoveAutoTestSceneStepGroup(req apistructs.AutotestSceneRequest) error
整组移动
func (*DBClient) MoveAutoTestSceneStepToGroup ¶
func (db *DBClient) MoveAutoTestSceneStepToGroup(req apistructs.AutotestSceneRequest) error
把单个步骤改为目标之后的串行节点
func (*DBClient) MoveAutoTestSceneV2 ¶
func (db *DBClient) MoveAutoTestSceneV2(req apistructs.AutotestSceneMoveRequest) error
MoveAutoTestSceneV2 Move scene between scene set, include the group drag
func (*DBClient) MoveSceneSet ¶
func (client *DBClient) MoveSceneSet(req apistructs.SceneSetRequest) error
func (*DBClient) MoveTestPlanV2Step ¶
func (client *DBClient) MoveTestPlanV2Step(req *apistructs.TestPlanV2StepMoveRequest) error
MoveTestPlanV2Step move a step in the test plan
func (*DBClient) OverwriteAutoTestPlanMembers ¶
func (client *DBClient) OverwriteAutoTestPlanMembers(testPlanID uint64, members []AutoTestPlanMember) error
OverwriteAutoTestPlanMembers 使用新的成员列表覆盖之前的成员列表
func (*DBClient) OverwriteAutoTestPlanOwner ¶
OverwriteAutoTestPlanOwner 使用新的 owner 覆盖之前的 owner
func (*DBClient) OverwriteAutoTestPlanPartners ¶
OverwriteAutoTestPlanPartners 使用新的 partner 列表覆盖之前的 partner 列表
func (*DBClient) OverwriteTestPlanMembers ¶
func (client *DBClient) OverwriteTestPlanMembers(testPlanID uint64, members []TestPlanMember) error
OverwriteTestPlanMembers 使用新的成员列表覆盖之前的成员列表
func (*DBClient) OverwriteTestPlanOwner ¶
OverwriteTestPlanOwner 使用新的 owner 覆盖之前的 owner
func (*DBClient) OverwriteTestPlanPartners ¶
OverwriteTestPlanPartners 使用新的 partner 列表覆盖之前的 partner 列表
func (*DBClient) PagingIterations ¶
func (client *DBClient) PagingIterations(req apistructs.IterationPagingRequest) ([]Iteration, uint64, error)
PagingIterations 分页查询
func (*DBClient) PagingSonarMetricRules ¶
func (client *DBClient) PagingSonarMetricRules(req apistructs.SonarMetricRulesPagingRequest) (*dbclient.Paging, error)
PagingTestPlan List test plan
func (*DBClient) PagingTestCases ¶
func (client *DBClient) PagingTestCases(req apistructs.TestCasePagingRequest) ([]TestCase, uint64, error)
func (*DBClient) PagingTestPlan ¶
func (client *DBClient) PagingTestPlan(req apistructs.TestPlanPagingRequest) (uint64, []TestPlan, error)
PagingTestPlan List test plan
func (*DBClient) PagingTestPlanCaseRelations ¶
func (client *DBClient) PagingTestPlanCaseRelations(req apistructs.TestPlanCaseRelPagingRequest) ([]TestPlanCaseRelDetail, uint64, error)
func (*DBClient) PagingTestPlanV2 ¶
func (client *DBClient) PagingTestPlanV2(req *apistructs.TestPlanV2PagingRequest) (int, []*apistructs.TestPlanV2, []string, error)
PagingTestPlanV2 Page query testplan
func (*DBClient) QualityScore ¶
func (*DBClient) QueryAppPublishItemRelations ¶
func (client *DBClient) QueryAppPublishItemRelations(req apistructs.QueryAppPublishItemRelationRequest) ([]apistructs.AppPublishItemRelation, error)
func (*DBClient) QueryBranchRules ¶
func (client *DBClient) QueryBranchRules(scopeType apistructs.ScopeType, scopeID int64) ([]model.BranchRule, error)
QueryBranchRules 查询分支列表
func (*DBClient) QueryBranchRulesByScope ¶
func (client *DBClient) QueryBranchRulesByScope(scopeType apistructs.ScopeType) ([]model.BranchRule, error)
func (*DBClient) QuoteCertificate ¶
func (client *DBClient) QuoteCertificate(certificate *model.AppCertificate) error
QuoteCertificate 创建应用Certificate
func (*DBClient) RecoverTestCasesByTestSetID ¶
RecoverTestCasesByTestSetID 回收站恢复测试集下的测试用例
func (*DBClient) RecoverTestSet ¶
func (*DBClient) RecycleTestSet ¶
func (*DBClient) RecycledTestCasesByTestSetID ¶
RecycledTestCasesByTestSetID 回收测试集下的测试用例
func (*DBClient) RemovePublishItemRelations ¶
func (client *DBClient) RemovePublishItemRelations(request *apistructs.RemoveAppPublishItemRelationsRequest) error
func (*DBClient) SaveCodeCoverageSettingByProjectID ¶
func (client *DBClient) SaveCodeCoverageSettingByProjectID(record *CodeCoverageSetting) (*CodeCoverageSetting, error)
func (*DBClient) SceneSetsBySpaceID ¶
Get Scenesets by spaceID
func (*DBClient) SoftDeleteEnvConfig ¶
func (client *DBClient) SoftDeleteEnvConfig(config *model.ConfigItem) error
UpdateEnvConfig 更新环境变量配置
func (*DBClient) SoftDeleteNamespace ¶
func (client *DBClient) SoftDeleteNamespace(namespace *model.ConfigNamespace) error
SoftDeleteNamespace 软删除 namespace
func (*DBClient) SoftDeleteNamespaceRelation ¶
func (client *DBClient) SoftDeleteNamespaceRelation(namespaceRelation *model.ConfigNamespaceRelation) error
SoftDeleteNamespace 软删除 namespace
func (*DBClient) Transaction ¶
Transaction Execute Transaction
func (*DBClient) UpdateAppPublishItemRelations ¶
func (client *DBClient) UpdateAppPublishItemRelations(request *apistructs.UpdateAppPublishItemRelationRequest) error
func (*DBClient) UpdateApprovalStatusByApprovalID ¶
func (client *DBClient) UpdateApprovalStatusByApprovalID(approvalID uint64, status apistructs.ApprovalStatus) error
UpdateApprovalStatusByApprovalID 更新审批流状态
func (*DBClient) UpdateAutoTestFileTreeNodeBasicInfo ¶
func (*DBClient) UpdateAutoTestPlanMember ¶
func (client *DBClient) UpdateAutoTestPlanMember(mem *AutoTestPlanMember) error
func (*DBClient) UpdateAutoTestSpace ¶
func (db *DBClient) UpdateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
UpdateAutoTestSpace 更新测试空间
func (*DBClient) UpdateAutotestScene ¶
func (db *DBClient) UpdateAutotestScene(node *AutoTestScene) error
func (*DBClient) UpdateAutotestSceneInput ¶
func (db *DBClient) UpdateAutotestSceneInput(input *AutoTestSceneInput) error
func (*DBClient) UpdateAutotestSceneOutput ¶
func (db *DBClient) UpdateAutotestSceneOutput(output *AutoTestSceneOutput) error
func (*DBClient) UpdateAutotestSceneStep ¶
func (db *DBClient) UpdateAutotestSceneStep(step *AutoTestSceneStep) error
func (*DBClient) UpdateAutotestSceneUpdateAt ¶
func (*DBClient) UpdateAutotestSceneUpdater ¶
func (*DBClient) UpdateBranchRule ¶
func (client *DBClient) UpdateBranchRule(branchRule *model.BranchRule) error
UpdateBranchRule 更新分支规则
func (*DBClient) UpdateCertificate ¶
func (client *DBClient) UpdateCertificate(certificate *model.Certificate) error
UpdateCertificate 更新Certificate
func (*DBClient) UpdateCodeCoverage ¶
func (client *DBClient) UpdateCodeCoverage(record *CodeCoverageExecRecord) error
UpdateCodeCoverage .
func (*DBClient) UpdateComment ¶
UpdateComment 更新工单评论
func (*DBClient) UpdateIteration ¶
UpdateIteration 更新
func (*DBClient) UpdateOrAddEnvConfig ¶
func (client *DBClient) UpdateOrAddEnvConfig(config *model.ConfigItem) error
UpdateOrAddEnvConfig 更新环境变量配置
func (*DBClient) UpdateOrAddNamespace ¶
func (client *DBClient) UpdateOrAddNamespace(namespace *model.ConfigNamespace) error
UpdateOrAddNamespace 更新/添加 namespace
func (*DBClient) UpdateOrAddNamespaceRelation ¶
func (client *DBClient) UpdateOrAddNamespaceRelation(namespaceRelation *model.ConfigNamespaceRelation) error
UpdateOrAddNamespaceRelation 更新/添加命名空间关联关系
func (*DBClient) UpdatePublisher ¶
UpdatePublisher 更新Publisher
func (*DBClient) UpdateQuoteCertificate ¶
func (client *DBClient) UpdateQuoteCertificate(certificate *model.AppCertificate) error
UpdateQuoteCertificate 更新Certificate
func (*DBClient) UpdateRecord ¶
func (client *DBClient) UpdateRecord(record *TestFileRecord) error
Update Record
func (*DBClient) UpdateSceneRefSetID ¶
func (db *DBClient) UpdateSceneRefSetID(copyRefs apistructs.AutoTestSceneCopyRef) error
func (*DBClient) UpdateSceneSet ¶
Update Sceneset
func (*DBClient) UpdateSonarMetricRules ¶
func (client *DBClient) UpdateSonarMetricRules(updateObj *QASonarMetricRules) (err error)
func (*DBClient) UpdateTestCase ¶
UpdateTestCase 更新测试用例
func (*DBClient) UpdateTestPlan ¶
UpdateTestPlan Update test plan
func (*DBClient) UpdateTestPlanMember ¶
func (client *DBClient) UpdateTestPlanMember(mem *TestPlanMember) error
func (*DBClient) UpdateTestPlanTestCaseRel ¶
func (client *DBClient) UpdateTestPlanTestCaseRel(testPlanCaseRel *TestPlanCaseRel) error
UpdateTestPlanTestCaseRel Update testPlanCaseRel
func (*DBClient) UpdateTestPlanV2 ¶
UpdateTestPlanV2 Update test plan
func (*DBClient) UpdateTestPlanV2Step ¶
func (client *DBClient) UpdateTestPlanV2Step(step TestPlanV2Step) error
func (*DBClient) UpdateTestReportRecord ¶
func (client *DBClient) UpdateTestReportRecord(record *TestReportRecord) error
func (*DBClient) UpdateTestSet ¶
UpdateTestSet update testset
type File ¶
type File struct { dbengine.BaseModel UUID string // UUID,解决重名问题;用自增 id 在存储介质上容易冲突 DisplayName string // 文件名,用于下载的时候展示 Ext string // 文件后缀,带 dot ByteSize int64 // 文件大小,Byte StorageType storage.Type // 存储类型 FullRelativePath string // 文件相对路径,不包含 网盘挂载点 或 oss bucket From string // 文件来源,例如 issue / gittar mr Creator string // 文件创建者 ID Extra FileExtra // 额外信息,包括存储介质关键信息快照等 ExpiredAt *time.Time // 文件超时自动删除 }
type FileExtra ¶
type FileExtra struct { OSSSnapshot OSSSnapshot `json:"ossSnapshot,omitempty"` IsPublic bool `json:"isPublic,omitempty"` Encrypt bool `json:"encrypt,omitempty"` KMSKeyID string `json:"kmsKeyID,omitempty"` DEKCiphertextBase64 string `json:"dekCiphertextBase64,omitempty"` }
type FileUUIDStr ¶
type FileUUIDStr struct {
ApiFileUUID string
}
type IssueFilterBookmark ¶
type IssueFilterBookmark struct { ID string `gorm:"primary_key"` CreatedAt time.Time UpdatedAt time.Time Name string UserID string ProjectID string PageKey string // 4 page and each page has 2 variants, thus 8 page for bookmarks FilterEntity string }
IssueFilterBookmark users' bookmark of issue filter
func (IssueFilterBookmark) TableName ¶
func (IssueFilterBookmark) TableName() string
type Iteration ¶
type Iteration struct { dbengine.BaseModel StartedAt *time.Time // 迭代开始时间 FinishedAt *time.Time // 迭代结束时间 ProjectID uint64 // 所属项目 ID Title string // 标题 Content string // 内容 Creator string // 创建者 ID State apistructs.IterationState // 归档状态 ManHour string // 迭代工时信息 }
func (*Iteration) Convert ¶
func (i *Iteration) Convert(labels []string, labelDetails []apistructs.ProjectLabel) apistructs.Iteration
type LabelRelation ¶
type LabelRelation struct { dbengine.BaseModel LabelID uint64 `json:"label_id"` // 标签 id RefType apistructs.ProjectLabelType `json:"ref_type"` // 标签作用类型, eg: issue RefID string `json:"ref_id"` // 标签关联目标 id }
LabelRelation 标签关联关系
type LibReference ¶
type LibReference struct { dbengine.BaseModel AppID uint64 LibID uint64 LibName string LibDesc string ApprovalID uint64 ApprovalStatus apistructs.ApprovalStatus Creator string }
LibReference 库引用
type MemberActiveRank ¶
type MemberActiveRank struct { ID string `gorm:"primary_key"` CreatedAt time.Time UpdatedAt time.Time OrgID string UserID string IssueScore uint64 CommitScore uint64 QualityScore uint64 TotalScore uint64 SoftDeletedAt uint64 }
func (MemberActiveRank) TableName ¶
func (MemberActiveRank) TableName() string
type MemberActiveScore ¶
type NexusRepository ¶
type NexusRepository struct { dbengine.BaseModel OrgID *uint64 `json:"orgID"` // 所属 org ID PublisherID *uint64 `json:"publisherID"` // 所属 publisher ID ClusterName string `json:"clusterName"` // 所属集群 Name string `json:"name"` // unique name Format nexus.RepositoryFormat `json:"format"` // maven2 / npm / ... Type nexus.RepositoryType `json:"type"` // group / proxy / hosted Config NexusRepositoryConfig `json:"config"` // repo config }
func (NexusRepository) TableName ¶
func (NexusRepository) TableName() string
type NexusRepositoryConfig ¶
type NexusRepositoryConfig nexus.Repository
func (*NexusRepositoryConfig) Scan ¶
func (config *NexusRepositoryConfig) Scan(value interface{}) error
type NexusUser ¶
type NexusUser struct { dbengine.BaseModel RepoID *uint64 `json:"repoID"` // 所属 repo,可以为空 PublisherID *uint64 `json:"publisherID"` // 所属 publisher,可以为空 OrgID *uint64 `json:"orgID"` // 所属 org,可以为空 ClusterName string `json:"clusterName"` // 所属集群 Name string `json:"name"` Password string `json:"password"` // 加密存储 Config NexusUserConfig `json:"config"` }
type NexusUserConfig ¶
func (*NexusUserConfig) Scan ¶
func (config *NexusUserConfig) Scan(value interface{}) error
type OSSSnapshot ¶
type PartnerIDs ¶
type PartnerIDs []string
func (*PartnerIDs) Scan ¶
func (ids *PartnerIDs) Scan(value interface{}) error
type ProjectHome ¶
type ProjectHome struct { ID string `gorm:"primary_key"` CreatedAt time.Time UpdatedAt time.Time ProjectID string Readme string Links string UpdaterID string SoftDeletedAt uint64 }
func (ProjectHome) TableName ¶
func (ProjectHome) TableName() string
type QASonarMetricRules ¶
type QASonarMetricRules struct { ID int64 `gorm:"primary_key" json:"id"` CreatedAt time.Time `gorm:"created_at" json:"createdAt"` UpdatedAt time.Time `gorm:"updated_at" json:"updatedAt"` Description string `gorm:"description" json:"description"` ScopeType string `gorm:"scope_type" json:"scopeType"` ScopeID string `gorm:"scope_id" json:"scopeId"` MetricKeyID int64 `gorm:"metric_key_id" json:"metricKeyId"` MetricValue string `gorm:"metric_value" json:"metricValue"` }
func (QASonarMetricRules) TableName ¶
func (QASonarMetricRules) TableName() string
TableName QASonar对应的数据库表qa_sonar
func (*QASonarMetricRules) ToApi ¶
func (rule *QASonarMetricRules) ToApi() *apistructs.SonarMetricRuleDto
type SceneSet ¶
type TestCase ¶
type TestCase struct { dbengine.BaseModel Name string ProjectID uint64 TestSetID uint64 Priority apistructs.TestCasePriority PreCondition string StepAndResults TestCaseStepAndResults Desc string Recycled *bool From apistructs.TestCaseFrom CreatorID string UpdaterID string }
TestCase 测试用例
type TestCaseStepAndResults ¶
type TestCaseStepAndResults []apistructs.TestCaseStepAndResult
func (*TestCaseStepAndResults) Scan ¶
func (sr *TestCaseStepAndResults) Scan(value interface{}) error
type TestFileExtra ¶
type TestFileExtra apistructs.TestFileExtra
func (*TestFileExtra) Scan ¶
func (ex *TestFileExtra) Scan(value interface{}) error
type TestFileRecord ¶
type TestFileRecord struct { dbengine.BaseModel FileName string Description string ApiFileUUID string ProjectID uint64 OrgID uint64 SpaceID uint64 Type apistructs.FileActionType State apistructs.FileRecordState OperatorID string Extra TestFileExtra ErrorInfo string SoftDeletedAt uint }
type TestPlan ¶
type TestPlan struct { dbengine.BaseModel Name string Status apistructs.TPStatus // DOING/PAUSE/DONE ProjectID uint64 CreatorID string IterationID uint64 UpdaterID string Summary string StartedAt *time.Time EndedAt *time.Time Type apistructs.TestPlanType IsArchived bool Inode string }
TestPlan 测试计划
type TestPlanCaseRel ¶
type TestPlanCaseRel struct { dbengine.BaseModel TestPlanID uint64 TestSetID uint64 TestCaseID uint64 ExecStatus apistructs.TestCaseExecStatus CreatorID string UpdaterID string ExecutorID string }
TestPlanCaseRel
type TestPlanCaseRelDetail ¶
type TestPlanCaseRelDetail struct { TestPlanCaseRel Name string ProjectID uint64 Priority apistructs.TestCasePriority PreCondition string StepAndResults TestCaseStepAndResults Desc string Recycled *bool From apistructs.TestCaseFrom }
func (TestPlanCaseRelDetail) ConvertForPaging ¶
func (rel TestPlanCaseRelDetail) ConvertForPaging() apistructs.TestPlanCaseRel
type TestPlanMember ¶
type TestPlanMember struct { dbengine.BaseModel TestPlanID uint64 `json:"testPlanID"` Role apistructs.TestPlanMemberRole `json:"role"` UserID string `json:"userID"` }
TestPlanMember 测试计划成员表
func (TestPlanMember) TableName ¶
func (TestPlanMember) TableName() string
type TestPlanV2 ¶
type TestPlanV2 struct { dbengine.BaseModel Name string Desc string CreatorID string UpdaterID string ProjectID uint64 IterationID uint64 SpaceID uint64 IsArchived bool ExecuteApiNum int64 PassRate float64 ExecuteTime *time.Time SuccessApiNum int64 TotalApiNum int64 ExecuteRate float64 CostTimeSec int64 }
TestPlanV2 测试计划V2
func (*TestPlanV2) Convert2DTO ¶
func (tp *TestPlanV2) Convert2DTO() apistructs.TestPlanV2
Convert2DTO convert DAO to DTO
type TestPlanV2Join ¶
type TestPlanV2Join struct { TestPlanV2 SpaceName string IterationName string }
TestPlanV2Join join dice_autotest_space
func (TestPlanV2Join) Convert2DTO ¶
func (tp TestPlanV2Join) Convert2DTO() *apistructs.TestPlanV2
Convert2DTO convert DAO to DTO
type TestPlanV2Step ¶
type TestPlanV2Step struct { dbengine.BaseModel PlanID uint64 SceneSetID uint64 PreID uint64 GroupID uint64 }
TestPlanV2Step 测试计划V2步骤
func (TestPlanV2Step) Convert2DTO ¶
func (tps TestPlanV2Step) Convert2DTO() *apistructs.TestPlanV2Step
Convert2DTO Convert to apistructs
type TestPlanV2StepJoin ¶
type TestPlanV2StepJoin struct { TestPlanV2Step SceneSetName string `gorm:"column:name"` }
TestPlanV2StepJoin 测试计划V2步骤join测试集表
func (TestPlanV2StepJoin) Convert2DTO ¶
func (tps TestPlanV2StepJoin) Convert2DTO() *apistructs.TestPlanV2Step
Convert2DTO Convert to apistructs
type TestReportData ¶
type TestReportData apistructs.TestReportData
func (*TestReportData) Scan ¶
func (dat *TestReportData) Scan(value interface{}) error
type TestReportRecord ¶
type TestReportRecord struct { dbengine.BaseModel Name string `json:"name"` // report name ProjectID uint64 `json:"project_id"` // project id IterationID uint64 `json:"iteration_id"` // belong iteration id CreatorID string `json:"creator_id"` // creator id QualityScore float64 `json:"quality_score"` // total quality score ReportData TestReportData `json:"report_data"` // issue and test dashboard component protocol Summary string `json:"summary"` // test report summary }
func (*TestReportRecord) Convert ¶
func (t *TestReportRecord) Convert() apistructs.TestReportRecord
func (TestReportRecord) TableName ¶
func (TestReportRecord) TableName() string
type TestSet ¶
type TestSet struct { dbengine.BaseModel // 测试集的中文名,可重名 Name string // 上一级的所属测试集id,顶级时为0 ParentID uint64 // 是否回收 Recycled bool // 项目ID ProjectID uint64 // 路径地址 Directory string // 排序编号 OrderNum int // 创建人ID CreatorID string // 更新人ID UpdaterID string }
TestSet 测试集
func FakeRootTestSet ¶
Source Files ¶
- app_certificate.go
- app_publish_item_relation.go
- autotest_exec_history.go
- autotest_filetree.go
- autotest_filetree_extras.go
- autotest_filetree_history.go
- autotest_scene.go
- autotest_scene_input.go
- autotest_scene_output.go
- autotest_scene_step.go
- autotest_space.go
- branch_rule.go
- certificate.go
- code_coverage_exec_record.go
- code_coverage_setting.go
- comment.go
- config.go
- contribution.go
- dbclient.go
- error.go
- file.go
- file_records.go
- issue_filter_bookmark.go
- iteration.go
- label_relation.go
- lib-reference.go
- namespace.go
- nexus_repository.go
- nexus_user.go
- project_home.go
- publisher.go
- resource.go
- sceneset.go
- sonar_metric_rules.go
- test_report.go
- testcase.go
- testplan.go
- testplan_member.go
- testplan_memberv2.go
- testplan_testcase_relation.go
- testplan_v2.go
- testplan_v2_step.go
- testset.go
- ticket.go
- tx.go