Documentation
¶
Index ¶
- Constants
- Variables
- func Count()
- func MakeHostLabel(hostLabels string) string
- func Round(f float64, n int) float64
- type BaseModel
- type DBClient
- func (client *DBClient) AllAddonsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) AllComponentsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByAddon(ctx context.Context, cluster string, addon []string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByApplication(ctx context.Context, app []string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByComponent(ctx context.Context, cluster string, component []string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByHost(ctx context.Context, cluster string, host []string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByOrg(ctx context.Context, org string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByProject(ctx context.Context, project []string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByRuntime(ctx context.Context, runtime []string) ([]types.CmContainer, error)
- func (client *DBClient) AllContainersByService(ctx context.Context, runtime string, service []string) ([]types.CmContainer, error)
- func (client *DBClient) AllHostsByCluster(ctx context.Context, cluster string) (*[]types.CmHost, error)
- func (client *DBClient) AllProjectsContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningAddonsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningComponentsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByApplication(ctx context.Context, app []string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByComponent(ctx context.Context, cluster string, component []string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByHost(ctx context.Context, cluster string, host []string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByOrg(ctx context.Context, org string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByProject(ctx context.Context, project []string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByRuntime(ctx context.Context, runtime []string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningContainersByService(ctx context.Context, runtime string, service []string) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningProjectsContainers(ctx context.Context) ([]types.CmContainer, error)
- func (client *DBClient) AllRunningProjectsContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
- func (client *DBClient) ArchiveAuditsByTimeAndOrg() error
- func (client *DBClient) BatchCreateAudit(audits []model.Audit) error
- func (client *DBClient) BatchCreateIssueTestCaseRelations(rels []IssueTestCaseRelation) error
- func (client *DBClient) BatchCreateMemberExtra(memberExtras []model.MemberExtra) error
- func (client *DBClient) BatchGetNotifyGroup(ids []int64) ([]*apistructs.NotifyGroup, error)
- func (client *DBClient) BatchQueryIssueLabelIDMap(issueIDs []int64) (map[uint64][]uint64, error)
- func (client *DBClient) BatchUpdateIssues(req *apistructs.IssueBatchUpdateRequest) error
- func (client *DBClient) BulkInsert(objects interface{}, excludeColumns ...string) error
- func (client *DBClient) CancelQuoteCertificate(quoteCertificateID int64) error
- func (client *DBClient) CheckNotifyGroupNameExist(scopeType, scopeID, name string) (bool, error)
- func (client *DBClient) CheckNotifyNameExist(scopeType, scopeID, name, label string) (bool, error)
- func (client *DBClient) CleanIssueRelation(issueID uint64) error
- func (client *DBClient) CreateAccount(account *model.CloudAccount) error
- func (client *DBClient) CreateApplication(application *model.Application) error
- func (client *DBClient) CreateApprove(approve *model.Approve) error
- func (client *DBClient) CreateAudit(audit *model.Audit) error
- func (client *DBClient) CreateBranchRule(branchRule *model.BranchRule) error
- func (client *DBClient) CreateCertificate(certificate *model.Certificate) error
- func (client *DBClient) CreateCluster(cluster *model.Cluster) error
- func (client *DBClient) CreateComment(comment *model.Comment) error
- func (client *DBClient) CreateContainer(container *model.Container) error
- func (client *DBClient) CreateCurrentOrg(orgRelation *model.CurrentOrg) error
- func (client *DBClient) CreateDeployment(deployment *model.Deployments) error
- func (client *DBClient) CreateErrorLog(errorLog *model.ErrorLog) error
- func (client *DBClient) CreateFavoritedResource(resource *model.FavoritedResource) error
- func (client *DBClient) CreateFile(file *File) error
- func (client *DBClient) CreateHost(host *model.Host) error
- func (client *DBClient) CreateIssue(issue *Issue) error
- func (client *DBClient) CreateIssueAppRelation(issueAppRel *IssueAppRelation) error
- func (client *DBClient) CreateIssueProperty(property *IssueProperty) error
- func (client *DBClient) CreateIssuePropertyValue(value *IssuePropertyValue) error
- func (client *DBClient) CreateIssuePropertyValues(values []IssuePropertyValue) error
- func (client *DBClient) CreateIssueRelations(issueRelation *IssueRelation) error
- func (client *DBClient) CreateIssueStage(stages []IssueStage) error
- func (client *DBClient) CreateIssueStream(is *IssueStream) error
- func (client *DBClient) CreateIssuesState(state *IssueState) error
- func (client *DBClient) CreateIteration(Iteration *Iteration) error
- func (client *DBClient) CreateJob(Job *model.Jobs) error
- func (client *DBClient) CreateLabel(label *Label) error
- func (client *DBClient) CreateLabelRelation(lr *LabelRelation) error
- func (client *DBClient) CreateLibReference(libReference *LibReference) error
- func (client *DBClient) CreateMBox(request *apistructs.CreateMBoxRequest) error
- func (client *DBClient) CreateMember(member *model.Member) error
- func (client *DBClient) CreateMemberExtra(memberExtra *model.MemberExtra) error
- func (client *DBClient) CreateNotice(notice *Notice) error
- func (client *DBClient) CreateNotify(request *apistructs.CreateNotifyRequest) (int64, error)
- func (client *DBClient) CreateNotifyGroup(request *apistructs.CreateNotifyGroupRequest) (int64, error)
- func (client *DBClient) CreateNotifyHistory(request *apistructs.CreateNotifyHistoryRequest) (int64, error)
- func (client *DBClient) CreateNotifyItem(request *apistructs.CreateNotifyItemRequest) (int64, error)
- func (client *DBClient) CreateOrUpdateNexusRepository(repo *NexusRepository) error
- func (client *DBClient) CreateOrUpdateNexusUser(user *NexusUser) error
- func (client *DBClient) CreateOrUpdateService(ctx context.Context, service *types.CmService) error
- func (client *DBClient) CreateOrg(org *model.Org) error
- func (client *DBClient) CreateOrgClusterRelation(relation *model.OrgClusterRelation) error
- func (client *DBClient) CreatePanel(panel *IssuePanel) error
- func (client *DBClient) CreateProject(project *model.Project) error
- func (client *DBClient) CreatePropertyRelation(relation *IssuePropertyRelation) error
- func (client *DBClient) CreatePropertyRelations(relations []IssuePropertyRelation) error
- func (client *DBClient) CreatePublisher(publisher *model.Publisher) error
- func (client *DBClient) CreateReview(review *model.ManualReview) error
- func (client *DBClient) CreateReviewUser(review *model.ReviewUser) error
- func (client *DBClient) CreateRolePermission(permission *model.RolePermission) error
- func (client *DBClient) CreateTicket(ticket *model.Ticket) error
- func (client *DBClient) DeleteAccount(orgID, accountID int64) error
- func (client *DBClient) DeleteAllContainersByHost(ctx context.Context, cluster, host string) error
- func (client *DBClient) DeleteApplication(applicationID int64) error
- func (client *DBClient) DeleteApprove(approveID int64) error
- func (client *DBClient) DeleteAuditsByTimeAndOrg(startTime time.Time, orgIDs []uint64) error
- func (client *DBClient) DeleteAuditsByTimeAndSys(startTime time.Time) 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) DeleteCluster(clusterName string) error
- func (client *DBClient) DeleteContainer(ctx context.Context, c *types.CmContainer) error
- func (client *DBClient) DeleteCurrentOrg(userID string) error
- func (client *DBClient) DeleteDeployment(orgID string, taskID uint64) error
- func (client *DBClient) DeleteFavoritedResource(id uint64) error
- func (client *DBClient) DeleteFavoritedResourcesByTarget(target string, targetID uint64) error
- func (client *DBClient) DeleteFile(id uint64) error
- func (client *DBClient) DeleteHostByName(ctx context.Context, cluster, name string) error
- func (client *DBClient) DeleteIssue(id uint64) error
- func (client *DBClient) DeleteIssueAppRelationsByApp(appID int64) error
- func (client *DBClient) DeleteIssueAppRelationsByComment(commentID int64) error
- func (client *DBClient) DeleteIssueProperty(orgId int64, propertyIssueType apistructs.PropertyIssueType, id int64, ...) error
- func (client *DBClient) DeleteIssuePropertyValue(id int64) error
- func (client *DBClient) DeleteIssuePropertyValuesByPropertyID(propertyID int64) error
- func (client *DBClient) DeleteIssueRelation(issueID, relatedIssueID uint64) error
- func (client *DBClient) DeleteIssueTestCaseRelationsByIDs(ids []uint64) error
- func (client *DBClient) DeleteIssueTestCaseRelationsByIssueID(issueID uint64) error
- func (client *DBClient) DeleteIssuesByRequirement(requirementID uint64) error
- func (client *DBClient) DeleteIssuesStage(orgID int64, issueType apistructs.IssueType) error
- func (client *DBClient) DeleteIssuesState(id int64) error
- func (client *DBClient) DeleteIssuesStateByProjectID(projectID int64) error
- func (client *DBClient) DeleteIssuesStateRelationByStartID(id int64) error
- func (client *DBClient) DeleteIteration(id uint64) error
- func (client *DBClient) DeleteJob(orgID string, taskID uint64) error
- func (client *DBClient) DeleteLabel(labelID int64) error
- func (client *DBClient) DeleteLabelRelations(refType apistructs.ProjectLabelType, refID uint64) error
- func (client *DBClient) DeleteLabelRelationsByLabel(labelID uint64) error
- func (client *DBClient) DeleteLibReference(libReferenceID uint64) error
- func (client *DBClient) DeleteMBox(id int64) error
- func (client *DBClient) DeleteMember(memberID int64) error
- func (client *DBClient) DeleteMemberByScopeAndUsersAndRole(userIDs []string, scopeType apistructs.ScopeType, scopeID int64, role string) error
- func (client *DBClient) DeleteMemberExtraByIDsANDResourceValues(userIDs []string, scopeType apistructs.ScopeType, scopeIDs []int64, ...) error
- func (client *DBClient) DeleteMemberExtraByParentID(userIDs []string, scopeType apistructs.ScopeType, parentID int64) error
- func (client *DBClient) DeleteMemberExtraByParentIDs(userID []string, scopeType apistructs.ScopeType, parentIDs []int64) error
- func (client *DBClient) DeleteMemberExtraByScope(scopeType apistructs.ScopeType, scopeID int64) error
- func (client *DBClient) DeleteMemberExtraByUserIDsAndScope(scopeType apistructs.ScopeType, scopeID int64, userIDs []string) error
- func (client *DBClient) DeleteMemberExtraByUserIDsAndScopeIDs(scopeType apistructs.ScopeType, scopeIDs []int64, userIDs []string) error
- func (client *DBClient) DeleteMemberExtraByUxerIDANDResourceValues(userID string, scopeType apistructs.ScopeType, scopeIDs []int64, ...) error
- func (client *DBClient) DeleteMembersByOrgAndUsers(orgID string, userIDs []string) error
- func (client *DBClient) DeleteMembersByScope(scopeType apistructs.ScopeType, scopeID int64) error
- func (client *DBClient) DeleteMembersByScopeAndUsers(userIDs []string, scopeType apistructs.ScopeType, scopeID int64) error
- func (client *DBClient) DeleteNotice(noticeID uint64) error
- func (client *DBClient) DeleteNotify(id int64, withGroup bool, orgID int64) error
- func (client *DBClient) DeleteNotifyGroup(id int64, orgID int64) error
- func (client *DBClient) DeleteNotifyItem(id int64) error
- func (client *DBClient) DeleteNotifyRelationsByScope(scopeType apistructs.ScopeType, scopeID string) error
- func (client *DBClient) DeleteNotifySource(request *apistructs.DeleteNotifySourceRequest) error
- func (client *DBClient) DeleteOrg(orgID int64) error
- func (client *DBClient) DeleteOrgClusterRelationByCluster(clusterName string) error
- func (client *DBClient) DeleteOrgClusterRelationByClusterAndOrg(clusterName string, orgID int64) error
- func (client *DBClient) DeletePanelByPanelID(panelID int64) error
- func (client *DBClient) DeleteProject(projectID int64) error
- func (client *DBClient) DeleteProjectAppsMembers(userIDs []string, projectID int64) error
- func (client *DBClient) DeletePropertyRelationByIssueID(issueID int64) error
- func (client *DBClient) DeletePropertyRelationsByPropertyID(issueID int64, propertyID int64) error
- func (client *DBClient) DeletePublisher(publisherID int64) error
- func (client *DBClient) DeleteStoppedContainersByPeriod(ctx context.Context, period time.Duration) error
- func (client *DBClient) DeleteTicket(targetID, targetType, ticketType string) error
- func (client *DBClient) FindIssueStream(issueId int) ([]IssueStream, error)
- func (client *DBClient) FindIterations(projectID uint64) (iterations []Iteration, err error)
- func (client *DBClient) FuzzyQueryNotifiesBySource(req apistructs.FuzzyQueryNotifiesBySourceRequest) ([]*apistructs.NotifyDetail, int, error)
- func (client *DBClient) GetAbnormalHostsNumberByClusterAndOrg(clusterName, orgName string) (uint64, error)
- func (client *DBClient) GetAccountByID(orgID, accountID int64) (model.CloudAccount, error)
- func (client *DBClient) GetAccountByName(orgID int64, name string) (model.CloudAccount, error)
- func (client *DBClient) GetAccountsByOrgID(orgID int64) ([]model.CloudAccount, error)
- func (client *DBClient) GetAccumulateResource(cluster, resource string) (uint64, error)
- func (client *DBClient) GetActivitiesByRuntime(runtimeID int64, pageNo, pageSize int) (int, []model.Activity, error)
- func (client *DBClient) GetAllApps() ([]model.Application, error)
- func (client *DBClient) GetAllProjects() ([]model.Project, 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) GetAppMembersByUser(userID string) ([]model.MemberExtra, error)
- func (client *DBClient) GetApplicationByID(applicationID int64) (model.Application, error)
- func (client *DBClient) GetApplicationByName(projectID int64, name string) (model.Application, error)
- func (client *DBClient) GetApplicationByOrgAndName(orgID int64, name string) (*model.Application, error)
- func (client *DBClient) GetApplicationCountByProjectID(projectID int64) (int64, error)
- func (client *DBClient) GetApplicationsByIDs(orgID *int64, projectID *int64, applicationIDs []int64, ...) (int, []model.Application, error)
- func (client *DBClient) GetApplicationsByProjectID(projectID, pageNum, pageSize int64) ([]model.Application, error)
- func (client *DBClient) GetApplicationsByProjectIDs(projectIDs []uint64) ([]model.Application, error)
- func (client *DBClient) GetApproveByID(approveID int64) (model.Approve, error)
- func (client *DBClient) GetApproveByOrgAndID(approveType apistructs.ApproveType, orgID, targetTD, entityID uint64) (*model.Approve, error)
- func (client *DBClient) GetApprovesByOrgIDAndStatus(params *apistructs.ApproveListRequest) (int, []model.Approve, error)
- func (client *DBClient) GetAuditCleanCron(orgID int64) (*model.Org, error)
- func (client *DBClient) GetAuditSettings() ([]model.AuditSettings, error)
- func (client *DBClient) GetAuditsByParam(param *apistructs.AuditsListRequest) (int, []model.Audit, error)
- func (client *DBClient) GetAuthorityByUserId(param *apistructs.GetAuthorityByUserIdRequest) (apistructs.GetAuthorityByUserIdResponse, error)
- func (client *DBClient) GetBatchUpdateIssues(req *apistructs.IssueBatchUpdateRequest) ([]Issue, 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) GetClosedBugState(projectID int64) ([]IssueState, error)
- func (client *DBClient) GetCluster(clusterID int64) (*model.Cluster, error)
- func (client *DBClient) GetClusterByName(clusterName string) (*model.Cluster, error)
- func (client *DBClient) GetClusterOpenTicketsNum(ticketType, targetType, targetID string) (uint64, 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) GetContainerByTaskIDOrContainerID(cluster, taskID, containerID string) ([]model.Container, error)
- func (client *DBClient) GetCountByCertificateID(certificateID int64) (int64, error)
- func (client *DBClient) GetCurrentOrgByUser(userID string) (int64, error)
- func (client *DBClient) GetDeployment(orgID string, taskID uint64) []model.Deployments
- 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) GetErrorLogByDedupIndex(resourceID string, resourceType apistructs.ErrorResourceType, dedupID string) (*model.ErrorLog, error)
- func (client *DBClient) GetFavoritedResource(target string, targetID uint64, userID string) (*model.FavoritedResource, error)
- func (client *DBClient) GetFavoritedResourcesByUser(target, userID string) ([]model.FavoritedResource, error)
- func (client *DBClient) GetFile(id uint64) (File, error)
- func (client *DBClient) GetFileByUUID(uuid string) (File, error)
- func (client *DBClient) GetHostByClusterAndIP(clusterName, privateAddr string) (*model.Host, error)
- func (client *DBClient) GetHostsByCluster(clusterName string) (*[]model.Host, error)
- func (client *DBClient) GetHostsByClusterAndNullOrg(clusterName string) (*[]model.Host, error)
- func (client *DBClient) GetHostsByClusterAndOrg(clusterName, orgName string) (*[]model.Host, error)
- func (client *DBClient) GetHostsNumber() (uint64, error)
- func (client *DBClient) GetHostsNumberByClusterAndOrg(clusterName, orgName string) (uint64, error)
- func (client *DBClient) GetIssue(id int64) (Issue, error)
- func (client *DBClient) GetIssueBugByRange(req apistructs.IssuesStageRequest) ([]Issue, float32, error)
- func (client *DBClient) GetIssueByIssueIDs(issueIDs []uint64) ([]Issue, error)
- func (client *DBClient) GetIssueByState(state int64) (*Issue, error)
- func (client *DBClient) GetIssueManHourSum(req apistructs.IssuesStageRequest) (apistructs.IssueManHourSumResponse, error)
- func (client *DBClient) GetIssueProperties(req apistructs.IssuePropertiesGetRequest) ([]IssueProperty, error)
- func (client *DBClient) GetIssuePropertiesByRelation(ID int64) (*IssueProperty, error)
- func (client *DBClient) GetIssuePropertiesByTime(orgID int64) ([]IssueProperty, error)
- func (client *DBClient) GetIssuePropertyByID(id int64) (*IssueProperty, error)
- func (client *DBClient) GetIssuePropertyByName(orgID int64, Name string, PropertyIssueType apistructs.PropertyIssueType) (*IssueProperty, error)
- func (client *DBClient) GetIssuePropertyValue(id int64) (*IssuePropertyValue, error)
- func (client *DBClient) GetIssuePropertyValues(orgID int64) ([]IssuePropertyValue, error)
- func (client *DBClient) GetIssueRelationsByIDs(issueIDs []uint64) ([]IssueRelation, error)
- func (client *DBClient) GetIssueStateByID(ID int64) (*IssueState, error)
- func (client *DBClient) GetIssueStateByIDs(ID []int64) ([]IssueState, error)
- func (client *DBClient) GetIssueStatePermission(role string, st int64, ed int64) (*IssueStateRelation, error)
- func (client *DBClient) GetIssueSummary(iterationID int64, task, bug, requirement []int64) apistructs.ISummary
- func (client *DBClient) GetIssueWithOutDelete(id int64) (Issue, error)
- func (client *DBClient) GetIssuesStage(orgID int64, issueType apistructs.IssueType) ([]IssueStage, error)
- func (client *DBClient) GetIssuesStageByOrgID(orgID int64) ([]IssueStage, error)
- func (client *DBClient) GetIssuesStateRelations(projectID uint64, issueType apistructs.IssueType) ([]IssueStateJoinSQL, error)
- func (client *DBClient) GetIssuesStatesByProjectID(projectID uint64, issueType apistructs.IssueType) ([]IssueState, error)
- func (client *DBClient) GetIssuesStatesByProjectIDList(projectIDList []uint64) ([]IssueState, error)
- func (client *DBClient) GetIteration(id uint64) (*Iteration, error)
- func (client *DBClient) GetIterationByTitle(projectID uint64, title string) (*Iteration, error)
- func (client *DBClient) GetJob(orgID string, taskID uint64) []model.Jobs
- func (client *DBClient) GetJoinedAppNumByUserId(userID, orgID string) (int, error)
- func (client *DBClient) GetJoinedProjectNumByUserID(userID string, orgID string) (int, []string, error)
- func (client *DBClient) GetLabel(labelID int64) (*Label, error)
- func (client *DBClient) GetLabelByName(projectID uint64, name string) (*Label, error)
- func (client *DBClient) GetLabelRelationsByLabels(refType apistructs.ProjectLabelType, labelIDs []uint64) ([]LabelRelation, error)
- func (client *DBClient) GetLabelRelationsByRef(refType apistructs.ProjectLabelType, refID uint64) ([]LabelRelation, error)
- func (client *DBClient) GetLabels(labelIDs []uint64) ([]Label, error)
- func (client *DBClient) GetLastCommentByTicket(ticketID int64) (*model.Comment, error)
- func (client *DBClient) GetLibReference(libReferenceID uint64) (*LibReference, error)
- func (client *DBClient) GetMBox(id int64, orgID int64, userID string) (*apistructs.MBox, error)
- func (client *DBClient) GetMBoxStats(orgID int64, userID string) (*apistructs.QueryMBoxStatsData, error)
- func (client *DBClient) GetManagerMemberCountByUserID(userIDs []string, scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
- func (client *DBClient) GetManagerMembersCount(scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
- func (client *DBClient) GetMeberExtraByParentID(userIDs []string, scopeType apistructs.ScopeType, parentID int64) ([]model.MemberExtra, error)
- func (client *DBClient) GetMeberRoleByParentID(userID string, scopeType apistructs.ScopeType, parentID int64) ([]model.MemberExtra, error)
- func (client *DBClient) GetMemberByID(memberID int64) (*model.Member, error)
- func (client *DBClient) GetMemberByIDs(memberIDs []int64) ([]model.Member, error)
- func (client *DBClient) GetMemberByScopeAndRole(scopeType apistructs.ScopeType, scopeIDs []uint64, roles []string) ([]model.MemberExtra, error)
- func (client *DBClient) GetMemberByScopeAndUserID(userID string, scopeType apistructs.ScopeType, scopeID int64) ([]model.MemberJoin, error)
- func (client *DBClient) GetMemberByToken(token string) (*model.Member, error)
- func (client *DBClient) GetMemberByUserID(userID string) ([]model.Member, error)
- func (client *DBClient) GetMemberByUserIDAndScopeIDs(userID string, scopeType apistructs.ScopeType, scopeIDs []int64) ([]model.Member, error)
- func (client *DBClient) GetMemberByUserIDsAndScope(userIDs []string, scopeType apistructs.ScopeType, scopeID int64) ([]model.Member, error)
- func (client *DBClient) GetMemberExtra(userIDs []string, scopeType apistructs.ScopeType, scopeID int64, ...) ([]model.MemberExtra, error)
- func (client *DBClient) GetMemberExtraByIDs(userIDs []string, scopeType apistructs.ScopeType, scopeIDs []int64, ...) ([]model.MemberExtra, error)
- func (client *DBClient) GetMembersByOrgAndUser(orgID int64, userID string) ([]model.MemberJoin, error)
- func (client *DBClient) GetMembersByParam(param *apistructs.MemberListRequest) (int, []model.Member, error)
- func (client *DBClient) GetMembersByParentID(scopeType apistructs.ScopeType, parentID int64, userID string) ([]model.MemberJoin, error)
- func (client *DBClient) GetMembersByScope(scopeType apistructs.ScopeType, scopeIDs []string, roles []string) ([]model.Member, error)
- func (client *DBClient) GetMembersByScopeType(scopeType apistructs.ScopeType) ([]model.Member, error)
- func (client *DBClient) GetMembersByScopeTypeAndUser(scopeType apistructs.ScopeType, userID string) ([]model.Member, error)
- func (client *DBClient) GetMembersWithoutExtraByScope(scopeType apistructs.ScopeType, scopeID int64) (int, []model.Member, 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) GetNotice(noticeID uint64) (*Notice, error)
- func (client *DBClient) GetNotifyByGroupID(groupID int64) (*model.Notify, error)
- func (client *DBClient) GetNotifyDetail(id int64, orgID int64) (*apistructs.NotifyDetail, error)
- func (client *DBClient) GetNotifyGroupByID(id int64, orgID int64) (*apistructs.NotifyGroup, error)
- func (client *DBClient) GetNotifyGroupByIDWithoutOrgID(id int64) (*apistructs.NotifyGroup, error)
- func (client *DBClient) GetNotifyGroupNameByID(id int64, orgID int64) (*apistructs.NotifyGroup, error)
- func (client *DBClient) GetNotifyItemsByNotifyID(notifyID int64) ([]*apistructs.NotifyItem, error)
- func (client *DBClient) GetNotifyItemsByNotifyIDAndItemName(notifyID int64, itemName string) ([]*apistructs.NotifyItem, error)
- func (client *DBClient) GetNotifySourcesByNotifyID(notifyID int64) ([]*apistructs.NotifySource, error)
- func (client *DBClient) GetOpenTicketByKey(key string) (*model.Ticket, error)
- func (client *DBClient) GetOperatorByTaskID(taskID []int) ([]model.ReviewUser, error)
- func (client *DBClient) GetOrg(orgID int64) (model.Org, error)
- func (client *DBClient) GetOrgByName(orgName string) (*model.Org, error)
- func (client *DBClient) GetOrgByUserIDs(userIDs []string) ([]model.Member, error)
- func (client *DBClient) GetOrgClusterRelationByOrgAndCluster(orgID, clusterID int64) (*model.OrgClusterRelation, error)
- func (client *DBClient) GetOrgClusterRelationsByOrg(orgID int64) ([]model.OrgClusterRelation, error)
- func (client *DBClient) GetOrgList() ([]model.Org, error)
- func (client *DBClient) GetOrgPublishersCount(orgID uint64) (int64, error)
- func (client *DBClient) GetOrgsByIDsAndName(orgIDs []int64, name string, pageNo, pageSize int) (int, []model.Org, error)
- func (client *DBClient) GetOrgsByParam(name string, pageNum, pageSize int) (int, []model.Org, error)
- func (client *DBClient) GetOrgsByUserID(userID string) ([]model.Org, error)
- func (client *DBClient) GetOwnerMemberCountByUserID(userIDs []string, scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
- func (client *DBClient) GetOwnerMembersCount(scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
- func (client *DBClient) GetPanelByIssueID(issueID int64) (*IssuePanel, error)
- func (client *DBClient) GetPanelByPanelID(panelID int64) (*IssuePanel, error)
- func (client *DBClient) GetPanelIssuesByPanel(panelID int64, pageNo, pageSize uint64) ([]IssuePanel, uint64, error)
- func (client *DBClient) GetPanelIssuesID(projectID uint64) ([]int64, error)
- func (client *DBClient) GetPanelIssuesIDByProjectID(projectID uint64) ([]IssuePanel, error)
- func (client *DBClient) GetPanelsByProjectID(projectID uint64) ([]IssuePanel, error)
- func (client *DBClient) GetPermissionList(roles []string) ([]model.RolePermission, []model.RolePermission)
- func (client *DBClient) GetProjectApplications(projectID int64) ([]model.Application, error)
- func (client *DBClient) GetProjectByID(projectID int64) (model.Project, error)
- func (client *DBClient) GetProjectByOrgAndName(orgID int64, name string) (*model.Project, error)
- func (client *DBClient) GetProjectIDListByStates(req apistructs.IssuePagingRequest, projectIDList []uint64) (int, []model.Project, error)
- func (client *DBClient) GetProjectMembersByUser(userID string) ([]model.MemberExtra, error)
- func (client *DBClient) GetProjectsByIDs(projectIDs []uint64, params *apistructs.ProjectListRequest) (int, []model.Project, error)
- func (client *DBClient) GetProjectsByOrgIDAndName(orgID int64, params *apistructs.ProjectListRequest) (int, []model.Project, error)
- func (client *DBClient) GetPropertyRelationByID(issueID int64) ([]IssuePropertyRelation, error)
- func (client *DBClient) GetPropertyRelationByIssueID(issueID int64, propertyID int64) (*IssuePropertyRelation, error)
- func (client *DBClient) GetPropertyRelationByPropertyID(propertyID int64) (*IssuePropertyRelation, error)
- func (client *DBClient) GetPublicOrgsByParam(name string, pageNum, pageSize int) (int, []model.Org, 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) GetRelatedIssues(issueID uint64) ([]uint64, error)
- func (client *DBClient) GetRelatingIssues(issueID uint64) ([]uint64, error)
- func (client *DBClient) GetReviewByTaskId(param *apistructs.GetReviewByTaskIdIdRequest) (apistructs.GetReviewByTaskIdIdResponse, error)
- func (client *DBClient) GetReviewsBySponsorId(param *apistructs.GetReviewsBySponsorIdRequest) (int, []model.ManualReview, error)
- func (client *DBClient) GetReviewsByUserId(param *apistructs.GetReviewsByUserIdRequest, tasks []int64) (int, []model.ManualReview, error)
- func (client *DBClient) GetRolePermission(roles []string, permissionInfo *apistructs.PermissionCheckRequest) (*model.RolePermission, error)
- func (client *DBClient) GetRunningAddonByClusterAndInstanceID(clusterName, instanceID string) (*[]model.Container, error)
- func (client *DBClient) GetRunningComponentContainersByClusterAndComponent(clusterName, componentName string) ([]model.Container, error)
- func (client *DBClient) GetScopeManagersByScopeID(scopeType apistructs.ScopeType, scopeID int64) ([]model.Member, error)
- func (client *DBClient) GetScopeNameByScope(scopeType apistructs.ScopeType, scopeID int64) string
- func (client *DBClient) GetTaskIDByOperator(param *apistructs.GetReviewsByUserIdRequest) ([]int64, error)
- func (client *DBClient) GetTicket(ticketID int64) (*model.Ticket, error)
- func (client *DBClient) GetTicketByRequestID(requestID string) (*model.Ticket, error)
- func (client *DBClient) InitOrgAuditInterval(orgIDs []uint64) error
- func (client *DBClient) InsertContainer(ctx context.Context, c *types.CmContainer) error
- func (client *DBClient) IsSysAdmin(userID string) (bool, error)
- func (client *DBClient) IssueStateCount(requirementIDs []int64) ([]apistructs.RequirementGroupResult, error)
- func (client *DBClient) IssueStateCount2(issueIDs []uint64) ([]apistructs.RequirementGroupResult, error)
- func (client *DBClient) ListAllContainersByService(runtimeID, serviceName string) ([]model.Container, error)
- func (client *DBClient) ListAllOrgClusterRelations() ([]model.OrgClusterRelation, error)
- func (client *DBClient) ListCluster() (*[]model.Cluster, error)
- func (client *DBClient) ListClusterByIDs(clusterIDs []uint64) (*[]model.Cluster, error)
- func (client *DBClient) ListClusterByNames(clusterNames []string) (*[]model.Cluster, error)
- func (client *DBClient) ListClusterByOrg(orgID int64) (*[]model.Cluster, error)
- func (client *DBClient) ListClusterByOrgAndType(orgID int64, clusterType string) (*[]model.Cluster, error)
- func (client *DBClient) ListClusterRunningContainers(clusterName string) ([]model.Container, error)
- func (client *DBClient) ListContainerByApplication(appID, orgID string, running bool) ([]model.Container, error)
- func (client *DBClient) ListContainerByCluster(clusterName, orgID string, running bool) ([]model.Container, error)
- func (client *DBClient) ListContainerByHost(clusterName, hostIP string, running bool) ([]model.Container, error)
- func (client *DBClient) ListContainerByOrg(orgID string, running bool) ([]model.Container, error)
- func (client *DBClient) ListContainerByProject(projectID, orgID string, running bool) ([]model.Container, error)
- func (client *DBClient) ListContainerByRuntime(runtimeID, orgID string, running bool) ([]model.Container, error)
- func (client *DBClient) ListDeploymentsByOrgID(param *apistructs.OrgRunningTasksListRequest, orgID uint64) (int64, *[]model.Deployments, error)
- func (client *DBClient) ListEdasContainerByParam(params *apistructs.EdasContainerListRequest) ([]model.Container, error)
- func (client *DBClient) ListErrorLogByResources(resourceTypes []apistructs.ErrorResourceType, resourceIDs []string) ([]model.ErrorLog, error)
- func (client *DBClient) ListErrorLogByResourcesAndStartTime(resourceTypes []apistructs.ErrorResourceType, resourceIDs []string, ...) ([]model.ErrorLog, error)
- func (client *DBClient) ListExpiredDeployments(startTime string) []model.Deployments
- func (client *DBClient) ListExpiredFiles(expiredAt time.Time) ([]File, error)
- func (client *DBClient) ListExpiredJobs(startTime string) []model.Jobs
- func (client *DBClient) ListIssue(req apistructs.IssueListRequest) ([]Issue, error)
- func (client *DBClient) ListIssueByIDs(issueIDs []int64) ([]Issue, error)
- func (client *DBClient) ListIssueTestCaseRelations(req apistructs.IssueTestCaseRelationsListRequest) ([]IssueTestCaseRelation, error)
- func (client *DBClient) ListJobsByOrgID(param *apistructs.OrgRunningTasksListRequest, orgID uint64) (int64, *[]model.Jobs, error)
- func (client *DBClient) ListLabel(req *apistructs.ProjectLabelListRequest) (int64, []Label, error)
- func (client *DBClient) ListLabelByNames(projectID uint64, names []string) ([]Label, error)
- func (client *DBClient) ListLibReference(req *apistructs.LibReferenceListRequest) (uint64, []LibReference, error)
- func (client *DBClient) ListNamespaceByAppID(name 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) ListNotice(req *apistructs.NoticeListRequest) (uint64, []Notice, error)
- func (client *DBClient) ListProjectByCluster(clusterName string) ([]model.Project, error)
- func (client *DBClient) ListProjectByOrgID(orgID uint64) ([]model.Project, error)
- func (client *DBClient) ListRunningAddonsByCluster(clusterName string) ([]model.Container, error)
- func (client *DBClient) ListRunningComponentContainerByCluster(clusterName string) ([]model.Container, error)
- func (client *DBClient) ListRunningContainersByHost(clusterName, hostIP string) ([]model.Container, error)
- func (client *DBClient) ListRunningContainersByService(runtimeID, serviceName string) ([]model.Container, error)
- func (client *DBClient) ListRunningDeployments() []model.Deployments
- func (client *DBClient) ListRunningJobs() []model.Jobs
- func (client *DBClient) ListRunningProjectContainersByCluster(clusterName, orgID string) ([]model.Container, error)
- func (client *DBClient) ListStoppedContainersByService(runtimeID, serviceName string) ([]model.Container, error)
- func (client *DBClient) ListUnblockApplicationApprove(orgID uint64) ([]model.Approve, error)
- func (client *DBClient) PageMeberRoleByParentID(req apistructs.ListMemberRolesByUserRequest) (int, []model.Member, error)
- func (client *DBClient) PagingIssueStream(req *apistructs.IssueStreamPagingRequest) (int64, []IssueStream, error)
- func (client *DBClient) PagingIssues(req apistructs.IssuePagingRequest, queryIDs bool) ([]Issue, uint64, error)
- func (client *DBClient) PagingIterations(req apistructs.IterationPagingRequest) ([]Iteration, uint64, error)
- func (client *DBClient) PagingPropertyRelationByIDs(issueID []int64) ([]IssuePropertyRelation, 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) QueryContainer(ctx context.Context, cluster string, id string) (*types.CmContainer, error)
- func (client *DBClient) QueryContainerByTaskIDOrContainerID(ctx context.Context, cluster string, taskID string, containerID string) ([]types.CmContainer, error)
- func (client *DBClient) QueryHost(ctx context.Context, cluster, addr string) (*types.CmHost, error)
- func (client *DBClient) QueryMBox(request *apistructs.QueryMBoxRequest) (*apistructs.QueryMBoxData, error)
- func (client *DBClient) QueryNotifies(request *apistructs.QueryNotifyRequest) (*apistructs.QueryNotifyData, error)
- func (client *DBClient) QueryNotifiesBySource(sourceType, sourceID, itemName string, orgID int64, clusterName string, ...) ([]*apistructs.NotifyDetail, error)
- func (client *DBClient) QueryNotifyGroup(request *apistructs.QueryNotifyGroupRequest, orgID int64) (*apistructs.QueryNotifyGroupData, error)
- func (client *DBClient) QueryNotifyHistories(request *apistructs.QueryNotifyHistoryRequest) (*apistructs.QueryNotifyHistoryData, error)
- func (client *DBClient) QueryNotifyItems(request *apistructs.QueryNotifyItemRequest) (*apistructs.QueryNotifyItemData, error)
- func (client *DBClient) QuerytNotifyItemsByNotifyIDAndItemName(notifyID int64, itemName string) ([]*apistructs.NotifyItem, error)
- func (client *DBClient) QuoteCertificate(certificate *model.AppCertificate) error
- func (client *DBClient) RemovePublishItemRelations(request *apistructs.RemoveAppPublishItemRelationsRequest) error
- func (client *DBClient) SetMBoxReadStatus(request *apistructs.SetMBoxReadStatusRequest) 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 (client *DBClient) UpdateAccount(account *model.CloudAccount) error
- func (client *DBClient) UpdateAppPublishItemRelations(request *apistructs.UpdateAppPublishItemRelationRequest) error
- func (client *DBClient) UpdateApplication(application *model.Application) error
- func (client *DBClient) UpdateApproval(param *apistructs.UpdateApproval) error
- func (client *DBClient) UpdateApprovalStatusByApprovalID(approvalID uint64, status apistructs.ApprovalStatus) error
- func (client *DBClient) UpdateApprove(approve *model.Approve) error
- func (client *DBClient) UpdateAuditCleanCron(orgID, interval int64) error
- func (client *DBClient) UpdateBranchRule(branchRule *model.BranchRule) error
- func (client *DBClient) UpdateCertificate(certificate *model.Certificate) error
- func (client *DBClient) UpdateCluster(cluster *model.Cluster) error
- func (client *DBClient) UpdateComment(comment *model.Comment) error
- func (client *DBClient) UpdateContainer(container *model.Container) error
- func (client *DBClient) UpdateContainerByPrimaryKeyID(ctx context.Context, c *types.CmContainer) error
- func (client *DBClient) UpdateContainerByTaskIDOrContainerID(ctx context.Context, c *types.CmContainer) error
- func (client *DBClient) UpdateCurrentOrg(userID string, orgID int64) error
- func (client *DBClient) UpdateDeploymentStatus(deployment *model.Deployments) error
- func (client *DBClient) UpdateErrorLog(errorLog *model.ErrorLog) error
- func (client *DBClient) UpdateHost(host *model.Host) error
- func (client *DBClient) UpdateIssue(id uint64, fields map[string]interface{}) error
- func (client *DBClient) UpdateIssuePropertiesIndex(properties []IssueProperty) error
- func (client *DBClient) UpdateIssueProperty(property *IssueProperty) error
- func (client *DBClient) UpdateIssuePropertyValue(property *IssuePropertyValue) error
- func (client *DBClient) UpdateIssueState(state *IssueState) error
- func (client *DBClient) UpdateIssueStateRelations(projectID int64, issueType apistructs.IssueType, ...) error
- func (client *DBClient) UpdateIssueStream(is *IssueStream) error
- func (client *DBClient) UpdateIssueType(issue *Issue) error
- func (client *DBClient) UpdateIssues(requirementID uint64, fields map[string]interface{}) error
- func (client *DBClient) UpdateIssuesStateBelong(id int64, belong apistructs.IssueStateBelong) error
- func (client *DBClient) UpdateIssuesStateIndex(id int64, index int64) error
- func (client *DBClient) UpdateIteration(Iteration *Iteration) error
- func (client *DBClient) UpdateJobStatus(Job *model.Jobs) error
- func (client *DBClient) UpdateLabel(label *Label) error
- func (client *DBClient) UpdateMember(member *model.Member) error
- func (client *DBClient) UpdateMemberUserInfo(ids []int64, fields map[string]interface{}) error
- func (client *DBClient) UpdateNotice(notice *Notice) error
- func (client *DBClient) UpdateNotify(request *apistructs.UpdateNotifyRequest) error
- func (client *DBClient) UpdateNotifyEnable(id int64, enabled bool, orgID int64) error
- func (client *DBClient) UpdateNotifyGroup(request *apistructs.UpdateNotifyGroupRequest) error
- func (client *DBClient) UpdateNotifyItem(request *apistructs.UpdateNotifyItemRequest) 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) UpdateOrg(org *model.Org) error
- func (client *DBClient) UpdatePanel(panel *IssuePanel) error
- func (client *DBClient) UpdateProject(project *model.Project) error
- func (client *DBClient) UpdateProjectQuota(clusterName string, cpuOverSellChangeRatio float64) error
- func (client *DBClient) UpdatePropertyRelationArbitraryValue(issueID int64, propertyID int64, value string) error
- func (client *DBClient) UpdatePublisher(publisher *model.Publisher) error
- func (client *DBClient) UpdateQuoteCertificate(certificate *model.AppCertificate) error
- func (client *DBClient) UpdateTicket(ticket *model.Ticket) error
- type File
- type FileExtra
- type Int64Slice
- type Issue
- type IssueAppRelation
- type IssuePanel
- type IssueProperty
- type IssuePropertyRelation
- type IssuePropertyValue
- type IssueRelation
- type IssueStage
- type IssueState
- type IssueStateJoinSQL
- type IssueStateRelation
- type IssueStream
- type IssueTestCaseRelation
- type Iteration
- type Label
- type LabelRelation
- type LibReference
- type NexusRepository
- type NexusRepositoryConfig
- type NexusUser
- type NexusUserConfig
- type Notice
- type OSSSnapshot
- type ProjectID
Constants ¶
const BULK_INSERT_CHUNK_SIZE = 3000
const DIALECT = "mysql"
DIALECT db 类型
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 ¶
func MakeHostLabel ¶
TODO deprecated MakeHostLabel 处理宿主机调度标签可读
Types ¶
type BaseModel ¶
type BaseModel struct {
ID int64 `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
BaseModel common info for all models
type DBClient ¶
DBClient db client
func (*DBClient) AllAddonsByCluster ¶
func (client *DBClient) AllAddonsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllAddonsByCluster 获取集群所有的 dice addons containers
func (*DBClient) AllComponentsByCluster ¶
func (client *DBClient) AllComponentsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllComponentsByCluster 获取集群所有的 dice components containers
func (*DBClient) AllContainersByAddon ¶
func (client *DBClient) AllContainersByAddon(ctx context.Context, cluster string, addon []string) ([]types.CmContainer, error)
AllContainersByAddon 获取指定 addon 下所有的containers
func (*DBClient) AllContainersByApplication ¶
func (client *DBClient) AllContainersByApplication(ctx context.Context, app []string) ([]types.CmContainer, error)
AllContainersByApplication 获取指定 appliaction 下所有 containers
func (*DBClient) AllContainersByCluster ¶
func (client *DBClient) AllContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllContainersByCluster 获取整个 cluster 所有的 containers
func (*DBClient) AllContainersByComponent ¶
func (client *DBClient) AllContainersByComponent(ctx context.Context, cluster string, component []string) ([]types.CmContainer, error)
AllContainersByComponent 获取指定 component 下所有的containers
func (*DBClient) AllContainersByHost ¶
func (client *DBClient) AllContainersByHost(ctx context.Context, cluster string, host []string) ([]types.CmContainer, error)
AllContainersByHost 获取指定 host 下所有 containers
func (*DBClient) AllContainersByOrg ¶
func (client *DBClient) AllContainersByOrg(ctx context.Context, org string) ([]types.CmContainer, error)
AllContainersByOrg 获取指定 org 下所有 containers
func (*DBClient) AllContainersByProject ¶
func (client *DBClient) AllContainersByProject(ctx context.Context, project []string) ([]types.CmContainer, error)
AllContainersByProject 获取指定 project 下所有 containers
func (*DBClient) AllContainersByRuntime ¶
func (client *DBClient) AllContainersByRuntime(ctx context.Context, runtime []string) ([]types.CmContainer, error)
AllContainersByRuntime 获取指定 runtime 下所有 containers
func (*DBClient) AllContainersByService ¶
func (client *DBClient) AllContainersByService(ctx context.Context, runtime string, service []string) ([]types.CmContainer, error)
AllContainersByService 获取指定 service 下所有 containers
func (*DBClient) AllHostsByCluster ¶
func (client *DBClient) AllHostsByCluster(ctx context.Context, cluster string) (*[]types.CmHost, error)
AllHostsByCluster 获取指定集群下所有的host信息
func (*DBClient) AllProjectsContainersByCluster ¶
func (client *DBClient) AllProjectsContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllProjectsContainersByCluster 获取整个 cluster 所有通过 dice 创建的 containers
func (*DBClient) AllRunningAddonsByCluster ¶
func (client *DBClient) AllRunningAddonsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllRunningAddonsByCluster 获取集群所有运行中的 dice addons containers
func (*DBClient) AllRunningComponentsByCluster ¶
func (client *DBClient) AllRunningComponentsByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllRunningComponentsByCluster 获取集群所有正在运行的 dice components containers
func (*DBClient) AllRunningContainersByApplication ¶
func (client *DBClient) AllRunningContainersByApplication(ctx context.Context, app []string) ([]types.CmContainer, error)
AllRunningContainersByApplication 获取指定 appliaction 下所有正在运行的 containers
func (*DBClient) AllRunningContainersByCluster ¶
func (client *DBClient) AllRunningContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllRunningContainersByCluster 获取整个 cluster 所有正在运行的 containers
func (*DBClient) AllRunningContainersByComponent ¶
func (client *DBClient) AllRunningContainersByComponent(ctx context.Context, cluster string, component []string) ([]types.CmContainer, error)
AllRunningContainersByComponent 获取指定 component 下所有正在运行的 containers
func (*DBClient) AllRunningContainersByHost ¶
func (client *DBClient) AllRunningContainersByHost(ctx context.Context, cluster string, host []string) ([]types.CmContainer, error)
AllRunningContainersByHost 获取指定 host 下所有运行中的 containers
func (*DBClient) AllRunningContainersByOrg ¶
func (client *DBClient) AllRunningContainersByOrg(ctx context.Context, org string) ([]types.CmContainer, error)
AllRunningContainersByOrg 获取指定 org 下所有正在运行的 containers
func (*DBClient) AllRunningContainersByProject ¶
func (client *DBClient) AllRunningContainersByProject(ctx context.Context, project []string) ([]types.CmContainer, error)
AllRunningContainersByProject 获取指定 project 下所有正在运行的 containers
func (*DBClient) AllRunningContainersByRuntime ¶
func (client *DBClient) AllRunningContainersByRuntime(ctx context.Context, runtime []string) ([]types.CmContainer, error)
AllRunningContainersByRuntime 获取指定 runtime 下所有正在运行的 containers
func (*DBClient) AllRunningContainersByService ¶
func (client *DBClient) AllRunningContainersByService(ctx context.Context, runtime string, service []string) ([]types.CmContainer, error)
AllRunningContainersByService 获取指定 service 下所有正在运行的 containers
func (*DBClient) AllRunningProjectsContainers ¶
func (*DBClient) AllRunningProjectsContainersByCluster ¶
func (client *DBClient) AllRunningProjectsContainersByCluster(ctx context.Context, cluster string) ([]types.CmContainer, error)
AllRunningProjectsContainersByCluster 获取整个 cluster 所有通过 dice 创建且正在运行的 containers
func (*DBClient) ArchiveAuditsByTimeAndOrg ¶
ArchiveAuditsByTimeAndOrg 归档某个企业的审计事件
func (*DBClient) BatchCreateAudit ¶
BatchCreateAudit 批量传教审计
func (*DBClient) BatchCreateIssueTestCaseRelations ¶
func (client *DBClient) BatchCreateIssueTestCaseRelations(rels []IssueTestCaseRelation) error
BatchCreateIssueTestCaseRelations 批量创建关联关系
func (*DBClient) BatchCreateMemberExtra ¶
func (client *DBClient) BatchCreateMemberExtra(memberExtras []model.MemberExtra) error
BatchCreateMemberExtra 批量创建成员关联关系
func (*DBClient) BatchGetNotifyGroup ¶
func (client *DBClient) BatchGetNotifyGroup(ids []int64) ([]*apistructs.NotifyGroup, error)
BatchGetNotifyGroup 批量获取通知组
func (*DBClient) BatchQueryIssueLabelIDMap ¶
BatchGetIssueLabelIDMap 批量查询 issue label id
func (*DBClient) BatchUpdateIssues ¶
func (client *DBClient) BatchUpdateIssues(req *apistructs.IssueBatchUpdateRequest) error
BatchUpdateIssues 批量更新 issue
func (*DBClient) BulkInsert ¶
func (*DBClient) CancelQuoteCertificate ¶
CancelQuoteCertificate 取消引用Certificate
func (*DBClient) CheckNotifyGroupNameExist ¶
func (*DBClient) CheckNotifyNameExist ¶
func (*DBClient) CleanIssueRelation ¶
ClearIssueRelation 清理所有的issue关联关系
func (*DBClient) CreateAccount ¶
func (client *DBClient) CreateAccount(account *model.CloudAccount) error
CreateCloudAccount 创建云账号
func (*DBClient) CreateApplication ¶
func (client *DBClient) CreateApplication(application *model.Application) error
CreateApplication 创建应用
func (*DBClient) CreateApprove ¶
CreateApprove 创建Approve
func (*DBClient) CreateAudit ¶
CreateAudit 创建审计
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) CreateCluster ¶
CreateCluster 创建集群
func (*DBClient) CreateComment ¶
CreateComment 创建工单评论
func (*DBClient) CreateContainer ¶
CreateContainer 创建容器
func (*DBClient) CreateCurrentOrg ¶
func (client *DBClient) CreateCurrentOrg(orgRelation *model.CurrentOrg) error
CreateCurrentOrg 添加用户当前所属企业
func (*DBClient) CreateDeployment ¶
func (client *DBClient) CreateDeployment(deployment *model.Deployments) error
CreateDeployment 创建正在运行的deployment
func (*DBClient) CreateErrorLog ¶
CreateErrorLog 创建错误日志
func (*DBClient) CreateFavoritedResource ¶
func (client *DBClient) CreateFavoritedResource(resource *model.FavoritedResource) error
CreateFavoritedResource 创建收藏关系
func (*DBClient) CreateFile ¶
func (*DBClient) CreateHost ¶
CreateHost 创建host
func (*DBClient) CreateIssueAppRelation ¶
func (client *DBClient) CreateIssueAppRelation(issueAppRel *IssueAppRelation) error
CreateIssueAppRelation 创建事件应用关联关系
func (*DBClient) CreateIssueProperty ¶
func (client *DBClient) CreateIssueProperty(property *IssueProperty) error
func (*DBClient) CreateIssuePropertyValue ¶
func (client *DBClient) CreateIssuePropertyValue(value *IssuePropertyValue) error
func (*DBClient) CreateIssuePropertyValues ¶
func (client *DBClient) CreateIssuePropertyValues(values []IssuePropertyValue) error
func (*DBClient) CreateIssueRelations ¶
func (client *DBClient) CreateIssueRelations(issueRelation *IssueRelation) error
CreateIssueRelations 创建事件与事件的关联关系
func (*DBClient) CreateIssueStage ¶
func (client *DBClient) CreateIssueStage(stages []IssueStage) error
func (*DBClient) CreateIssueStream ¶
func (client *DBClient) CreateIssueStream(is *IssueStream) error
CreateIssueStream 创建 issue 事件流
func (*DBClient) CreateIssuesState ¶
func (client *DBClient) CreateIssuesState(state *IssueState) error
func (*DBClient) CreateIteration ¶
Iteration 创建
func (*DBClient) CreateLabel ¶
CreateLabel 创建 label
func (*DBClient) CreateLabelRelation ¶
func (client *DBClient) CreateLabelRelation(lr *LabelRelation) error
CreateLabelRelation 创建标签关联关系
func (*DBClient) CreateLibReference ¶
func (client *DBClient) CreateLibReference(libReference *LibReference) error
CreateLibReference 创建库引用
func (*DBClient) CreateMBox ¶
func (client *DBClient) CreateMBox(request *apistructs.CreateMBoxRequest) error
func (*DBClient) CreateMember ¶
CreateMember 创建成员
func (*DBClient) CreateMemberExtra ¶
func (client *DBClient) CreateMemberExtra(memberExtra *model.MemberExtra) error
CreateMemberExtra 创建成员关联关系
func (*DBClient) CreateNotice ¶
CreateNotice 创建公告
func (*DBClient) CreateNotify ¶
func (client *DBClient) CreateNotify(request *apistructs.CreateNotifyRequest) (int64, error)
func (*DBClient) CreateNotifyGroup ¶
func (client *DBClient) CreateNotifyGroup(request *apistructs.CreateNotifyGroupRequest) (int64, error)
CreateNotifyGroup 创建通知组
func (*DBClient) CreateNotifyHistory ¶
func (client *DBClient) CreateNotifyHistory(request *apistructs.CreateNotifyHistoryRequest) (int64, error)
func (*DBClient) CreateNotifyItem ¶
func (client *DBClient) CreateNotifyItem(request *apistructs.CreateNotifyItemRequest) (int64, error)
func (*DBClient) CreateOrUpdateNexusRepository ¶
func (client *DBClient) CreateOrUpdateNexusRepository(repo *NexusRepository) error
func (*DBClient) CreateOrUpdateNexusUser ¶
func (*DBClient) CreateOrUpdateService ¶
CreateOrUpdateService 更新服务信息
func (*DBClient) CreateOrgClusterRelation ¶
func (client *DBClient) CreateOrgClusterRelation(relation *model.OrgClusterRelation) error
CreateOrgClusterRelation 创建企业集群关系
func (*DBClient) CreatePanel ¶
func (client *DBClient) CreatePanel(panel *IssuePanel) error
func (*DBClient) CreateProject ¶
CreateProject 创建项目
func (*DBClient) CreatePropertyRelation ¶
func (client *DBClient) CreatePropertyRelation(relation *IssuePropertyRelation) error
func (*DBClient) CreatePropertyRelations ¶
func (client *DBClient) CreatePropertyRelations(relations []IssuePropertyRelation) error
func (*DBClient) CreatePublisher ¶
CreatePublisher 创建Publisher
func (*DBClient) CreateReview ¶
func (client *DBClient) CreateReview(review *model.ManualReview) error
func (*DBClient) CreateReviewUser ¶
func (client *DBClient) CreateReviewUser(review *model.ReviewUser) error
func (*DBClient) CreateRolePermission ¶
func (client *DBClient) CreateRolePermission(permission *model.RolePermission) error
CreateRolePermission 创建角色权限
func (*DBClient) CreateTicket ¶
CreateTicket 创建工单
func (*DBClient) DeleteAccount ¶
DeleteCloudAccount 删除云账号
func (*DBClient) DeleteAllContainersByHost ¶
DeleteAllContainersByHost 删除指定 host 下所有 containers
func (*DBClient) DeleteApplication ¶
DeleteApplication 删除应用
func (*DBClient) DeleteApprove ¶
DeleteApprove 删除Approve
func (*DBClient) DeleteAuditsByTimeAndOrg ¶
DeleteAuditsByTimeAndOrg 软删除某个企业的审计事件
func (*DBClient) DeleteAuditsByTimeAndSys ¶
DeleteAuditsByTimeAndSys 软删除系统级别的审计事件
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) DeleteCluster ¶
DeleteCluster 删除集群
func (*DBClient) DeleteContainer ¶
DeleteContainer 删除 container 信息
func (*DBClient) DeleteCurrentOrg ¶
DeleteCurrentOrg 删除当前用户所属企业
func (*DBClient) DeleteDeployment ¶
DeleteDeployment 删除 deployment 信息
func (*DBClient) DeleteFavoritedResource ¶
DeleteFavoritedResource 删除收藏关系
func (*DBClient) DeleteFavoritedResourcesByTarget ¶
DeleteFavoritedResourcesByTarget 根据 target 删除收藏关系
func (*DBClient) DeleteFile ¶
func (*DBClient) DeleteHostByName ¶
DeleteHostByName 根据名字删除指定集群下指定的宿主机
func (*DBClient) DeleteIssueAppRelationsByApp ¶
DeleteIssueAppRelationsByApp 根据 appID 删除关联关系
func (*DBClient) DeleteIssueAppRelationsByComment ¶
DeleteIssueAppRelationsByComment 根据 commentID 删除关联关系
func (*DBClient) DeleteIssueProperty ¶
func (client *DBClient) DeleteIssueProperty(orgId int64, propertyIssueType apistructs.PropertyIssueType, id int64, index int64) error
func (*DBClient) DeleteIssuePropertyValue ¶
func (*DBClient) DeleteIssuePropertyValuesByPropertyID ¶
func (*DBClient) DeleteIssueRelation ¶
DeleteIssueRelation 删除两条issue之间的关联关系
func (*DBClient) DeleteIssueTestCaseRelationsByIDs ¶
DeleteIssueTestCaseRelationsByIDs 根据关联关系 id 删除
func (*DBClient) DeleteIssueTestCaseRelationsByIssueID ¶
DeleteIssueTestCaseRelationsByIssueID 根据 issue id 删除关联关系
func (*DBClient) DeleteIssuesByRequirement ¶
DeleteIssuesByRequirement
func (*DBClient) DeleteIssuesStage ¶
func (client *DBClient) DeleteIssuesStage(orgID int64, issueType apistructs.IssueType) error
func (*DBClient) DeleteIssuesState ¶
func (*DBClient) DeleteIssuesStateByProjectID ¶
func (*DBClient) DeleteIssuesStateRelationByStartID ¶
func (*DBClient) DeleteIteration ¶
Iteration 删除
func (*DBClient) DeleteLabel ¶
DeleteLabel 删除标签
func (*DBClient) DeleteLabelRelations ¶
func (client *DBClient) DeleteLabelRelations(refType apistructs.ProjectLabelType, refID uint64) error
DeleteLabelRelations 删除标签关联关系
func (*DBClient) DeleteLabelRelationsByLabel ¶
DeleteLabelRelationsByLabel 根据 labelID 删除标签
func (*DBClient) DeleteLibReference ¶
DeleteLibReference 删除库引用
func (*DBClient) DeleteMBox ¶
func (*DBClient) DeleteMember ¶
DeleteMember 删除成员
func (*DBClient) DeleteMemberByScopeAndUsersAndRole ¶
func (client *DBClient) DeleteMemberByScopeAndUsersAndRole(userIDs []string, scopeType apistructs.ScopeType, scopeID int64, role string) error
DeleteMemberByScopeAndUsersAndRole 根据scope, userID, role删除成员,多角色状态下,更新用户角色时用到, todo delete
func (*DBClient) DeleteMemberExtraByIDsANDResourceValues ¶
func (client *DBClient) DeleteMemberExtraByIDsANDResourceValues(userIDs []string, scopeType apistructs.ScopeType, scopeIDs []int64, resourceValues []string) error
DeleteMemberExtraByIDsANDResourceValues 根据userIDs, scope和resourceValues删除成员标签
func (*DBClient) DeleteMemberExtraByParentID ¶
func (client *DBClient) DeleteMemberExtraByParentID(userIDs []string, scopeType apistructs.ScopeType, parentID int64) error
DeleteMemberExtraByParentID 根据parentID删除成员关联关系
func (*DBClient) DeleteMemberExtraByParentIDs ¶
func (client *DBClient) DeleteMemberExtraByParentIDs(userID []string, scopeType apistructs.ScopeType, parentIDs []int64) error
DeleteMemberExtraByParentIDs 根据多个parentID删除成员关联关系
func (*DBClient) DeleteMemberExtraByScope ¶
func (client *DBClient) DeleteMemberExtraByScope(scopeType apistructs.ScopeType, scopeID int64) error
DeleteMemberExtraByScope 根据scope信息删除成员
func (*DBClient) DeleteMemberExtraByUserIDsAndScope ¶
func (client *DBClient) DeleteMemberExtraByUserIDsAndScope(scopeType apistructs.ScopeType, scopeID int64, userIDs []string) error
DeleteMemberExtraByUserIDsAndScope 根据userID和scope删除成员关联关系
func (*DBClient) DeleteMemberExtraByUserIDsAndScopeIDs ¶
func (client *DBClient) DeleteMemberExtraByUserIDsAndScopeIDs(scopeType apistructs.ScopeType, scopeIDs []int64, userIDs []string) error
DeleteMemberExtraByUserIDsAndScopeIDs 根据userID和多个scopeID删除成员关联关系
func (*DBClient) DeleteMemberExtraByUxerIDANDResourceValues ¶
func (client *DBClient) DeleteMemberExtraByUxerIDANDResourceValues(userID string, scopeType apistructs.ScopeType, scopeIDs []int64, resourceValues []string) error
DeleteMemberExtraByUxerIDANDResourceValues 根据userID, scope和resourceValues删除成员标签
func (*DBClient) DeleteMembersByOrgAndUsers ¶
DeleteMembersByOrgAndUsers 根据 userIDs 删除成员信息 (用户踢出企业时使用)
func (*DBClient) DeleteMembersByScope ¶
func (client *DBClient) DeleteMembersByScope(scopeType apistructs.ScopeType, scopeID int64) error
DeleteMembersByScope 根据scope删除成员
func (*DBClient) DeleteMembersByScopeAndUsers ¶
func (client *DBClient) DeleteMembersByScopeAndUsers(userIDs []string, scopeType apistructs.ScopeType, scopeID int64) error
DeleteMembersByScopeAndUsers 根据scope & userID删除成员
func (*DBClient) DeleteNotice ¶
DeleteNotice 删除公告
func (*DBClient) DeleteNotify ¶
func (*DBClient) DeleteNotifyGroup ¶
func (*DBClient) DeleteNotifyItem ¶
func (*DBClient) DeleteNotifyRelationsByScope ¶
func (client *DBClient) DeleteNotifyRelationsByScope(scopeType apistructs.ScopeType, scopeID string) error
DeleteNotifyRelationByScope 删除对应关联的通知信息
func (*DBClient) DeleteNotifySource ¶
func (client *DBClient) DeleteNotifySource(request *apistructs.DeleteNotifySourceRequest) error
func (*DBClient) DeleteOrgClusterRelationByCluster ¶
DeleteOrgClusterRelationByCluster 根据 clusterName 删除企业集群关联关系
func (*DBClient) DeleteOrgClusterRelationByClusterAndOrg ¶
func (client *DBClient) DeleteOrgClusterRelationByClusterAndOrg(clusterName string, orgID int64) error
DeleteOrgClusterRelationByClusterAndOrg 根据 clusterName、orgID 删除企业集群关联关系
func (*DBClient) DeletePanelByPanelID ¶
func (*DBClient) DeleteProject ¶
DeleteProject 删除项目
func (*DBClient) DeleteProjectAppsMembers ¶
DeleteProjectAppsMembers 删除该用户对应项目下的应用权限
func (*DBClient) DeletePropertyRelationByIssueID ¶
func (*DBClient) DeletePropertyRelationsByPropertyID ¶
func (*DBClient) DeletePublisher ¶
DeletePublisher 删除Publisher
func (*DBClient) DeleteStoppedContainersByPeriod ¶
func (client *DBClient) DeleteStoppedContainersByPeriod(ctx context.Context, period time.Duration) error
DeleteStoppedContainersByPeriod 删除指定时间前,且已经停止的 containers
func (*DBClient) DeleteTicket ¶
DeleteTicket 删除工单
func (*DBClient) FindIssueStream ¶
func (client *DBClient) FindIssueStream(issueId int) ([]IssueStream, error)
func (*DBClient) FindIterations ¶
func (*DBClient) FuzzyQueryNotifiesBySource ¶
func (client *DBClient) FuzzyQueryNotifiesBySource(req apistructs.FuzzyQueryNotifiesBySourceRequest) ([]*apistructs.NotifyDetail, int, error)
func (*DBClient) GetAbnormalHostsNumberByClusterAndOrg ¶
func (client *DBClient) GetAbnormalHostsNumberByClusterAndOrg(clusterName, orgName string) (uint64, error)
GetAbnormalHostsNumberByClusterAndOrg 根据 clusterName & orgName 获取集群异常主机总数
func (*DBClient) GetAccountByID ¶
func (client *DBClient) GetAccountByID(orgID, accountID int64) (model.CloudAccount, error)
GetAccountByID 根据 ID 获取云账号
func (*DBClient) GetAccountByName ¶
GetAccountByName 根据 OrgID & Name 获取云账号
func (*DBClient) GetAccountsByOrgID ¶
func (client *DBClient) GetAccountsByOrgID(orgID int64) ([]model.CloudAccount, error)
GetAccountsByOrg 根据 OrgID 获取云账号列表
func (*DBClient) GetAccumulateResource ¶
GetAccumulateResource 根据resource(项目、应用、runtime)类型,获取指定集群对应的数量
func (*DBClient) GetActivitiesByRuntime ¶
func (client *DBClient) GetActivitiesByRuntime(runtimeID int64, pageNo, pageSize int) (int, []model.Activity, error)
GetActivitiesByRuntime 根据runtimeID获取活动列表
func (*DBClient) GetAllApps ¶
func (client *DBClient) GetAllApps() ([]model.Application, error)
GetAllApps 获取所有app列表
func (*DBClient) GetAllProjects ¶
GetAllProjects
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) GetAppMembersByUser ¶
func (client *DBClient) GetAppMembersByUser(userID string) ([]model.MemberExtra, error)
GetAppMembersByUser 根据userID查询应用权限
func (*DBClient) GetApplicationByID ¶
func (client *DBClient) GetApplicationByID(applicationID int64) (model.Application, error)
GetApplicationByID 根据applicationID获取应用信息
func (*DBClient) GetApplicationByName ¶
func (client *DBClient) GetApplicationByName(projectID int64, name string) (model.Application, error)
GetApplicationByName 根据projectID & name获取应用
func (*DBClient) GetApplicationByOrgAndName ¶
func (client *DBClient) GetApplicationByOrgAndName(orgID int64, name string) (*model.Application, error)
GetApplicationByOrgAndName 根据orgID & 应用名称获取应用
func (*DBClient) GetApplicationCountByProjectID ¶
GetApplicationCountByProjectID 根据projectID获取应用总数
func (*DBClient) GetApplicationsByIDs ¶
func (client *DBClient) GetApplicationsByIDs(orgID *int64, projectID *int64, applicationIDs []int64, request *apistructs.ApplicationListRequest) ( int, []model.Application, error)
GetApplicationsByIDs 根据applicationIDs & 名称模糊匹配获取应用列表
func (*DBClient) GetApplicationsByProjectID ¶
func (client *DBClient) GetApplicationsByProjectID(projectID, pageNum, pageSize int64) ([]model.Application, error)
GetApplicationsByProjectID 根据projectID获取应用列表
func (*DBClient) GetApplicationsByProjectIDs ¶
func (client *DBClient) GetApplicationsByProjectIDs(projectIDs []uint64) ([]model.Application, error)
GetApplicationsByProjectIDs 根据项目ID列表批量查询应用
func (*DBClient) GetApproveByID ¶
GetApproveByID 根据approveID获取Approve信息
func (*DBClient) GetApproveByOrgAndID ¶
func (client *DBClient) GetApproveByOrgAndID(approveType apistructs.ApproveType, orgID, targetTD, entityID uint64) (*model.Approve, error)
GetApproveByOrgAndName 根据orgID & Approve名称 获取证书信息
func (*DBClient) GetApprovesByOrgIDAndStatus ¶
func (client *DBClient) GetApprovesByOrgIDAndStatus(params *apistructs.ApproveListRequest) ( int, []model.Approve, error)
GetApprovesByOrgIDAndStatus 根据orgID与审批状态获取Approve列表
func (*DBClient) GetAuditCleanCron ¶
GetAuditCleanCron 获取企业事件清理周期
func (*DBClient) GetAuditSettings ¶
func (client *DBClient) GetAuditSettings() ([]model.AuditSettings, error)
GetAuditSettings 从 dice_org 获取审计事件清理周期
func (*DBClient) GetAuditsByParam ¶
func (client *DBClient) GetAuditsByParam(param *apistructs.AuditsListRequest) (int, []model.Audit, error)
GetAuditsByParam 通过参数查询成员
func (*DBClient) GetAuthorityByUserId ¶
func (client *DBClient) GetAuthorityByUserId(param *apistructs.GetAuthorityByUserIdRequest) (apistructs.GetAuthorityByUserIdResponse, error)
func (*DBClient) GetBatchUpdateIssues ¶
func (client *DBClient) GetBatchUpdateIssues(req *apistructs.IssueBatchUpdateRequest) ([]Issue, error)
GetBatchUpdateIssues 获取待批量更新记录,生成活动记录
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) GetClosedBugState ¶
func (client *DBClient) GetClosedBugState(projectID int64) ([]IssueState, error)
GetClosedBugState 获取一个项目下已关闭的bug状态id
func (*DBClient) GetCluster ¶
GetCluster 获取集群详情
func (*DBClient) GetClusterByName ¶
GetClusterByName 根据集群名称获取集群详情
func (*DBClient) GetClusterOpenTicketsNum ¶
func (client *DBClient) GetClusterOpenTicketsNum(ticketType, targetType, targetID string) (uint64, error)
GetClusterOpenTicketsNum 获取指定集群open状态的工单总数
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) GetContainerByTaskIDOrContainerID ¶
func (client *DBClient) GetContainerByTaskIDOrContainerID(cluster, taskID, containerID string) ([]model.Container, error)
GetContainerByTaskIDOrContainerID 根据 taskID 或 containerID 获取实例列表
- scheduler事件暂时只有taskID(marathon集群唯一, k8s集群为podID)
- telegraf推送事件taskID & containerID都不为空
func (*DBClient) GetCountByCertificateID ¶
GetCountByCertificateID 根据certificateID获取引用总数
func (*DBClient) GetCurrentOrgByUser ¶
GetCurrentOrgByUser 根据userID获取当前所属企业ID
func (*DBClient) GetDeployment ¶
func (client *DBClient) GetDeployment(orgID string, taskID uint64) []model.Deployments
GetDeployment 获取部署信息
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) GetErrorLogByDedupIndex ¶
func (client *DBClient) GetErrorLogByDedupIndex(resourceID string, resourceType apistructs.ErrorResourceType, dedupID string) (*model.ErrorLog, error)
GetErrorLogByDedupIndex 根据唯一索引获取错误日志记录
func (*DBClient) GetFavoritedResource ¶
func (client *DBClient) GetFavoritedResource(target string, targetID uint64, userID string) (*model.FavoritedResource, error)
GetFavoritedResource 查询收藏关系
func (*DBClient) GetFavoritedResourcesByUser ¶
func (client *DBClient) GetFavoritedResourcesByUser(target, userID string) ([]model.FavoritedResource, error)
GetFavoritedResourcesByUser 查询收藏关系
func (*DBClient) GetHostByClusterAndIP ¶
GetHostByClusterAndIP 根据 cluster & privateAddr获取主机信息
func (*DBClient) GetHostsByCluster ¶
GetHostsByCluster 根据 clusterName获取主机列表
func (*DBClient) GetHostsByClusterAndNullOrg ¶
GetHostsByClusterAndNullOrg 为兼容dcos 有些机器未加 org 标
func (*DBClient) GetHostsByClusterAndOrg ¶
GetHostsByClusterAndOrg 根据 clusterName & orgName 获取主机列表
func (*DBClient) GetHostsNumber ¶
GetHostsNumber 查询host数量
func (*DBClient) GetHostsNumberByClusterAndOrg ¶
GetHostsNumberByClusterAndOrg 根据 clusterName & orgName 获取集群主机总数
func (*DBClient) GetIssueBugByRange ¶
func (client *DBClient) GetIssueBugByRange(req apistructs.IssuesStageRequest) ([]Issue, float32, error)
GetIssueByRange 通过迭代或项目获取issue Bug
func (*DBClient) GetIssueByIssueIDs ¶
GetIssueByIssueIDs 通过issueid获取issue
func (*DBClient) GetIssueByState ¶
GetIssueByState 通过状态获取issue
func (*DBClient) GetIssueManHourSum ¶
func (client *DBClient) GetIssueManHourSum(req apistructs.IssuesStageRequest) (apistructs.IssueManHourSumResponse, error)
GetIssueManHourSum 事件下所有的任务总和
func (*DBClient) GetIssueProperties ¶
func (client *DBClient) GetIssueProperties(req apistructs.IssuePropertiesGetRequest) ([]IssueProperty, error)
func (*DBClient) GetIssuePropertiesByRelation ¶
func (client *DBClient) GetIssuePropertiesByRelation(ID int64) (*IssueProperty, error)
func (*DBClient) GetIssuePropertiesByTime ¶
func (client *DBClient) GetIssuePropertiesByTime(orgID int64) ([]IssueProperty, error)
func (*DBClient) GetIssuePropertyByID ¶
func (client *DBClient) GetIssuePropertyByID(id int64) (*IssueProperty, error)
func (*DBClient) GetIssuePropertyByName ¶
func (client *DBClient) GetIssuePropertyByName(orgID int64, Name string, PropertyIssueType apistructs.PropertyIssueType) (*IssueProperty, error)
GetIssuePropertyByName 根据 name 获取 property 信息
func (*DBClient) GetIssuePropertyValue ¶
func (client *DBClient) GetIssuePropertyValue(id int64) (*IssuePropertyValue, error)
func (*DBClient) GetIssuePropertyValues ¶
func (client *DBClient) GetIssuePropertyValues(orgID int64) ([]IssuePropertyValue, error)
func (*DBClient) GetIssueRelationsByIDs ¶
func (client *DBClient) GetIssueRelationsByIDs(issueIDs []uint64) ([]IssueRelation, error)
func (*DBClient) GetIssueStateByID ¶
func (client *DBClient) GetIssueStateByID(ID int64) (*IssueState, error)
func (*DBClient) GetIssueStateByIDs ¶
func (client *DBClient) GetIssueStateByIDs(ID []int64) ([]IssueState, error)
func (*DBClient) GetIssueStatePermission ¶
func (*DBClient) GetIssueSummary ¶
func (client *DBClient) GetIssueSummary(iterationID int64, task, bug, requirement []int64) apistructs.ISummary
GetIssueSummary 获取迭代相关的issue统计信息
func (*DBClient) GetIssueWithOutDelete ¶
GetIssue 查询事件
func (*DBClient) GetIssuesStage ¶
func (client *DBClient) GetIssuesStage(orgID int64, issueType apistructs.IssueType) ([]IssueStage, error)
func (*DBClient) GetIssuesStageByOrgID ¶ added in v1.0.0
func (client *DBClient) GetIssuesStageByOrgID(orgID int64) ([]IssueStage, error)
GetIssuesStageByOrgID get issuesStage by orgID
func (*DBClient) GetIssuesStateRelations ¶
func (client *DBClient) GetIssuesStateRelations(projectID uint64, issueType apistructs.IssueType) ([]IssueStateJoinSQL, error)
func (*DBClient) GetIssuesStatesByProjectID ¶
func (client *DBClient) GetIssuesStatesByProjectID(projectID uint64, issueType apistructs.IssueType) ([]IssueState, error)
func (*DBClient) GetIssuesStatesByProjectIDList ¶
func (client *DBClient) GetIssuesStatesByProjectIDList(projectIDList []uint64) ([]IssueState, error)
get all state by projectID list
func (*DBClient) GetIteration ¶
GetIteration Iteration 详情
func (*DBClient) GetIterationByTitle ¶
GetIterationByTitle 根据 title 获取 Iteration 信息
func (*DBClient) GetJoinedAppNumByUserId ¶
get joined apps num by user and org
func (*DBClient) GetJoinedProjectNumByUserID ¶
func (client *DBClient) GetJoinedProjectNumByUserID(userID string, orgID string) (int, []string, error)
get projects by userID and orgID
func (*DBClient) GetLabelByName ¶
GetLabelByName 根据 name 获取标签详情
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 uint64) ([]LabelRelation, error)
GetLabelRelationsByRef 获取标签关联关系列表
func (*DBClient) GetLastCommentByTicket ¶
GetLastCommentByTicket 根据 ticketID 获取最新评论
func (*DBClient) GetLibReference ¶
func (client *DBClient) GetLibReference(libReferenceID uint64) (*LibReference, error)
GetLibReference 库引用详情
func (*DBClient) GetMBoxStats ¶
func (client *DBClient) GetMBoxStats(orgID int64, userID string) (*apistructs.QueryMBoxStatsData, error)
func (*DBClient) GetManagerMemberCountByUserID ¶
func (client *DBClient) GetManagerMemberCountByUserID(userIDs []string, scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
GetManagerMemberCountByUserID 获取某个用户的企业/项目/应用管理员数量
func (*DBClient) GetManagerMembersCount ¶
func (client *DBClient) GetManagerMembersCount(scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
GetManagerMembersCount 根据scopeID获取企业/项目/应用管理员的数量,todo delete
func (*DBClient) GetMeberExtraByParentID ¶
func (client *DBClient) GetMeberExtraByParentID(userIDs []string, scopeType apistructs.ScopeType, parentID int64) ([]model.MemberExtra, error)
GetMeberExtraByParentID 通过父scope获取成员extra
func (*DBClient) GetMeberRoleByParentID ¶
func (client *DBClient) GetMeberRoleByParentID(userID string, scopeType apistructs.ScopeType, parentID int64) ([]model.MemberExtra, error)
GetMeberRoleByParentID 通过父scope获取成员extra
func (*DBClient) GetMemberByID ¶
GetMemberByID 根据memberID获取成员
func (*DBClient) GetMemberByIDs ¶
GetMemberByIDs 根据memberID列表获取成员列表
func (*DBClient) GetMemberByScopeAndRole ¶
func (client *DBClient) GetMemberByScopeAndRole(scopeType apistructs.ScopeType, scopeIDs []uint64, roles []string) ([]model.MemberExtra, error)
GetMemberByScopeAndRole 根据Scope和角色获取成员
func (*DBClient) GetMemberByScopeAndUserID ¶
func (client *DBClient) GetMemberByScopeAndUserID(userID string, scopeType apistructs.ScopeType, scopeID int64) ([]model.MemberJoin, error)
GetMemberByScopeAndUserID 根据scope & userID过滤
func (*DBClient) GetMemberByToken ¶
GetMemberByToken 根据token获取成员
func (*DBClient) GetMemberByUserID ¶
GetMemberByUserID 通过 user_id 获取成员
func (*DBClient) GetMemberByUserIDAndScopeIDs ¶
func (client *DBClient) GetMemberByUserIDAndScopeIDs(userID string, scopeType apistructs.ScopeType, scopeIDs []int64) ([]model.Member, error)
GetMemberByUserIDAndScopeIDs 通过 user_id 和 scopeIDs 信息获取成员
func (*DBClient) GetMemberByUserIDsAndScope ¶
func (client *DBClient) GetMemberByUserIDsAndScope(userIDs []string, scopeType apistructs.ScopeType, scopeID int64) ([]model.Member, error)
GetMemberByUserIDsAndScope 通过 user_id 和 scope 信息获取成员
func (*DBClient) GetMemberExtra ¶
func (client *DBClient) GetMemberExtra(userIDs []string, scopeType apistructs.ScopeType, scopeID int64, resourceKey []apistructs.ExtraResourceKey) ([]model.MemberExtra, error)
GetMemberExtra 根据UserID, Scope和resourceKey获取成员关联关系
func (*DBClient) GetMemberExtraByIDs ¶
func (client *DBClient) GetMemberExtraByIDs(userIDs []string, scopeType apistructs.ScopeType, scopeIDs []int64, resourceKey []apistructs.ExtraResourceKey) ([]model.MemberExtra, error)
GetMemberExtraByIDs 根据多个userid和scopeid查询memberextra
func (*DBClient) GetMembersByOrgAndUser ¶
func (client *DBClient) GetMembersByOrgAndUser(orgID int64, userID string) ([]model.MemberJoin, error)
GetMembersByOrgAndUser 根据userID查询成员
func (*DBClient) GetMembersByParam ¶
func (client *DBClient) GetMembersByParam(param *apistructs.MemberListRequest) ( int, []model.Member, error)
GetMembersByParam 根据查询参数获取企业成员列表
func (*DBClient) GetMembersByParentID ¶
func (client *DBClient) GetMembersByParentID(scopeType apistructs.ScopeType, parentID int64, userID string) ( []model.MemberJoin, error)
GetMembersByParentID 根据parentID & userID等信息查询权限
func (*DBClient) GetMembersByScope ¶
func (client *DBClient) GetMembersByScope(scopeType apistructs.ScopeType, scopeIDs []string, roles []string) ([]model.Member, error)
GetMembersByScope 查询指定scope和role的用户,todo delete
func (*DBClient) GetMembersByScopeType ¶
func (client *DBClient) GetMembersByScopeType(scopeType apistructs.ScopeType) ([]model.Member, error)
GetMembersByScopeType 根据scopeType获取所有对应的成员列表,todo delete
func (*DBClient) GetMembersByScopeTypeAndUser ¶
func (client *DBClient) GetMembersByScopeTypeAndUser(scopeType apistructs.ScopeType, userID string) ([]model.Member, error)
GetMembersByScopeTypeAndUser 根据scopeType & user获取成员
func (*DBClient) GetMembersWithoutExtraByScope ¶
func (client *DBClient) GetMembersWithoutExtraByScope(scopeType apistructs.ScopeType, scopeID int64) ( int, []model.Member, error)
GetMembersWithoutExtraByParentID 根据parentID 信息查询成员,不带角色label等信息
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) GetNotifyByGroupID ¶
func (*DBClient) GetNotifyDetail ¶
func (client *DBClient) GetNotifyDetail(id int64, orgID int64) (*apistructs.NotifyDetail, error)
func (*DBClient) GetNotifyGroupByID ¶
func (client *DBClient) GetNotifyGroupByID(id int64, orgID int64) (*apistructs.NotifyGroup, error)
GetNotifyGroupByID 获取通知组
func (*DBClient) GetNotifyGroupByIDWithoutOrgID ¶
func (client *DBClient) GetNotifyGroupByIDWithoutOrgID(id int64) (*apistructs.NotifyGroup, error)
GetNotifyGroupByIDWithoutOrgID 直接通过ID获取通知组
func (*DBClient) GetNotifyGroupNameByID ¶
func (client *DBClient) GetNotifyGroupNameByID(id int64, orgID int64) (*apistructs.NotifyGroup, error)
func (*DBClient) GetNotifyItemsByNotifyID ¶
func (client *DBClient) GetNotifyItemsByNotifyID(notifyID int64) ([]*apistructs.NotifyItem, error)
func (*DBClient) GetNotifyItemsByNotifyIDAndItemName ¶
func (client *DBClient) GetNotifyItemsByNotifyIDAndItemName(notifyID int64, itemName string) ([]*apistructs.NotifyItem, error)
func (*DBClient) GetNotifySourcesByNotifyID ¶
func (client *DBClient) GetNotifySourcesByNotifyID(notifyID int64) ([]*apistructs.NotifySource, error)
func (*DBClient) GetOpenTicketByKey ¶
GetOpenTicketByKey 获取open状态的工单
func (*DBClient) GetOperatorByTaskID ¶
func (client *DBClient) GetOperatorByTaskID(taskID []int) ([]model.ReviewUser, error)
func (*DBClient) GetOrgByName ¶
GetOrgByName 根据 orgName 获取企业信息
func (*DBClient) GetOrgByUserIDs ¶
GetOrgByUserIDs 根据用户id获取对应的企业
func (*DBClient) GetOrgClusterRelationByOrgAndCluster ¶
func (client *DBClient) GetOrgClusterRelationByOrgAndCluster(orgID, clusterID int64) (*model.OrgClusterRelation, error)
GetOrgClusterRelationByOrgAndCluster 获取企业集群关系
func (*DBClient) GetOrgClusterRelationsByOrg ¶
func (client *DBClient) GetOrgClusterRelationsByOrg(orgID int64) ([]model.OrgClusterRelation, error)
GetOrgClusterRelationsByOrg 根据 orgID 获取企业对应集群关系
func (*DBClient) GetOrgList ¶
GetOrgList 获取所有企业列表(仅供内部用户使用)
func (*DBClient) GetOrgPublishersCount ¶
GetPublishersByIDs 获取企业的Publisher个数
func (*DBClient) GetOrgsByIDsAndName ¶
func (client *DBClient) GetOrgsByIDsAndName(orgIDs []int64, name string, pageNo, pageSize int) ( int, []model.Org, error)
GetOrgsByIDsAndName 根据企业ID列表 & 企业名称获取企业列表
func (*DBClient) GetOrgsByParam ¶
func (client *DBClient) GetOrgsByParam(name string, pageNum, pageSize int) (int, []model.Org, error)
GetOrgsByParam 获取企业列表
func (*DBClient) GetOrgsByUserID ¶
GetOrgsByUserID 根据userID获取企业列表
func (*DBClient) GetOwnerMemberCountByUserID ¶
func (client *DBClient) GetOwnerMemberCountByUserID(userIDs []string, scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
GetOwnerMembersCountByUserID 获取某个用户的项目/应用所有者的数量
func (*DBClient) GetOwnerMembersCount ¶
func (client *DBClient) GetOwnerMembersCount(scopeID int64, scopeType apistructs.ScopeType) (uint64, error)
GetOwnerMembersCount 根据scopeID获取项目/应用所有者的数量
func (*DBClient) GetPanelByIssueID ¶
func (client *DBClient) GetPanelByIssueID(issueID int64) (*IssuePanel, error)
查询事件所属的看板
func (*DBClient) GetPanelByPanelID ¶
func (client *DBClient) GetPanelByPanelID(panelID int64) (*IssuePanel, error)
通过看板ID获取看板详情
func (*DBClient) GetPanelIssuesByPanel ¶
func (client *DBClient) GetPanelIssuesByPanel(panelID int64, pageNo, pageSize uint64) ([]IssuePanel, uint64, error)
通过PanelID获取看板下的全部issue
func (*DBClient) GetPanelIssuesID ¶
获取一个项目的一个看板中的事件ID
func (*DBClient) GetPanelIssuesIDByProjectID ¶
func (client *DBClient) GetPanelIssuesIDByProjectID(projectID uint64) ([]IssuePanel, error)
获取一个项目的全部自定义看板中的事件ID
func (*DBClient) GetPanelsByProjectID ¶
func (client *DBClient) GetPanelsByProjectID(projectID uint64) ([]IssuePanel, error)
获取项目下自定义看板的ID
func (*DBClient) GetPermissionList ¶
func (client *DBClient) GetPermissionList(roles []string) ([]model.RolePermission, []model.RolePermission)
GetPermissionList 获取角色权限列表
func (*DBClient) GetProjectApplications ¶
func (client *DBClient) GetProjectApplications(projectID int64) ([]model.Application, error)
GetProjectApplications 根据projectID获取所有应用列表
func (*DBClient) GetProjectByID ¶
GetProjectByID 根据projectID获取项目信息
func (*DBClient) GetProjectByOrgAndName ¶
GetProjectByOrgAndName 根据orgID & 项目名称 获取项目
func (*DBClient) GetProjectIDListByStates ¶
func (client *DBClient) GetProjectIDListByStates(req apistructs.IssuePagingRequest, projectIDList []uint64) (int, []model.Project, error)
get states by projectID list
func (*DBClient) GetProjectMembersByUser ¶
func (client *DBClient) GetProjectMembersByUser(userID string) ([]model.MemberExtra, error)
GetProjectMembersByUser 根据userID查询项目权限,todo delete
func (*DBClient) GetProjectsByIDs ¶
func (client *DBClient) GetProjectsByIDs(projectIDs []uint64, params *apistructs.ProjectListRequest) ( int, []model.Project, error)
GetProjectsByIDs 根据projectIDs获取项目列表
func (*DBClient) GetProjectsByOrgIDAndName ¶
func (client *DBClient) GetProjectsByOrgIDAndName(orgID int64, params *apistructs.ProjectListRequest) ( int, []model.Project, error)
GetProjectsByOrgIDAndName 根据orgID与名称获取项目列表
func (*DBClient) GetPropertyRelationByID ¶
func (client *DBClient) GetPropertyRelationByID(issueID int64) ([]IssuePropertyRelation, error)
func (*DBClient) GetPropertyRelationByIssueID ¶
func (client *DBClient) GetPropertyRelationByIssueID(issueID int64, propertyID int64) (*IssuePropertyRelation, error)
func (*DBClient) GetPropertyRelationByPropertyID ¶
func (client *DBClient) GetPropertyRelationByPropertyID(propertyID int64) (*IssuePropertyRelation, error)
func (*DBClient) GetPublicOrgsByParam ¶
func (client *DBClient) GetPublicOrgsByParam(name string, pageNum, pageSize int) (int, []model.Org, error)
Get public orgs list
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) GetRelatedIssues ¶
GetRelatedIssues 获取该事件被哪些事件关联了
func (*DBClient) GetRelatingIssues ¶
GetRelatingIssues 获取该事件关联了哪些事件
func (*DBClient) GetReviewByTaskId ¶
func (client *DBClient) GetReviewByTaskId(param *apistructs.GetReviewByTaskIdIdRequest) (apistructs.GetReviewByTaskIdIdResponse, error)
func (*DBClient) GetReviewsBySponsorId ¶
func (client *DBClient) GetReviewsBySponsorId(param *apistructs.GetReviewsBySponsorIdRequest) (int, []model.ManualReview, error)
func (*DBClient) GetReviewsByUserId ¶
func (client *DBClient) GetReviewsByUserId(param *apistructs.GetReviewsByUserIdRequest, tasks []int64) (int, []model.ManualReview, error)
func (*DBClient) GetRolePermission ¶
func (client *DBClient) GetRolePermission(roles []string, permissionInfo *apistructs.PermissionCheckRequest) (*model.RolePermission, error)
GetRolePermission 获取角色权限
func (*DBClient) GetRunningAddonByClusterAndInstanceID ¶
func (client *DBClient) GetRunningAddonByClusterAndInstanceID(clusterName, instanceID string) (*[]model.Container, error)
GetRunningAddonByClusterAndInstanceID 根据 clusterName & addon instanceID 获取运行中的addon containers
func (*DBClient) GetRunningComponentContainersByClusterAndComponent ¶
func (client *DBClient) GetRunningComponentContainersByClusterAndComponent(clusterName, componentName string) ([]model.Container, error)
GetRunningComponentContainersByClusterAndComponent 根据 clusterName & component 获取集群内正在运行的平台组件容器
func (*DBClient) GetScopeManagersByScopeID ¶
func (client *DBClient) GetScopeManagersByScopeID(scopeType apistructs.ScopeType, scopeID int64) ([]model.Member, error)
GetScopeManagersByScopeID 根据 scopeID 获取 scope 对应的管理员列表
func (*DBClient) GetScopeNameByScope ¶
func (client *DBClient) GetScopeNameByScope(scopeType apistructs.ScopeType, scopeID int64) string
GetScopeNameByScope 根据scope获取名称
func (*DBClient) GetTaskIDByOperator ¶
func (client *DBClient) GetTaskIDByOperator(param *apistructs.GetReviewsByUserIdRequest) ([]int64, error)
func (*DBClient) GetTicketByRequestID ¶
GetTicketByRequestID 根据requestID header获取记录
func (*DBClient) InitOrgAuditInterval ¶
InitOrgAuditInterval 初始化企业的审计事件清理周期
func (*DBClient) InsertContainer ¶
InsertContainer 新增 container 信息
func (*DBClient) IsSysAdmin ¶
IsSysAdmin 判断用户是否为系统管理员
func (*DBClient) IssueStateCount ¶
func (client *DBClient) IssueStateCount(requirementIDs []int64) ([]apistructs.RequirementGroupResult, error)
IssueStateCount 需求下任务统计
func (*DBClient) IssueStateCount2 ¶
func (client *DBClient) IssueStateCount2(issueIDs []uint64) ([]apistructs.RequirementGroupResult, error)
IssueStateCount2 需求关联的任务状态统计
func (*DBClient) ListAllContainersByService ¶
func (client *DBClient) ListAllContainersByService(runtimeID, serviceName string) ([]model.Container, error)
ListAllContainersByService 根据serviceName 获取所有实例列表(包含运行中、已停止)
func (*DBClient) ListAllOrgClusterRelations ¶
func (client *DBClient) ListAllOrgClusterRelations() ([]model.OrgClusterRelation, error)
ListAllOrgClusterRelations 获取所有企业对应集群关系
func (*DBClient) ListCluster ¶
ListCluster 获取集群列表
func (*DBClient) ListClusterByIDs ¶
ListClusterByIDs 根据集群ID列表获取集群信息
func (*DBClient) ListClusterByNames ¶
ListClusterByNames 根据集群名称列表获取集群信息
func (*DBClient) ListClusterByOrg ¶
ListClusterByOrg 根据 orgID 获取集群信息
func (*DBClient) ListClusterByOrgAndType ¶
func (client *DBClient) ListClusterByOrgAndType(orgID int64, clusterType string) (*[]model.Cluster, error)
ListClusterByOrgAndType 根据 orgID, type 获取集群信息
func (*DBClient) ListClusterRunningContainers ¶
ListClusterRunningContainers 根据clusterName 获取集群运行中实例列表
func (*DBClient) ListContainerByApplication ¶
func (client *DBClient) ListContainerByApplication(appID, orgID string, running bool) ([]model.Container, error)
ListContainerByApplication 根据 appID 获取容器列表
func (*DBClient) ListContainerByCluster ¶
func (client *DBClient) ListContainerByCluster(clusterName, orgID string, running bool) ([]model.Container, error)
ListContainerByCluster 根据 clusterName 获取容器列表
func (*DBClient) ListContainerByHost ¶
func (client *DBClient) ListContainerByHost(clusterName, hostIP string, running bool) ([]model.Container, error)
ListContainerByHost 根据 clusterName & hostIP 获取容器列表
func (*DBClient) ListContainerByOrg ¶
ListByOrg 根据 orgID 获取容器列表
func (*DBClient) ListContainerByProject ¶
func (client *DBClient) ListContainerByProject(projectID, orgID string, running bool) ([]model.Container, error)
ListContainerByProject 根据 projectID 获取容器列表
func (*DBClient) ListContainerByRuntime ¶
func (client *DBClient) ListContainerByRuntime(runtimeID, orgID string, running bool) ([]model.Container, error)
ListContainerByRuntime 根据 runtimeID 获取容器列表
func (*DBClient) ListDeploymentsByOrgID ¶
func (client *DBClient) ListDeploymentsByOrgID(param *apistructs.OrgRunningTasksListRequest, orgID uint64) (int64, *[]model.Deployments, error)
ListDeploymentsByOrgID 获取指定企业的部署列表
func (*DBClient) ListEdasContainerByParam ¶
func (client *DBClient) ListEdasContainerByParam(params *apistructs.EdasContainerListRequest) ([]model.Container, error)
ListEdasContainerByParam 根据 params 过滤出 EDAS 容器列表
func (*DBClient) ListErrorLogByResources ¶
func (client *DBClient) ListErrorLogByResources(resourceTypes []apistructs.ErrorResourceType, resourceIDs []string) ([]model.ErrorLog, error)
ListErrorLogByResources 根据多个resource信息查看错误日志
func (*DBClient) ListErrorLogByResourcesAndStartTime ¶
func (client *DBClient) ListErrorLogByResourcesAndStartTime(resourceTypes []apistructs.ErrorResourceType, resourceIDs []string, startTime time.Time) ([]model.ErrorLog, error)
ListErrorLogByResourcesAndStartTime 根据多个resource信息和开始时间查看错误日志
func (*DBClient) ListExpiredDeployments ¶
func (client *DBClient) ListExpiredDeployments(startTime string) []model.Deployments
ListExpiredDeployments 列出过期的deployment
func (*DBClient) ListExpiredFiles ¶
func (*DBClient) ListExpiredJobs ¶
ListExpiredJobs 列出过期的job
func (*DBClient) ListIssue ¶
func (client *DBClient) ListIssue(req apistructs.IssueListRequest) ([]Issue, error)
ListIssue 查询事件列表
func (*DBClient) ListIssueByIDs ¶
func (*DBClient) ListIssueTestCaseRelations ¶
func (client *DBClient) ListIssueTestCaseRelations(req apistructs.IssueTestCaseRelationsListRequest) ([]IssueTestCaseRelation, error)
ListIssueTestCaseRelations 查询事件用例关联关系列表
func (*DBClient) ListJobsByOrgID ¶
func (client *DBClient) ListJobsByOrgID(param *apistructs.OrgRunningTasksListRequest, orgID uint64) (int64, *[]model.Jobs, error)
ListJobsByOrgID 获取指定企业的job列表
func (*DBClient) ListLabel ¶
func (client *DBClient) ListLabel(req *apistructs.ProjectLabelListRequest) (int64, []Label, error)
ListLabel 获取标签列表
func (*DBClient) ListLabelByNames ¶
ListLabelByNames 根据 name 列表获取标签列表
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) ListNexusRepositories ¶
func (client *DBClient) ListNexusRepositories(req apistructs.NexusRepositoryListRequest) ([]*NexusRepository, error)
func (*DBClient) ListNexusUsers ¶
func (client *DBClient) ListNexusUsers(req apistructs.NexusUserListRequest) ([]NexusUser, error)
func (*DBClient) ListNotice ¶
func (client *DBClient) ListNotice(req *apistructs.NoticeListRequest) (uint64, []Notice, error)
ListNotice 公告列表
func (*DBClient) ListProjectByCluster ¶
ListProjectByCluster 根据clusterName 获取项目列表
func (*DBClient) ListProjectByOrgID ¶
ListProjectByOrgID 根据 orgID 获取项目列表
func (*DBClient) ListRunningAddonsByCluster ¶
ListRunningAddonsByCluster 根据 clusterName 获取集群中正在运行的 addon containers
func (*DBClient) ListRunningComponentContainerByCluster ¶
func (client *DBClient) ListRunningComponentContainerByCluster(clusterName string) ([]model.Container, error)
ListRunningComponentContainerByCluster 根据 clusterName 获取集群内正在运行的平台组件容器
func (*DBClient) ListRunningContainersByHost ¶
func (client *DBClient) ListRunningContainersByHost(clusterName, hostIP string) ([]model.Container, error)
ListRunningContainersByHost 根据 cluster & hostIP 获取运行中容器列表
func (*DBClient) ListRunningContainersByService ¶
func (client *DBClient) ListRunningContainersByService(runtimeID, serviceName string) ([]model.Container, error)
ListRunningByService 根据serviceName 获取运行中实例列表
func (*DBClient) ListRunningDeployments ¶
func (client *DBClient) ListRunningDeployments() []model.Deployments
ListRunningDeployments 列出正在运行的deployment
func (*DBClient) ListRunningJobs ¶
ListRunningJobs 列出正在运行的job
func (*DBClient) ListRunningProjectContainersByCluster ¶
func (client *DBClient) ListRunningProjectContainersByCluster(clusterName, orgID string) ([]model.Container, error)
ListRunningProjectContainersByCluster 根据 clusterName 获取集群内正在运行的 containers
func (*DBClient) ListStoppedContainersByService ¶
func (client *DBClient) ListStoppedContainersByService(runtimeID, serviceName string) ([]model.Container, error)
ListStoppedByService 根据serviceName 获取已停止实例列表
func (*DBClient) ListUnblockApplicationApprove ¶
func (*DBClient) PageMeberRoleByParentID ¶
func (client *DBClient) PageMeberRoleByParentID(req apistructs.ListMemberRolesByUserRequest) (int, []model.Member, error)
PageMeberRoleByParentID 通过用户和父scope分页查询成员角色
func (*DBClient) PagingIssueStream ¶
func (client *DBClient) PagingIssueStream(req *apistructs.IssueStreamPagingRequest) (int64, []IssueStream, error)
PagingIssueStream issue 分页查询事件流
func (*DBClient) PagingIssues ¶
func (client *DBClient) PagingIssues(req apistructs.IssuePagingRequest, queryIDs bool) ([]Issue, uint64, error)
PagingIssues 分页查询issue queryIDs = true 表示不管req.IDs是否为空都要根据ID查询
func (*DBClient) PagingIterations ¶
func (client *DBClient) PagingIterations(req apistructs.IterationPagingRequest) ([]Iteration, uint64, error)
Iteration 分页查询
func (*DBClient) PagingPropertyRelationByIDs ¶
func (client *DBClient) PagingPropertyRelationByIDs(issueID []int64) ([]IssuePropertyRelation, error)
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) QueryContainer ¶
func (client *DBClient) QueryContainer(ctx context.Context, cluster string, id string) (*types.CmContainer, error)
QueryContainer 获取单个容器信息
func (*DBClient) QueryContainerByTaskIDOrContainerID ¶
func (client *DBClient) QueryContainerByTaskIDOrContainerID(ctx context.Context, cluster string, taskID string, containerID string) ([]types.CmContainer, error)
QueryContainerByTaskIDOrContainerID 根据 taskID 或者 containerID 查询 container 信息
func (*DBClient) QueryMBox ¶
func (client *DBClient) QueryMBox(request *apistructs.QueryMBoxRequest) (*apistructs.QueryMBoxData, error)
func (*DBClient) QueryNotifies ¶
func (client *DBClient) QueryNotifies(request *apistructs.QueryNotifyRequest) (*apistructs.QueryNotifyData, error)
func (*DBClient) QueryNotifiesBySource ¶
func (client *DBClient) QueryNotifiesBySource(sourceType, sourceID, itemName string, orgID int64, clusterName string, label string) ([]*apistructs.NotifyDetail, error)
func (*DBClient) QueryNotifyGroup ¶
func (client *DBClient) QueryNotifyGroup(request *apistructs.QueryNotifyGroupRequest, orgID int64) (*apistructs.QueryNotifyGroupData, error)
QueryNotifyGroup 查询通知组
func (*DBClient) QueryNotifyHistories ¶
func (client *DBClient) QueryNotifyHistories(request *apistructs.QueryNotifyHistoryRequest) (*apistructs.QueryNotifyHistoryData, error)
func (*DBClient) QueryNotifyItems ¶
func (client *DBClient) QueryNotifyItems(request *apistructs.QueryNotifyItemRequest) (*apistructs.QueryNotifyItemData, error)
func (*DBClient) QuerytNotifyItemsByNotifyIDAndItemName ¶
func (client *DBClient) QuerytNotifyItemsByNotifyIDAndItemName(notifyID int64, itemName string) ([]*apistructs.NotifyItem, error)
func (*DBClient) QuoteCertificate ¶
func (client *DBClient) QuoteCertificate(certificate *model.AppCertificate) error
QuoteCertificate 创建应用Certificate
func (*DBClient) RemovePublishItemRelations ¶
func (client *DBClient) RemovePublishItemRelations(request *apistructs.RemoveAppPublishItemRelationsRequest) error
func (*DBClient) SetMBoxReadStatus ¶
func (client *DBClient) SetMBoxReadStatus(request *apistructs.SetMBoxReadStatusRequest) error
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) UpdateAccount ¶
func (client *DBClient) UpdateAccount(account *model.CloudAccount) error
UpdateCloudAccount 更新云账号
func (*DBClient) UpdateAppPublishItemRelations ¶
func (client *DBClient) UpdateAppPublishItemRelations(request *apistructs.UpdateAppPublishItemRelationRequest) error
func (*DBClient) UpdateApplication ¶
func (client *DBClient) UpdateApplication(application *model.Application) error
UpdateApplication 更新应用
func (*DBClient) UpdateApproval ¶
func (client *DBClient) UpdateApproval(param *apistructs.UpdateApproval) error
func (*DBClient) UpdateApprovalStatusByApprovalID ¶
func (client *DBClient) UpdateApprovalStatusByApprovalID(approvalID uint64, status apistructs.ApprovalStatus) error
UpdateApprovalStatusByApprovalID 更新审批流状态
func (*DBClient) UpdateApprove ¶
UpdateApprove 更新Approve
func (*DBClient) UpdateAuditCleanCron ¶
UpdateAuditCleanCron 修改企业事件清理周期
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) UpdateCluster ¶
UpdateCluster 更新集群
func (*DBClient) UpdateComment ¶
UpdateComment 更新工单评论
func (*DBClient) UpdateContainer ¶
UpdateContainer 更新容器
func (*DBClient) UpdateContainerByPrimaryKeyID ¶
func (client *DBClient) UpdateContainerByPrimaryKeyID(ctx context.Context, c *types.CmContainer) error
TODO 以下皆须重构 UpdateContainerByPrimaryKeyID 根据主键进行更新
func (*DBClient) UpdateContainerByTaskIDOrContainerID ¶
func (client *DBClient) UpdateContainerByTaskIDOrContainerID(ctx context.Context, c *types.CmContainer) error
UpdateContainerByTaskIDOrContainerID 根据 taskID 或者 contianerID 来更新 container 信息
func (*DBClient) UpdateCurrentOrg ¶
UpdateCurrentOrg 更新用户当前所属企业
func (*DBClient) UpdateDeploymentStatus ¶
func (client *DBClient) UpdateDeploymentStatus(deployment *model.Deployments) error
UpdateDeploymentStatus 更新deployment状态
func (*DBClient) UpdateErrorLog ¶
UpdateErrorLog 更新错误日志记录
func (*DBClient) UpdateHost ¶
UpdateHost 更新host
func (*DBClient) UpdateIssue ¶
Issue 更新
func (*DBClient) UpdateIssuePropertiesIndex ¶
func (client *DBClient) UpdateIssuePropertiesIndex(properties []IssueProperty) error
func (*DBClient) UpdateIssueProperty ¶
func (client *DBClient) UpdateIssueProperty(property *IssueProperty) error
func (*DBClient) UpdateIssuePropertyValue ¶
func (client *DBClient) UpdateIssuePropertyValue(property *IssuePropertyValue) error
func (*DBClient) UpdateIssueState ¶
func (client *DBClient) UpdateIssueState(state *IssueState) error
func (*DBClient) UpdateIssueStateRelations ¶
func (client *DBClient) UpdateIssueStateRelations(projectID int64, issueType apistructs.IssueType, StateRelations []IssueStateRelation) error
func (*DBClient) UpdateIssueStream ¶
func (client *DBClient) UpdateIssueStream(is *IssueStream) error
UpdateIssueStream 更新 issue 事件流
func (*DBClient) UpdateIssueType ¶
UpdateIssueType 转换issueType
func (*DBClient) UpdateIssues ¶
UpdateIssues 批量更新 issue
func (*DBClient) UpdateIssuesStateBelong ¶
func (client *DBClient) UpdateIssuesStateBelong(id int64, belong apistructs.IssueStateBelong) error
func (*DBClient) UpdateIssuesStateIndex ¶
func (*DBClient) UpdateIteration ¶
Iteration 更新
func (*DBClient) UpdateJobStatus ¶
UpdateJobStatus 更新Job状态
func (*DBClient) UpdateLabel ¶
UpdateLabel 更新 label
func (*DBClient) UpdateMember ¶
UpdateMember 更新成员
func (*DBClient) UpdateMemberUserInfo ¶
UpdateMemberUserInfo 更新成员 userinfo 信息
func (*DBClient) UpdateNotice ¶
UpdateNotice 编辑公告
func (*DBClient) UpdateNotify ¶
func (client *DBClient) UpdateNotify(request *apistructs.UpdateNotifyRequest) error
func (*DBClient) UpdateNotifyEnable ¶
func (*DBClient) UpdateNotifyGroup ¶
func (client *DBClient) UpdateNotifyGroup(request *apistructs.UpdateNotifyGroupRequest) error
UpdateNotifyGroup 更新通知组
func (*DBClient) UpdateNotifyItem ¶
func (client *DBClient) UpdateNotifyItem(request *apistructs.UpdateNotifyItemRequest) error
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) UpdatePanel ¶
func (client *DBClient) UpdatePanel(panel *IssuePanel) error
func (*DBClient) UpdateProject ¶
UpdateProject 更新项目
func (*DBClient) UpdateProjectQuota ¶
func (client *DBClient) UpdateProjectQuota(clusterName string, cpuOverSellChangeRatio float64) error
UpdateProjectQuota 更新项目配额
func (*DBClient) UpdatePropertyRelationArbitraryValue ¶
func (*DBClient) UpdatePublisher ¶
UpdatePublisher 更新Publisher
func (*DBClient) UpdateQuoteCertificate ¶
func (client *DBClient) UpdateQuoteCertificate(certificate *model.AppCertificate) error
UpdateCertificate 更新Certificate
type File ¶
type File struct {
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 // 文件超时自动删除
}
File
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 Int64Slice ¶
type Int64Slice []int64
自定义 interface{},用于实现 []int64 的排序
func SortInt64Map ¶
func SortInt64Map(m map[int64]int64) Int64Slice
func (Int64Slice) Len ¶
func (c Int64Slice) Len() int
func (Int64Slice) Less ¶
func (c Int64Slice) Less(i, j int) bool
func (Int64Slice) Swap ¶
func (c Int64Slice) Swap(i, j int)
type Issue ¶
type Issue struct {
BaseModel
PlanStartedAt *time.Time // 计划开始时间
PlanFinishedAt *time.Time // 计划结束时间
ProjectID uint64 // 所属项目 ID
IterationID int64 // 所属迭代 ID
AppID *uint64 // 所属应用 ID
RequirementID *int64 // 所属需求 ID
Type apistructs.IssueType // issue 类型
Title string // 标题
Content string // 内容
State int64 // 状态
Priority apistructs.IssuePriority // 优先级
Complexity apistructs.IssueComplexity // 复杂度
Severity apistructs.IssueSeverity // 严重程度
Creator string // issue 创建者 ID
Assignee string // 分配到 issue 的人,即当前处理人
Source string // issue创建的来源,目前只有工单使用
ManHour string // 工时信息
External bool // 用来区分是通过ui还是bundle创建的
Deleted bool // 是否已删除
Stage string // bug阶段 or 任务类型 的值
Owner string // 负责人
FinishTime *time.Time // 实际结束时间
}
Issue
func (*Issue) GetCanUpdateFields ¶
GetCanUpdateFields 获取所有可以被主动更新的字段
type IssueAppRelation ¶
IssueAppRelation 事件应用关联
type IssuePanel ¶
type IssuePanel struct {
BaseModel
ProjectID uint64 `gorm:"column:project_id"`
IssueID int64 `gorm:"column:issue_id"`
PanelName string `gorm:"column:panel_name"`
Relation int64 `gorm:"column:relation"`
}
func (IssuePanel) TableName ¶
func (IssuePanel) TableName() string
type IssueProperty ¶
type IssueProperty struct {
BaseModel
ScopeType apistructs.ScopeType `gorm:"column:scope_type"` // 系统管理员(sys)/企业(org)/项目(project)/应用(app)
ScopeID int64 `gorm:"column:scope_id"` // 企业ID/项目ID/应用ID
OrgID int64 `gorm:"column:org_id"` // 冗余 OrgID,方便删除企业时删除所有相关issue
Required bool `gorm:"column:required"` // 是否是必填项
PropertyType apistructs.PropertyType `gorm:"column:property_type"` // 属性的的类型(单选,多选,文本)
PropertyName string `gorm:"column:property_name"` // 属性的名称
DisplayName string `gorm:"column:display_name"` // 属性的展示名称
PropertyIssueType apistructs.PropertyIssueType `gorm:"column:property_issue_type"` // 事件类型
Relation int64 `gorm:"column:relation"` // 关联公用事件
Index int64 `gorm:"column:index"` // 字段排序级
}
IssueProperty 事件属性表
func (IssueProperty) TableName ¶
func (IssueProperty) TableName() string
type IssuePropertyRelation ¶
type IssuePropertyRelation struct {
BaseModel
OrgID int64 `gorm:"column:org_id"` // 冗余 OrgID,方便删除企业时删除所有相关issue
ProjectID int64 `gorm:"column:project_id"`
IssueID int64 `gorm:"column:issue_id"` // 事件ID
PropertyID int64 `gorm:"column:property_id"` // 字段ID
PropertyValueID int64 `gorm:"column:property_value_id"` // 枚举值ID
ArbitraryValue string `gorm:"column:arbitrary_value"` // 字段自定义输入值
}
IssuePropertyRelation 事件属性实例关联表
func (IssuePropertyRelation) TableName ¶
func (IssuePropertyRelation) TableName() string
type IssuePropertyValue ¶
type IssuePropertyValue struct {
BaseModel
PropertyID int64 `gorm:"column:property_id"`
Value string `gorm:"column:value"`
Name string `gorm:"column:name"`
}
IssuePropertyValue 事件属性值表
func (IssuePropertyValue) TableName ¶
func (IssuePropertyValue) TableName() string
type IssueRelation ¶
IssueRelation 事件事件关联
type IssueStage ¶
type IssueStage struct {
BaseModel
OrgID int64 `gorm:"column:org_id"`
IssueType apistructs.IssueType `gorm:"column:issue_type"`
Name string `gorm:"column:name"`
Value string `gorm:"column:value"`
}
func (IssueStage) TableName ¶
func (i IssueStage) TableName() string
type IssueState ¶
type IssueState struct {
BaseModel
ProjectID uint64 `gorm:"column:project_id"`
IssueType apistructs.IssueType `gorm:"column:issue_type"`
Name string `gorm:"column:name"`
Belong apistructs.IssueStateBelong `gorm:"column:belong"`
Index int64 `gorm:"column:index"`
Role string `gorm:"column:role"`
}
func (IssueState) TableName ¶
func (IssueState) TableName() string
type IssueStateJoinSQL ¶
type IssueStateJoinSQL struct {
ID int64 `gorm:"primary_key"`
ProjectID uint64 `gorm:"column:project_id"`
IssueType apistructs.IssueType `gorm:"column:issue_type"`
Name string `gorm:"column:name"`
Belong apistructs.IssueStateBelong `gorm:"column:belong"`
Index int64 `gorm:"column:index"`
EndStateID int64 `gorm:"column:end_state_id"`
}
type IssueStateRelation ¶
type IssueStateRelation struct {
BaseModel
ProjectID int64 `gorm:"column:project_id"`
IssueType apistructs.IssueType `gorm:"column:issue_type"`
StartStateID int64 `gorm:"column:start_state_id"`
EndStateID int64 `gorm:"column:end_state_id"`
}
func (IssueStateRelation) TableName ¶
func (IssueStateRelation) TableName() string
type IssueStream ¶
type IssueStream struct {
model.BaseModel
IssueID int64 // issue id
Operator string // 操作人
StreamType apistructs.IssueStreamType // 通过事件流类型找到对应模板
StreamParams apistructs.ISTParam // 事件流模板值, 参数取值范围见: apistructs.ISTParam
}
IssueStream 事件流水表
func (*IssueStream) Convert ¶
func (stream *IssueStream) Convert(content string) apistructs.IssueStream
Convert 事件流格式转换
type IssueTestCaseRelation ¶
type IssueTestCaseRelation struct {
BaseModel
IssueID uint64 `json:"issueID"`
TestPlanID uint64 `json:"testPlanID"`
TestPlanCaseRelID uint64 `json:"testPlanCaseRelID"`
TestCaseID uint64 `json:"testCaseID"`
CreatorID string `json:"creatorID"`
}
IssueTestCaseRelation 事件与用例关联
func (IssueTestCaseRelation) TableName ¶
func (IssueTestCaseRelation) TableName() string
TableName 表名
type Iteration ¶
type Iteration struct {
BaseModel
StartedAt *time.Time // 迭代开始时间
FinishedAt *time.Time // 迭代结束时间
ProjectID uint64 // 所属项目 ID
Title string // 标题
Content string // 内容
Creator string // 创建者 ID
State apistructs.IterationState // 归档状态
}
func (*Iteration) Convert ¶
func (i *Iteration) Convert() apistructs.Iteration
type Label ¶
type Label struct {
BaseModel
Name string // 标签名称
Type apistructs.ProjectLabelType // 标签作用类型
Color string // 标签颜色
ProjectID uint64 // 标签所属项目
Creator string // 创建人
}
Label 标签
type LabelRelation ¶
type LabelRelation struct {
BaseModel
LabelID uint64 `json:"label_id"` // 标签 id
RefType apistructs.ProjectLabelType `json:"ref_type"` // 标签作用类型, eg: issue
RefID uint64 `json:"ref_id"` // 标签关联目标 id
}
LabelRelation 标签关联关系
type LibReference ¶
type LibReference struct {
BaseModel
AppID uint64
LibID uint64
LibName string
LibDesc string
ApprovalID uint64
ApprovalStatus apistructs.ApprovalStatus
Creator string
}
LibReference 库引用
type NexusRepository ¶
type NexusRepository struct {
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 {
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 Notice ¶
type Notice struct {
BaseModel
OrgID uint64
Content string
Status apistructs.NoticeStatus
Creator string
}
Notice 平台公告
type OSSSnapshot ¶
Source Files
¶
- account.go
- activity.go
- app_certificate.go
- app_publish_item_relation.go
- application.go
- approve.go
- audit.go
- base.go
- branch_rule.go
- certificate.go
- cluster.go
- comment.go
- config.go
- container.go
- current_org.go
- deployment.go
- error.go
- errorbox.go
- favorited_resource.go
- file.go
- host.go
- issue.go
- issue_app_relation.go
- issue_issue_relation.go
- issue_panel.go
- issue_property.go
- issue_property_relation.go
- issue_property_value.go
- issue_stage.go
- issue_state.go
- issue_stream.go
- issue_testplancaserel_rel.go
- iteration.go
- job.go
- label.go
- label_relation.go
- lib-reference.go
- manual_review.go
- mbox.go
- member.go
- member_extra.go
- mysql.go
- namespace.go
- nexus_repository.go
- nexus_user.go
- notice.go
- notify.go
- notify_group.go
- notify_history.go
- notify_item.go
- notify_source.go
- org_cluster_relation.go
- organization.go
- print.go
- project.go
- publisher.go
- review_uesr.go
- role_permission.go
- service.go
- ticket.go
- utlis.go