Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddImage(image *model.Image) error
- func (d *Dao) AuthHub(c context.Context, sessionID string) (err error)
- func (d *Dao) BootMobileDevice(c context.Context, host, serial string) (deviceBootData *model.DeviceBootData, err error)
- func (d *Dao) Close()
- func (d *Dao) CreateUser(user *model.User) (err error)
- func (d *Dao) DelImage(iID int64) error
- func (d *Dao) DelMachine(id int64, username string) (err error)
- func (d *Dao) DelMachineNodeByMachineID(mID int64) error
- func (d *Dao) DelMailLog(receiverName string) (err error)
- func (d *Dao) DelPaasMachine(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (instance *model.ReleaseInstance, err error)
- func (d *Dao) DelUser(user *model.User) (err error)
- func (d *Dao) DeleteMobileMachineByUUID(UUID string) (delCnt int, err error)
- func (d *Dao) DeleteMobileMachineNotInHost(hostList []string) (delCnt int, err error)
- func (d *Dao) DeleteRepo(c context.Context, repoName string) (err error)
- func (d *Dao) DeleteRepoTag(c context.Context, repoName, tagName string) (err error)
- func (d *Dao) FindAllMachinePackages() (machinePackages []*model.MachinePackage, err error)
- func (d *Dao) FindAllMobileImages() (mobileImages []*model.MobileImage, err error)
- func (d *Dao) FindApplicationRecordsByApplicant(applicant string, pn, ps int) (total int64, ars []*model.ApplicationRecord, err error)
- func (d *Dao) FindApplicationRecordsByAuditor(auditor string, pn, ps int) (total int64, ars []*model.ApplicationRecord, err error)
- func (d *Dao) FindApplicationRecordsByID(auditID int64) (ar *model.ApplicationRecord, err error)
- func (d *Dao) FindApplicationRecordsByMachineID(machineID int64, pn, ps int) (total int64, ars []*model.ApplicationRecord, err error)
- func (d *Dao) FindDeleteMachineTasks() (tasks []*model.Task, err error)
- func (d *Dao) FindExpiredMachine() (ms []*model.Machine, err error)
- func (d *Dao) FindExpiredMachineByDay(day int) (ms []*model.Machine, err error)
- func (d *Dao) FindHubImageConfByImageName(imageName string) (hubImageConf *model.HubImageConf, err error)
- func (d *Dao) FindHubImageLogByImageTag(imageTag string) (hubImageLog *model.HubImageLog, err error)
- func (d *Dao) FindHubImageLogByMachineID(machineID int64) (hubImageLogs []*model.HubImageLog, err error)
- func (d *Dao) FindHubMachine2ImageLog(queryRequest *model.QueryMachine2ImageLogRequest) (total int64, hubImageLogs []*model.HubImageLog, err error)
- func (d *Dao) FindMachineLogs(queryRequest *model.QueryMachineLogRequest) (total int64, machineLogs []*model.AboundMachineLog, err error)
- func (d *Dao) FindMachineLogsByMachineID(machineID int64, pn, ps int) (total int64, machineLogs []*model.AboundMachineLog, err error)
- func (d *Dao) FindMailLog(receiverName string) (mailLogs []*model.MailLog, err error)
- func (d *Dao) FindMobileImageByMode(mode string) (mobileImage *model.MobileImage, err error)
- func (d *Dao) FindMobileMachineByID(deviceID int64) (mobileMachine *model.MobileMachine, err error)
- func (d *Dao) FindMobileMachineBySerial(serial string) (mobileMachine *model.MobileMachine, err error)
- func (d *Dao) FindMobileMachineCategory(isShowOffline bool) (mobileCategory *model.MobileCategory, err error)
- func (d *Dao) FindMobileMachineErrorLog(queryRequest *model.QueryMobileMachineErrorLogRequest) (total int64, mobileMachineErrorLogs []*model.MobileMachineErrorLog, err error)
- func (d *Dao) FindMobileMachineLogs(queryRequest *model.QueryMobileMachineLogRequest) (total int64, mobileMachineLogs []*model.AboundMobileMachineLog, err error)
- func (d *Dao) FindMobileMachines(queryRequest *model.QueryMobileDeviceRequest) (total int64, mobileMachines []*model.MobileMachine, err error)
- func (d *Dao) FindMobileSyncLogStartStatus() (startCount int, err error)
- func (d *Dao) FindSnapshotRecord(machineID int64) (snapshotRecord *model.SnapshotRecord, err error)
- func (d *Dao) FindSnapshotStatusInDoingOver2Hours() (snapshotRecords []*model.SnapshotRecord, err error)
- func (d *Dao) FindUserByID(ID int64) (user *model.User, err error)
- func (d *Dao) FindUserByUserName(name string) (user *model.User, err error)
- func (d *Dao) GenMachineNodes(nodes []*model.MachineNode) (err error)
- func (d *Dao) GenPaasMachines(c context.Context, mc *model.PaasGenMachineRequest) (instances []*model.CreateInstance, err error)
- func (d *Dao) HasMachine(name string) (b bool, err error)
- func (d *Dao) HubProjects(c context.Context, projectName string) (projects []*model.HubProject, err error)
- func (d *Dao) ImageGetAll() (imageNames []string, err error)
- func (d *Dao) ImageGetID(imageName string) (imageID string, err error)
- func (d *Dao) ImagePull(imageName string) (err error)
- func (d *Dao) ImagePush(imageName string) (err error)
- func (d *Dao) ImageRemove(imageID string) (err error)
- func (d *Dao) ImageTag(imageSrcName, imageTagName string) (err error)
- func (d *Dao) ImageTask(imageTask func())
- func (d *Dao) Images() (images []*model.Image, err error)
- func (d *Dao) InsertApplicationRecord(ar *model.ApplicationRecord) (err error)
- func (d *Dao) InsertApplicationRecordAndUpdateMachineDelayStatus(ar *model.ApplicationRecord, machineID int64, delayStatus int) (err error)
- func (d *Dao) InsertDeleteMachinesTasks(ms []*model.Machine) (err error)
- func (d *Dao) InsertHubImageConf(hubImageConf *model.HubImageConf) (err error)
- func (d *Dao) InsertHubImageLog(hubImageLog *model.HubImageLog) (err error)
- func (d *Dao) InsertMachineLog(machineLog *model.MachineLog) (err error)
- func (d *Dao) InsertMachines(u string, gmr *model.GenMachinesRequest, ins []*model.CreateInstance) (err error)
- func (d *Dao) InsertMachinesV2(u string, gmr *model.GenMachinesRequest, pgmr *model.PaasGenMachineRequest) (ms []*model.Machine, err error)
- func (d *Dao) InsertMailLog(ml *model.MailLog) (err error)
- func (d *Dao) InsertMobileMachine(mobileMachine *model.MobileMachine) (err error)
- func (d *Dao) InsertMobileMachineErrorLog(mobileMachineErrorLog *model.MobileMachineErrorLog) (err error)
- func (d *Dao) InsertMobileMachineLog(mobileMachineLog *model.MobileMachineLog) (err error)
- func (d *Dao) InsertMobileSyncLog(mobileSyncLog *model.MobileSyncLog) (err error)
- func (d *Dao) InsertSnapshotRecord(snapshotRecord *model.SnapshotRecord) (err error)
- func (d *Dao) LendOutMobileMachine(deviceID int64, serial, username string) (err error)
- func (d *Dao) MachineCountGroupByBusiness() (machinesCount []*model.MachineCountGroupByBusiness, err error)
- func (d *Dao) MachineCountGroupByBusinessInRunning() (machinesCount []*model.MachineCountGroupByBusiness, err error)
- func (d *Dao) MachineLatestCreated() (machines []*model.MachineCreatedAndEndTime, err error)
- func (d *Dao) MachineLifeCycle() (machineLifeCycles []*model.MachineLifeCycle, err error)
- func (d *Dao) MachineWillBeExpired() (machines []*model.MachineCreatedAndEndTime, err error)
- func (d *Dao) MobileDeviceDetail(c context.Context, host, serial string) (device *model.Device, err error)
- func (d *Dao) MobileDeviceList(c context.Context) (resTotal map[string][]*model.Device, err error)
- func (d *Dao) MobileMachineLendCount() (mobileMachinesUsageCount []*model.MobileMachineUsageCount, err error)
- func (d *Dao) MobileMachineModeCount() (mobileMachinesTypeCount []*model.MobileMachineTypeCount, err error)
- func (d *Dao) MobileMachineUsageCount() (mobileMachinesUsageCount []*model.MobileMachineUsageCount, err error)
- func (d *Dao) MobileMachineUseRecord() (mobileMachineLogs []*model.MobileMachineLog, err error)
- func (d *Dao) MobileMachineUserLendCount() (mobileMachinesUsageCount []*model.MobileMachineUserUsageCount, err error)
- func (d *Dao) MobileMachineUserUsageCount() (mobileMachinesUsageCount []*model.MobileMachineUserUsageCount, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) ProjectRepoCount(c context.Context, projectID int) (total int, err error)
- func (d *Dao) ProjectRepos(c context.Context, projectID, pageNum, pageSize int, keyWord string) (projectRepos []*model.ProjectRepository, err error)
- func (d *Dao) QueryCluster(c context.Context, netWordID int64) (cluster *model.Cluster, err error)
- func (d *Dao) QueryClusters(c context.Context) (clusters []*model.Cluster, err error)
- func (d *Dao) QueryMachine(id int64) (machine *model.Machine, err error)
- func (d *Dao) QueryMachineByName(machineName string) (machine *model.Machine, err error)
- func (d *Dao) QueryMachineCount() (total int, err error)
- func (d *Dao) QueryMachineInRunning() (ms []*model.Machine, err error)
- func (d *Dao) QueryMachineNodes(mID int64) (nodes []*model.MachineNode, err error)
- func (d *Dao) QueryMachineUsageSummaryFromCache(c context.Context, pqadmrs []*model.PaasQueryAndDelMachineRequest) (pmds []*model.PaasMachineDetail, err error)
- func (d *Dao) QueryMachines(names []string, qmr *model.QueryMachineRequest) (total int64, machines []*model.Machine, err error)
- func (d *Dao) QueryMachinesByPodNames(podNames []string) (machines []*model.Machine, err error)
- func (d *Dao) QueryOnlineMachineByName(machineName string) (machine *model.Machine, err error)
- func (d *Dao) QueryPaasMachine(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (md *model.PaasMachineDetail, err error)
- func (d *Dao) QueryPaasMachineStatus(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (machineStatus *model.MachineStatus, err error)
- func (d *Dao) QueryPathAndPodNamesMapping() (pathAndPodNames map[string][]string, err error)
- func (d *Dao) QueryTreeInstances(c context.Context, sessionID string, tir *model.TreeInstanceRequest) (tid map[string]*model.TreeInstance, err error)
- func (d *Dao) RepoTags(c context.Context, repoName string) (repoTags []*model.RepositoryTagResponse, err error)
- func (d *Dao) ReturnMobileMachine(deviceID int64, serial, username string) (err error)
- func (d *Dao) SendMail(message *gomail.Message)
- func (d *Dao) SendMailIfFailed(message *gomail.Message)
- func (d *Dao) SetProxy()
- func (d *Dao) ShutdownMobileDevice(c context.Context, host, serial string) (err error)
- func (d *Dao) SnapshotPaasMachineStatus(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (status int, err error)
- func (d *Dao) TreeAppInstance(c context.Context, treePaths []string) (treeAppInstances map[string][]*model.TreeAppInstance, err error)
- func (d *Dao) TreeRoles(c context.Context, sessionID, treePath string) (treeRoles []*model.TreeRole, err error)
- func (d *Dao) TreeRolesAsPlatform(c context.Context, treePath string) (treeRoles []*model.TreeRole, err error)
- func (d *Dao) TreeSon(c context.Context, sessionID, treePath string) (treeSon map[string]interface{}, err error)
- func (d *Dao) UpdateAuditStatus(auditID int64, status string) (err error)
- func (d *Dao) UpdateAuditStatusAndComment(auditID int64, status, comment string) (err error)
- func (d *Dao) UpdateAuditStatusAndUpdateMachineDelayStatus(machineID, auditID int64, delayStatus int, applyStatus string) (err error)
- func (d *Dao) UpdateAuditStatusAndUpdateMachineDelayStatusComment(machineID, auditID int64, delayStatus int, applyStatus, comment string) (err error)
- func (d *Dao) UpdateAuditStatusAndUpdateMachineEndTime(machineID, auditID int64, delayStatus int, applyStatus string, ...) (err error)
- func (d *Dao) UpdateHubImageConf(hubImageConf *model.HubImageConf) (err error)
- func (d *Dao) UpdateHubImageLog(hubImageLog *model.HubImageLog) (err error)
- func (d *Dao) UpdateHubImageLogStatus(logID int64, status int) (err error)
- func (d *Dao) UpdateHubImageLogStatusInDoingStatus(machineID int64, status int) (err error)
- func (d *Dao) UpdateImage(image *model.Image) error
- func (d *Dao) UpdateMachineDelayStatus(id int64, delayStatus int) (err error)
- func (d *Dao) UpdateMachineEndTime(id int64, delayStatus int, endTime time.Time) (err error)
- func (d *Dao) UpdateMachineStatus(id int64, status int) error
- func (d *Dao) UpdateMachineStatusByName(status int, n string) error
- func (d *Dao) UpdateMachineStatusByPodNames(podNames []string, target int) (err error)
- func (d *Dao) UpdateMachineUser(machineID int64, username string) (err error)
- func (d *Dao) UpdateMobileMachine(mobileMachine *model.MobileMachine) (err error)
- func (d *Dao) UpdateMobileMachineByRelease(mobileMachine *model.MobileMachine) (err error)
- func (d *Dao) UpdateMobileMachineWsurlAndState(mobileMachine *model.MobileMachine) (err error)
- func (d *Dao) UpdateMobileSyncLog(mobileSyncLog *model.MobileSyncLog) (err error)
- func (d *Dao) UpdatePaasMachineNode(c context.Context, pumnr *model.PaasUpdateMachineNodeRequest) (data string, err error)
- func (d *Dao) UpdateSnapshotRecord(snapshotRecord *model.SnapshotRecord) (err error)
- func (d *Dao) UpdateSnapshotRecordStatus(machineID int64, status string) (err error)
- func (d *Dao) UpdateStatusForMachines(status int, ids []int64) (err error)
- func (d *Dao) UpdateTaskStatusByMachines(machineIDs []int64, status int) (err error)
- func (d *Dao) UpdateTaskStatusByTaskID(taskID int64, status int) (err error)
- func (d *Dao) UserTree(c context.Context, sessionID string) (tree *model.UserTree, err error)
- func (d *Dao) WeChatSendMessage(c context.Context, msgSendReq *model.MsgSendReq) (msgSendRes *model.MsgSendRes, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao.
func (*Dao) BootMobileDevice ¶
func (d *Dao) BootMobileDevice(c context.Context, host, serial string) (deviceBootData *model.DeviceBootData, err error)
BootMobileDevice Boot Mobile Device.
func (*Dao) CreateUser ¶
CreateUser create user.
func (*Dao) DelMachine ¶
DelMachine delete machine.
func (*Dao) DelMachineNodeByMachineID ¶
DelMachineNodeByMachineID delete node by machine id.
func (*Dao) DelMailLog ¶
DelMailLog delete mail log.
func (*Dao) DelPaasMachine ¶
func (d *Dao) DelPaasMachine(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (instance *model.ReleaseInstance, err error)
DelPaasMachine delete machine in paas.
func (*Dao) DeleteMobileMachineByUUID ¶
DeleteMobileMachineByUUID Delete Mobile Machine By UUID.
func (*Dao) DeleteMobileMachineNotInHost ¶
DeleteMobileMachineNotInHost Delete Mobile Machine Not In Host.
func (*Dao) DeleteRepo ¶
DeleteRepo Delete Repo.
func (*Dao) DeleteRepoTag ¶
DeleteRepoTag Delete Repo Tag.
func (*Dao) FindAllMachinePackages ¶
func (d *Dao) FindAllMachinePackages() (machinePackages []*model.MachinePackage, err error)
FindAllMachinePackages find all machine packages.
func (*Dao) FindAllMobileImages ¶
func (d *Dao) FindAllMobileImages() (mobileImages []*model.MobileImage, err error)
FindAllMobileImages Find All Mobile Images.
func (*Dao) FindApplicationRecordsByApplicant ¶
func (d *Dao) FindApplicationRecordsByApplicant(applicant string, pn, ps int) (total int64, ars []*model.ApplicationRecord, err error)
FindApplicationRecordsByApplicant find application record by applicant.
func (*Dao) FindApplicationRecordsByAuditor ¶
func (d *Dao) FindApplicationRecordsByAuditor(auditor string, pn, ps int) (total int64, ars []*model.ApplicationRecord, err error)
FindApplicationRecordsByAuditor find application record by auditor.
func (*Dao) FindApplicationRecordsByID ¶
func (d *Dao) FindApplicationRecordsByID(auditID int64) (ar *model.ApplicationRecord, err error)
FindApplicationRecordsByID find application records by id.
func (*Dao) FindApplicationRecordsByMachineID ¶
func (d *Dao) FindApplicationRecordsByMachineID(machineID int64, pn, ps int) (total int64, ars []*model.ApplicationRecord, err error)
FindApplicationRecordsByMachineID find application records by machineId.
func (*Dao) FindDeleteMachineTasks ¶
FindDeleteMachineTasks find delete machine tasks.
func (*Dao) FindExpiredMachine ¶
FindExpiredMachine find a day-old machines.
func (*Dao) FindExpiredMachineByDay ¶
FindExpiredMachineByDay find expired machines.
func (*Dao) FindHubImageConfByImageName ¶
func (d *Dao) FindHubImageConfByImageName(imageName string) (hubImageConf *model.HubImageConf, err error)
FindHubImageConfByImageName Find Hub Image Conf By Image Name.
func (*Dao) FindHubImageLogByImageTag ¶
func (d *Dao) FindHubImageLogByImageTag(imageTag string) (hubImageLog *model.HubImageLog, err error)
FindHubImageLogByImageTag Find Hub Image Log By Image Tag.
func (*Dao) FindHubImageLogByMachineID ¶
func (d *Dao) FindHubImageLogByMachineID(machineID int64) (hubImageLogs []*model.HubImageLog, err error)
FindHubImageLogByMachineID Find Hub Image Log By MachineID .
func (*Dao) FindHubMachine2ImageLog ¶
func (d *Dao) FindHubMachine2ImageLog(queryRequest *model.QueryMachine2ImageLogRequest) (total int64, hubImageLogs []*model.HubImageLog, err error)
FindHubMachine2ImageLog Find Hub Machine to Image Log .
func (*Dao) FindMachineLogs ¶
func (d *Dao) FindMachineLogs(queryRequest *model.QueryMachineLogRequest) (total int64, machineLogs []*model.AboundMachineLog, err error)
FindMachineLogs Find Machine Logs.
func (*Dao) FindMachineLogsByMachineID ¶
func (d *Dao) FindMachineLogsByMachineID(machineID int64, pn, ps int) (total int64, machineLogs []*model.AboundMachineLog, err error)
FindMachineLogsByMachineID find machine log by machineId.
func (*Dao) FindMailLog ¶
FindMailLog find mail log.
func (*Dao) FindMobileImageByMode ¶
func (d *Dao) FindMobileImageByMode(mode string) (mobileImage *model.MobileImage, err error)
FindMobileImageByMode Find Mobile Image By Mode.
func (*Dao) FindMobileMachineByID ¶
func (d *Dao) FindMobileMachineByID(deviceID int64) (mobileMachine *model.MobileMachine, err error)
FindMobileMachineByID Find Mobile Machine By Id.
func (*Dao) FindMobileMachineBySerial ¶
func (d *Dao) FindMobileMachineBySerial(serial string) (mobileMachine *model.MobileMachine, err error)
FindMobileMachineBySerial Find Device FarmBy Serial.
func (*Dao) FindMobileMachineCategory ¶
func (d *Dao) FindMobileMachineCategory(isShowOffline bool) (mobileCategory *model.MobileCategory, err error)
FindMobileMachineCategory Find Mobile Machine Category.
func (*Dao) FindMobileMachineErrorLog ¶
func (d *Dao) FindMobileMachineErrorLog(queryRequest *model.QueryMobileMachineErrorLogRequest) (total int64, mobileMachineErrorLogs []*model.MobileMachineErrorLog, err error)
FindMobileMachineErrorLog Find Mobile Machine Error Log.
func (*Dao) FindMobileMachineLogs ¶
func (d *Dao) FindMobileMachineLogs(queryRequest *model.QueryMobileMachineLogRequest) (total int64, mobileMachineLogs []*model.AboundMobileMachineLog, err error)
FindMobileMachineLogs Find Mobile Machine Logs.
func (*Dao) FindMobileMachines ¶
func (d *Dao) FindMobileMachines(queryRequest *model.QueryMobileDeviceRequest) (total int64, mobileMachines []*model.MobileMachine, err error)
FindMobileMachines Find Mobile Machines.
func (*Dao) FindMobileSyncLogStartStatus ¶
FindMobileSyncLogStartStatus FindMobile SyncLog Start Status.
func (*Dao) FindSnapshotRecord ¶
func (d *Dao) FindSnapshotRecord(machineID int64) (snapshotRecord *model.SnapshotRecord, err error)
FindSnapshotRecord Find Snapshot Record.
func (*Dao) FindSnapshotStatusInDoingOver2Hours ¶
func (d *Dao) FindSnapshotStatusInDoingOver2Hours() (snapshotRecords []*model.SnapshotRecord, err error)
FindSnapshotStatusInDoingOver2Hours Find Snapshot Status In Doing Over 2 Hours.
func (*Dao) FindUserByID ¶
FindUserByID find user by id.
func (*Dao) FindUserByUserName ¶
FindUserByUserName find user by username.
func (*Dao) GenMachineNodes ¶
func (d *Dao) GenMachineNodes(nodes []*model.MachineNode) (err error)
GenMachineNodes generate some machine nodes.
func (*Dao) GenPaasMachines ¶
func (d *Dao) GenPaasMachines(c context.Context, mc *model.PaasGenMachineRequest) (instances []*model.CreateInstance, err error)
GenPaasMachines create machine in paas.
func (*Dao) HasMachine ¶
HasMachine verify machine name.
func (*Dao) HubProjects ¶
func (d *Dao) HubProjects(c context.Context, projectName string) (projects []*model.HubProject, err error)
HubProjects Get Hub Projects.
func (*Dao) ImageGetAll ¶
ImageGetAll Image Get All.
func (*Dao) ImageGetID ¶
ImageGetID Image Get ID.
func (*Dao) ImageRemove ¶
ImageRemove Image Remove.
func (*Dao) InsertApplicationRecord ¶
func (d *Dao) InsertApplicationRecord(ar *model.ApplicationRecord) (err error)
InsertApplicationRecord insert application record.
func (*Dao) InsertApplicationRecordAndUpdateMachineDelayStatus ¶
func (d *Dao) InsertApplicationRecordAndUpdateMachineDelayStatus(ar *model.ApplicationRecord, machineID int64, delayStatus int) (err error)
InsertApplicationRecordAndUpdateMachineDelayStatus insert application record and update machine delay status.
func (*Dao) InsertDeleteMachinesTasks ¶
InsertDeleteMachinesTasks insert delete machines tasks. TODO:这块逻辑不是很好,如果一个写入失败希望继续写入失败的话最好返回失败list,后续联调时优化
func (*Dao) InsertHubImageConf ¶
func (d *Dao) InsertHubImageConf(hubImageConf *model.HubImageConf) (err error)
InsertHubImageConf Insert Hub Image conf.
func (*Dao) InsertHubImageLog ¶
func (d *Dao) InsertHubImageLog(hubImageLog *model.HubImageLog) (err error)
InsertHubImageLog Insert Hub Image Log.
func (*Dao) InsertMachineLog ¶
func (d *Dao) InsertMachineLog(machineLog *model.MachineLog) (err error)
InsertMachineLog insert machine log.
func (*Dao) InsertMachines ¶
func (d *Dao) InsertMachines(u string, gmr *model.GenMachinesRequest, ins []*model.CreateInstance) (err error)
InsertMachines insert machines.
func (*Dao) InsertMachinesV2 ¶
func (d *Dao) InsertMachinesV2(u string, gmr *model.GenMachinesRequest, pgmr *model.PaasGenMachineRequest) (ms []*model.Machine, err error)
InsertMachinesV2 insert machines for v2.
func (*Dao) InsertMailLog ¶
InsertMailLog insert mail log.
func (*Dao) InsertMobileMachine ¶
func (d *Dao) InsertMobileMachine(mobileMachine *model.MobileMachine) (err error)
InsertMobileMachine Insert Device Farm.
func (*Dao) InsertMobileMachineErrorLog ¶
func (d *Dao) InsertMobileMachineErrorLog(mobileMachineErrorLog *model.MobileMachineErrorLog) (err error)
InsertMobileMachineErrorLog Insert Mobile Machine Error Log.
func (*Dao) InsertMobileMachineLog ¶
func (d *Dao) InsertMobileMachineLog(mobileMachineLog *model.MobileMachineLog) (err error)
InsertMobileMachineLog Insert Mobile Machine Log.
func (*Dao) InsertMobileSyncLog ¶
func (d *Dao) InsertMobileSyncLog(mobileSyncLog *model.MobileSyncLog) (err error)
InsertMobileSyncLog Insert Mobile Sync Log.
func (*Dao) InsertSnapshotRecord ¶
func (d *Dao) InsertSnapshotRecord(snapshotRecord *model.SnapshotRecord) (err error)
InsertSnapshotRecord Insert Snapshot Record.
func (*Dao) LendOutMobileMachine ¶
LendOutMobileMachine Lend Out Mobile.
func (*Dao) MachineCountGroupByBusiness ¶
func (d *Dao) MachineCountGroupByBusiness() (machinesCount []*model.MachineCountGroupByBusiness, err error)
MachineCountGroupByBusiness Machine Count Group By Business
func (*Dao) MachineCountGroupByBusinessInRunning ¶
func (d *Dao) MachineCountGroupByBusinessInRunning() (machinesCount []*model.MachineCountGroupByBusiness, err error)
MachineCountGroupByBusinessInRunning Machine Count Group By Business In Running
func (*Dao) MachineLatestCreated ¶
func (d *Dao) MachineLatestCreated() (machines []*model.MachineCreatedAndEndTime, err error)
MachineLatestCreated Machine Latest Created
func (*Dao) MachineLifeCycle ¶
func (d *Dao) MachineLifeCycle() (machineLifeCycles []*model.MachineLifeCycle, err error)
MachineLifeCycle Statistics Machine Life Cycle.
func (*Dao) MachineWillBeExpired ¶
func (d *Dao) MachineWillBeExpired() (machines []*model.MachineCreatedAndEndTime, err error)
MachineWillBeExpired Statistics Machine Will Be Expired
func (*Dao) MobileDeviceDetail ¶
func (d *Dao) MobileDeviceDetail(c context.Context, host, serial string) (device *model.Device, err error)
MobileDeviceDetail Get Mobile Device Detail.
func (*Dao) MobileDeviceList ¶
MobileDeviceList Get Device Farm List .
func (*Dao) MobileMachineLendCount ¶
func (d *Dao) MobileMachineLendCount() (mobileMachinesUsageCount []*model.MobileMachineUsageCount, err error)
MobileMachineLendCount Mobile Machine Lend Count
func (*Dao) MobileMachineModeCount ¶
func (d *Dao) MobileMachineModeCount() (mobileMachinesTypeCount []*model.MobileMachineTypeCount, err error)
MobileMachineModeCount Mobile Machine Mode Count.
func (*Dao) MobileMachineUsageCount ¶
func (d *Dao) MobileMachineUsageCount() (mobileMachinesUsageCount []*model.MobileMachineUsageCount, err error)
MobileMachineUsageCount Mobile Machine Usage Count
func (*Dao) MobileMachineUseRecord ¶
func (d *Dao) MobileMachineUseRecord() (mobileMachineLogs []*model.MobileMachineLog, err error)
MobileMachineUseRecord Mobile Machine Use Record
func (*Dao) MobileMachineUserLendCount ¶
func (d *Dao) MobileMachineUserLendCount() (mobileMachinesUsageCount []*model.MobileMachineUserUsageCount, err error)
MobileMachineUserLendCount Mobile Machine Lend Count
func (*Dao) MobileMachineUserUsageCount ¶
func (d *Dao) MobileMachineUserUsageCount() (mobileMachinesUsageCount []*model.MobileMachineUserUsageCount, err error)
MobileMachineUserUsageCount Mobile Machine User Usage Count
func (*Dao) ProjectRepoCount ¶
ProjectRepoCount Get Project RepoCount.
func (*Dao) ProjectRepos ¶
func (d *Dao) ProjectRepos(c context.Context, projectID, pageNum, pageSize int, keyWord string) (projectRepos []*model.ProjectRepository, err error)
ProjectRepos Get Project Repos.
func (*Dao) QueryCluster ¶
QueryCluster query cluster information in paas by giving network.
func (*Dao) QueryClusters ¶
QueryClusters query cluster information in paas.
func (*Dao) QueryMachine ¶
QueryMachine query machine.
func (*Dao) QueryMachineByName ¶
QueryMachineByName Query Machine By Name.
func (*Dao) QueryMachineCount ¶
QueryMachineCount Query Machine Count
func (*Dao) QueryMachineInRunning ¶
QueryMachineInRunning Query Machine In Running
func (*Dao) QueryMachineNodes ¶
func (d *Dao) QueryMachineNodes(mID int64) (nodes []*model.MachineNode, err error)
QueryMachineNodes query machine nodes by machine id.
func (*Dao) QueryMachineUsageSummaryFromCache ¶
func (d *Dao) QueryMachineUsageSummaryFromCache(c context.Context, pqadmrs []*model.PaasQueryAndDelMachineRequest) (pmds []*model.PaasMachineDetail, err error)
QueryMachineUsageSummaryFromCache Machine Usage Summary In Cache.
func (*Dao) QueryMachines ¶
func (d *Dao) QueryMachines(names []string, qmr *model.QueryMachineRequest) (total int64, machines []*model.Machine, err error)
QueryMachines query machines and update machine in names status to boot.
func (*Dao) QueryMachinesByPodNames ¶
QueryMachinesByPodNames query machines by giving pod name slices.
func (*Dao) QueryOnlineMachineByName ¶
QueryOnlineMachineByName Query Online Machine By Name.
func (*Dao) QueryPaasMachine ¶
func (d *Dao) QueryPaasMachine(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (md *model.PaasMachineDetail, err error)
QueryPaasMachine query detail information of machine in paas.
func (*Dao) QueryPaasMachineStatus ¶
func (d *Dao) QueryPaasMachineStatus(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (machineStatus *model.MachineStatus, err error)
QueryPaasMachineStatus query status of machine in paas.
func (*Dao) QueryPathAndPodNamesMapping ¶
QueryPathAndPodNamesMapping query path and pod names map.
func (*Dao) QueryTreeInstances ¶
func (d *Dao) QueryTreeInstances(c context.Context, sessionID string, tir *model.TreeInstanceRequest) (tid map[string]*model.TreeInstance, err error)
QueryTreeInstances query tree instances
func (*Dao) RepoTags ¶
func (d *Dao) RepoTags(c context.Context, repoName string) (repoTags []*model.RepositoryTagResponse, err error)
RepoTags Get Repo Tags.
func (*Dao) ReturnMobileMachine ¶
ReturnMobileMachine return Mobile.
func (*Dao) SendMail ¶
func (d *Dao) SendMail(message *gomail.Message)
SendMail asynchronous send mail.
func (*Dao) SendMailIfFailed ¶
func (d *Dao) SendMailIfFailed(message *gomail.Message)
SendMailIfFailed Send Mail If Failed
func (*Dao) ShutdownMobileDevice ¶
ShutdownMobileDevice Shutdown Mobile Device.
func (*Dao) SnapshotPaasMachineStatus ¶
func (d *Dao) SnapshotPaasMachineStatus(c context.Context, pqadmr *model.PaasQueryAndDelMachineRequest) (status int, err error)
SnapshotPaasMachineStatus Snapshot Paas Machine Status.
func (*Dao) TreeAppInstance ¶
func (d *Dao) TreeAppInstance(c context.Context, treePaths []string) (treeAppInstances map[string][]*model.TreeAppInstance, err error)
TreeAppInstance get user tree node app instance.
func (*Dao) TreeRoles ¶
func (d *Dao) TreeRoles(c context.Context, sessionID, treePath string) (treeRoles []*model.TreeRole, err error)
TreeRoles get tree roles.
func (*Dao) TreeRolesAsPlatform ¶
func (d *Dao) TreeRolesAsPlatform(c context.Context, treePath string) (treeRoles []*model.TreeRole, err error)
TreeRolesAsPlatform get tree roles.
func (*Dao) TreeSon ¶
func (d *Dao) TreeSon(c context.Context, sessionID, treePath string) (treeSon map[string]interface{}, err error)
TreeSon get user tree node son node.
func (*Dao) UpdateAuditStatus ¶
UpdateAuditStatus update audit status.
func (*Dao) UpdateAuditStatusAndComment ¶
UpdateAuditStatusAndComment update audit status and comment.
func (*Dao) UpdateAuditStatusAndUpdateMachineDelayStatus ¶
func (d *Dao) UpdateAuditStatusAndUpdateMachineDelayStatus(machineID, auditID int64, delayStatus int, applyStatus string) (err error)
UpdateAuditStatusAndUpdateMachineDelayStatus update audit status and update machine delay status.
func (*Dao) UpdateAuditStatusAndUpdateMachineDelayStatusComment ¶
func (d *Dao) UpdateAuditStatusAndUpdateMachineDelayStatusComment(machineID, auditID int64, delayStatus int, applyStatus, comment string) (err error)
UpdateAuditStatusAndUpdateMachineDelayStatusComment update audit status and update machine delay status comment.
func (*Dao) UpdateAuditStatusAndUpdateMachineEndTime ¶
func (d *Dao) UpdateAuditStatusAndUpdateMachineEndTime(machineID, auditID int64, delayStatus int, applyStatus string, applyEndTime time.Time, comment string) (err error)
UpdateAuditStatusAndUpdateMachineEndTime update audit status and update machine end time.
func (*Dao) UpdateHubImageConf ¶
func (d *Dao) UpdateHubImageConf(hubImageConf *model.HubImageConf) (err error)
UpdateHubImageConf Update Hub Image Conf.
func (*Dao) UpdateHubImageLog ¶
func (d *Dao) UpdateHubImageLog(hubImageLog *model.HubImageLog) (err error)
UpdateHubImageLog Update Hub Image Log.
func (*Dao) UpdateHubImageLogStatus ¶
UpdateHubImageLogStatus Update Hub Image Log Status.
func (*Dao) UpdateHubImageLogStatusInDoingStatus ¶
UpdateHubImageLogStatusInDoingStatus Update Hub Image Log Status in doing status.
func (*Dao) UpdateImage ¶
UpdateImage Update image in db.
func (*Dao) UpdateMachineDelayStatus ¶
UpdateMachineDelayStatus update machine delay status.
func (*Dao) UpdateMachineEndTime ¶
UpdateMachineEndTime update machine end time.
func (*Dao) UpdateMachineStatus ¶
UpdateMachineStatus update machine status by giving value.
func (*Dao) UpdateMachineStatusByName ¶
UpdateMachineStatusByName update status by name.
func (*Dao) UpdateMachineStatusByPodNames ¶
UpdateMachineStatusByPodNames update machine status by pod names.
func (*Dao) UpdateMachineUser ¶
UpdateMachineUser Update Machine User By Id.
func (*Dao) UpdateMobileMachine ¶
func (d *Dao) UpdateMobileMachine(mobileMachine *model.MobileMachine) (err error)
UpdateMobileMachine Update Mobile Machine.
func (*Dao) UpdateMobileMachineByRelease ¶
func (d *Dao) UpdateMobileMachineByRelease(mobileMachine *model.MobileMachine) (err error)
UpdateMobileMachineByRelease Update Mobile Machine By Release.
func (*Dao) UpdateMobileMachineWsurlAndState ¶
func (d *Dao) UpdateMobileMachineWsurlAndState(mobileMachine *model.MobileMachine) (err error)
UpdateMobileMachineWsurlAndState Update Mobile Machine Wsurl And State.
func (*Dao) UpdateMobileSyncLog ¶
func (d *Dao) UpdateMobileSyncLog(mobileSyncLog *model.MobileSyncLog) (err error)
UpdateMobileSyncLog Update Mobile SyncLog.
func (*Dao) UpdatePaasMachineNode ¶
func (d *Dao) UpdatePaasMachineNode(c context.Context, pumnr *model.PaasUpdateMachineNodeRequest) (data string, err error)
UpdatePaasMachineNode update paas machine node.
func (*Dao) UpdateSnapshotRecord ¶
func (d *Dao) UpdateSnapshotRecord(snapshotRecord *model.SnapshotRecord) (err error)
UpdateSnapshotRecord Update Snapshot Record.
func (*Dao) UpdateSnapshotRecordStatus ¶
UpdateSnapshotRecordStatus Update Snapshot Record Status.
func (*Dao) UpdateStatusForMachines ¶
UpdateStatusForMachines update status for machines.
func (*Dao) UpdateTaskStatusByMachines ¶
UpdateTaskStatusByMachines update task status by machines.
func (*Dao) UpdateTaskStatusByTaskID ¶
UpdateTaskStatusByTaskID update task status by taskId.
func (*Dao) WeChatSendMessage ¶
func (d *Dao) WeChatSendMessage(c context.Context, msgSendReq *model.MsgSendReq) (msgSendRes *model.MsgSendRes, err error)
WeChatSendMessage We Chat Send Message
Source Files ¶
- bilihub.go
- dao.go
- dashboard.go
- devicefarm.go
- docker.go
- mail.go
- mysql_application_record.go
- mysql_dashboard.go
- mysql_hubimage_confs.go
- mysql_hubimage_logs.go
- mysql_image.go
- mysql_machine.go
- mysql_machineV2.go
- mysql_machine_log.go
- mysql_machine_node.go
- mysql_machine_package.go
- mysql_mail_log.go
- mysql_mobile_machine.go
- mysql_mobile_machine_error_log.go
- mysql_mobile_machine_log.go
- mysql_mobile_sync_log.go
- mysql_snapshot_record.go
- mysql_task.go
- mysql_user.go
- paas.go
- tree.go
- wechat.go