repository

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstanceRepoIns

func GetInstanceRepoIns() *instanceRepo

Types

type ExpandTemplateList

type ExpandTemplateList struct {
	TmplExpandId    int64  `json:"tmpl_expand_id"`
	TmplExpandName  string `json:"tmpl_expand_name"`
	InstClusterName string `json:"inst_cluster_name"`
	IsContainer     bool   `json:"is_container"`
	RegisterType    string `json:"register_type"`
}

type InstrRepo

type InstrRepo struct {
}

func GetInstrRepoInst

func GetInstrRepoInst() *InstrRepo

func (*InstrRepo) DeleteByTmplExpandId

func (r *InstrRepo) DeleteByTmplExpandId(ctx context.Context, tmplExpandId int64, dbo *gorm.DB) error

func (*InstrRepo) GetInstr

func (r *InstrRepo) GetInstr(ctx context.Context, instrId int64) (*db.Instruction, error)

type ScheduleTemplateRepo

type ScheduleTemplateRepo struct {
}

func GetScheduleTemplateRepoInst

func GetScheduleTemplateRepoInst() *ScheduleTemplateRepo

func (*ScheduleTemplateRepo) Delete

func (schtr *ScheduleTemplateRepo) Delete(ctx context.Context, tmplIds []int64) (int64, error)

更新数据表

func (*ScheduleTemplateRepo) GetExpandList

func (r *ScheduleTemplateRepo) GetExpandList(ctx context.Context, serviceName string, page, pageSize, serviceClusterId int) ([]ExpandTemplateList, int64, error)

func (*ScheduleTemplateRepo) GetSchedReverseTmpl

func (r *ScheduleTemplateRepo) GetSchedReverseTmpl(schedTmplId int64) (*db.ScheduleTemplate, error)

func (*ScheduleTemplateRepo) GetSchedReverseTmplBySvcClusterId

func (r *ScheduleTemplateRepo) GetSchedReverseTmplBySvcClusterId(scId int64) (*db.ScheduleTemplate, error)

func (*ScheduleTemplateRepo) GetSchedTmpl

func (r *ScheduleTemplateRepo) GetSchedTmpl(schedTmplId int64) (*db.ScheduleTemplate, error)

func (*ScheduleTemplateRepo) GetSchedTmplBySvcClusterId

func (r *ScheduleTemplateRepo) GetSchedTmplBySvcClusterId(scId int64, schedType constant.ScheduleType) (*db.ScheduleTemplate, error)

func (*ScheduleTemplateRepo) GetScheduleTempList

func (r *ScheduleTemplateRepo) GetScheduleTempList(ctx context.Context, page, pageSize, schedule_cluster_id int) ([]TemplateTaskLogic, int64, error)

type ServiceDetailLogic

type ServiceDetailLogic struct {
	ServiceName        string `json:"service_name"`
	ServiceClusterId   int64  `json:"service_cluster_id"`
	ServiceClusterName string `json:"service_cluster_name"`
	Description        string `json:"description"`
	TmplExpandName     string `json:"tmpl_expand_name"`
	TmplExpandId       int64  `json:"tmpl_expand_id"`
}

ServiceDetailLogic 服务详情数据

type ServiceListLogic

type ServiceListLogic struct {
	ServiceId          int64  `json:"service_id"`
	ServiceName        string `json:"service_name"`
	ClusterNum         int    `json:"cluster_num"`
	Language           string `json:"language"`
	ImageUrl           string `json:"image_url"`
	ServiceClusterId   int64  `json:"service_cluster_id"`
	ServiceClusterName string `json:"service_cluster_name"`
	TmplExpandId       int64  `json:"tmpl_expand_id"`
	TmplExpandName     string `json:"tmpl_expand_name"`
	Description        string `json:"description"`
	AutoDecision       string `json:"auto_decision"`
	TaskTypeStatus     string `json:"task_type_status"`
}

ServiceListLogic 服务列表数据item

type ServiceRepo

type ServiceRepo struct {
}

func GetServiceRepoInst

func GetServiceRepoInst() *ServiceRepo

func (*ServiceRepo) GetService

func (r *ServiceRepo) GetService(ctx context.Context, serviceName string) (*db.Service, error)

func (*ServiceRepo) GetServiceCluster

func (r *ServiceRepo) GetServiceCluster(ctx context.Context, id int64) (*db.ServiceCluster, error)

func (*ServiceRepo) GetServiceDetail

func (r *ServiceRepo) GetServiceDetail(ctx context.Context, serviceName string) (*ServiceDetailLogic, error)

func (*ServiceRepo) GetServiceList

func (r *ServiceRepo) GetServiceList(ctx context.Context, page, pageSize int, serviceName, lang string) ([]ServiceListLogic, int64, error)

GetServiceList 获取分页数据

func (*ServiceRepo) UpdateDesc

func (r *ServiceRepo) UpdateDesc(ctx context.Context, serviceName, description string) (int64, error)

type TaskRepo

type TaskRepo struct {
}

func GetTaskRepoInst

func GetTaskRepoInst() *TaskRepo

func (*TaskRepo) CreateTask

func (r *TaskRepo) CreateTask(ctx context.Context, schedTmplId, instCnt int64, operator, execType string) (int64, error)

func (*TaskRepo) GetLastExpandSuccTask

func (r *TaskRepo) GetLastExpandSuccTask(ctx context.Context, tmplId int64) (*db.Task, error)

func (*TaskRepo) GetTask added in v0.1.1

func (r *TaskRepo) GetTask(ctx context.Context, taskId int64) (*db.Task, error)

func (*TaskRepo) UpdateTaskRelationTaskId

func (r *TaskRepo) UpdateTaskRelationTaskId(ctx context.Context, taskId int64, field string, relationTaskId int64) error

func (*TaskRepo) UpdateTaskStatus

func (r *TaskRepo) UpdateTaskStatus(ctx context.Context, taskId int64, taskStatus, msg string) error

func (*TaskRepo) UpdateTaskStep

func (r *TaskRepo) UpdateTaskStep(ctx context.Context, taskId int64, taskStep, msg string) error

type TemplateTaskLogic

type TemplateTaskLogic struct {
	TaskId         int64  `json:"task_id"`
	TmplExpandName string `json:"tmpl_expand_name"`
	ScheduleType   string `json:"schedule_type"`
	TaskInstCnt    int64  `json:"task_inst_cnt"`
	TaskExecType   string `json:"task_exec_type"`
	TaskExecOpr    string `json:"task_exec_opr"`
	BeginAt        string `json:"begin_at"`
	TimeCost       string `json:"time_cost"`
	TaskStatus     string `json:"task_status"`
	TaskStatusDesc string `json:"task_status_desc"`
	TaskStepDesc   string `json:"task_step_desc"`
}

Directories

Path Synopsis
model
db

Jump to

Keyboard shortcuts

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