Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProjectExist = errors.New("项目名称已存在,请重新填写") ErrProjectNotExist = errors.New("项目不存在") ErrProjectName = errors.New("项目英文名不合法") ErrProjectAuditSubmit = errors.New("项目已提交审核,不允许修改") ErrProjectAuditPass = errors.New("项目已审核通过,不允许修改") ErrProjectList = errors.New("项目列表获取错误") ErrTemplateGet = errors.New("模板获取错误") ErrTemplateEncodeGet = errors.New("模板生成错误") ErrProjectTemplateGet = errors.New("项目生成的模版获取错误") ErrProjectTemplateUpdate = errors.New("项目生成的模版更新错误") ErrProjectLanguageJava = errors.New("该项目不是Java语言不需要调整pom.xml文件路径") ErrProjectGet = errors.New("项目读取错误,请重试") ErrProjectDeleteName = errors.New("项目删除失败,项目名不正确") ErrIsInGroupFailed = errors.New("判断是否在组里失败") ErrGroupNoPermission = errors.New("没有相关组的权限") ErrPodDeploymentGet = errors.New("项目获取错误") ErrPodDeploymentPodList = errors.New("项目pods获取错误") ErrParamsMetrics = errors.New("metrics不能为空") )
Functions ¶
func MakeHandler ¶
func MakeHandler(svc Service, logger log.Logger, repository repository.Repository) http.Handler
Types ¶
type Service ¶
type Service interface { // 创建项目step1 Post(ctx context.Context, ns, name, displayName, desc string) (err error) // 创建项目step2 BasicPost(ctx context.Context, name string, req basicRequest) (err error) // 项目列表 todo: 可以考虑定时同步的方案...... 能省很多事 List(ctx context.Context, page, limit int, name string, groupId int64) (res map[string]interface{}, err error) // 根据业务线名称获取业务应用列表 ListByNs(ctx context.Context) (res []map[string]interface{}, err error) // 修改pomfile文件地址 PomFile(ctx context.Context, pomFile string) error // 修改git路径 GitAddr(ctx context.Context, gitAddr string) error // 项目详情页信息 Detail(ctx context.Context) (res map[string]interface{}, err error) // 更新项目信息 Update(ctx context.Context, displayName, desc string) (err error) // Workspace Workspace(ctx context.Context) (res []map[string]interface{}, err error) //工作台展示 // 同步项目信息 Sync(ctx context.Context) (err error) // 删除项目 Delete(ctx context.Context, ns, name, code string) (err error) // 获取配置信息 Config(ctx context.Context) (res map[string]interface{}, err error) // 获取项目监控指标 /project/{ns}/monitor/{projectName}?podName=xxxxx&metrics=memory/request&container Monitor(ctx context.Context, metrics, podName, container string) (res map[string]map[string]map[string][]pods.XYRes, err error) // 告警统计 Alerts(ctx context.Context) (res alertsResponse, err error) }
func NewService ¶
func NewService(logger log.Logger, config *config.Config, redisInterface redis.RedisInterface, k8sClient kubernetes.K8sClient, amqp amqp.AmqpClient, jenkins jenkins.Jenkins, repository repository.Repository, hookQueueSvc hooks.ServiceHookQueue) Service
Click to show internal directories.
Click to hide internal directories.