repository

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstanceRepoIns

func GetInstanceRepoIns() *instanceRepo

Types

type ClusterInstanceCount added in v0.2.0

type ClusterInstanceCount struct {
	ServiceClusterId int64 `json:"service_cluster_id"`
	InstanceCount    int   `json:"instance_count"`
}

type DeployTemplate added in v0.3.0

type DeployTemplate struct {
	TmplDeployId       int64  `json:"tmpl_deploy_id"`
	TmplDeployName     string `json:"tmpl_deploy_name"`
	TmplDesc           string `json:"tmpl_desc"`
	InstClusterName    string `json:"inst_cluster_name"`
	DeployMode         string `json:"deploy_mode"`
	DeployResourceType string `json:"deploy_resource_type"`
}

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 IntegrationRepo added in v0.3.0

type IntegrationRepo struct {
}

func GetIntegrationInstance added in v0.3.0

func GetIntegrationInstance() *IntegrationRepo

func (*IntegrationRepo) Create added in v0.3.0

func (r *IntegrationRepo) Create(ctx context.Context, host, account, password, _type string) error

func (*IntegrationRepo) Delete added in v0.3.0

func (r *IntegrationRepo) Delete(ctx context.Context, ids []int64) error

func (IntegrationRepo) GetOneByType added in v0.3.0

func (r IntegrationRepo) GetOneByType(ctx context.Context, _type string) (*types.Integration, error)

func (*IntegrationRepo) List added in v0.3.0

func (r *IntegrationRepo) List(ctx context.Context, _type string, page int, pageSize int) ([]db.Integration, int, 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)

Delete 删除扩缩容模板以及关联集群

func (*ScheduleTemplateRepo) GetAllTmplsBySvcClusterId added in v0.2.0

func (r *ScheduleTemplateRepo) GetAllTmplsBySvcClusterId(scIds []int64) ([]db.ScheduleTemplate, error)

func (*ScheduleTemplateRepo) GetDeployTemplateList added in v0.3.0

func (r *ScheduleTemplateRepo) GetDeployTemplateList(ctx context.Context, serviceName string, page, pageSize, serviceClusterId int) ([]DeployTemplate, 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"`
	Domain             string `json:"domain"`
	Port               string `json:"port"`
	GitRepo            string `json:"git_repo"`
	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"`
	Domain             string `json:"domain"`
	Port               string `json:"port"`
	GitRepo            string `json:"git_repo"`
	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"`
	DeployMode         string `json:"deploy_mode"`
}

ServiceListLogic 服务列表数据item

type ServiceRepo

type ServiceRepo struct {
}

func GetServiceRepoInst

func GetServiceRepoInst() *ServiceRepo

func (*ServiceRepo) DeleteServices added in v0.3.0

func (r *ServiceRepo) DeleteServices(ctx context.Context, ids []int64) error

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) GetServiceClusters added in v0.2.0

func (r *ServiceRepo) GetServiceClusters(ctx context.Context, serviceName, serviceClusterName string) ([]*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) Update added in v0.3.0

func (r *ServiceRepo) Update(ctx context.Context, serviceName, description, domain, port, gitRepo string) (int64, error)

type TaskRepo

type TaskRepo struct {
}

func GetTaskRepoInst

func GetTaskRepoInst() *TaskRepo

func (*TaskRepo) CountByCond added in v0.2.0

func (r *TaskRepo) CountByCond(ctx context.Context, schedTmplIds []int64, status []string) (int64, error)

func (*TaskRepo) CreateTask

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

func (*TaskRepo) GetBridgXTaskId added in v0.2.0

func (r *TaskRepo) GetBridgXTaskId(ctx context.Context, taskId int64) (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"`
	BridgxCluster  string `json:"bridgx_cluster"`
	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"`
	SuccessCount   int64  `json:"success_count"`
	FailCount      int64  `json:"fail_count"`
	TotalCount     int64  `json:"total_count"`
	TaskStatus     string `json:"task_status"`
	TaskStatusDesc string `json:"task_status_desc"`
	TaskStepDesc   string `json:"task_step_desc"`
	Msg            string `json:"msg"`
}

Directories

Path Synopsis
model
db

Jump to

Keyboard shortcuts

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