controller

package
v0.0.0-...-a97389e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCtrl

type BaseCtrl struct {
}

func NewBaseCtrl

func NewBaseCtrl() *BaseCtrl

func (*BaseCtrl) BizErrResp

func (c *BaseCtrl) BizErrResp(err *domain.BizError, msg string) (ret domain.Response)

func (*BaseCtrl) ErrMsg

func (c *BaseCtrl) ErrMsg(err commConsts.ResponseCode, msg string) (ret string)

func (*BaseCtrl) ErrResp

func (c *BaseCtrl) ErrResp(respCode commConsts.ResponseCode, msg string) (ret domain.Response)

func (*BaseCtrl) SuccessResp

func (c *BaseCtrl) SuccessResp(data interface{}) (ret domain.Response)

type ConfigCtrl

type ConfigCtrl struct {
	BaseCtrl
}

func NewConfigCtrl

func NewConfigCtrl() *ConfigCtrl

func (*ConfigCtrl) SetVerbose

func (c *ConfigCtrl) SetVerbose(ctx iris.Context)

type FileCtrl

type FileCtrl struct {
	FileService *service.FileService `inject:""`
	BaseCtrl
}

func NewFileCtrl

func NewFileCtrl() *FileCtrl

func (*FileCtrl) ListDir

func (c *FileCtrl) ListDir(ctx iris.Context)

ListDir 列出目录

func (*FileCtrl) Upload

func (c *FileCtrl) Upload(ctx iris.Context)

Upload 上传文件

type InterpreterCtrl

type InterpreterCtrl struct {
	InterpreterService *service.InterpreterService `inject:""`
	WorkspaceService   *service.WorkspaceService   `inject:""`
	BaseCtrl
}

func NewInterpreterCtrl

func NewInterpreterCtrl() *InterpreterCtrl

func (*InterpreterCtrl) Create

func (c *InterpreterCtrl) Create(ctx iris.Context)

func (*InterpreterCtrl) Delete

func (c *InterpreterCtrl) Delete(ctx iris.Context)

func (*InterpreterCtrl) Get

func (c *InterpreterCtrl) Get(ctx iris.Context)

func (*InterpreterCtrl) GetLangInterpreter

func (c *InterpreterCtrl) GetLangInterpreter(ctx iris.Context)

func (*InterpreterCtrl) GetLangSettings

func (c *InterpreterCtrl) GetLangSettings(ctx iris.Context)

func (*InterpreterCtrl) List

func (c *InterpreterCtrl) List(ctx iris.Context)

func (*InterpreterCtrl) Update

func (c *InterpreterCtrl) Update(ctx iris.Context)

type JobCtrl

type JobCtrl struct {
	JobService *service.JobService `inject:""`
	BaseCtrl
}

func NewJobCtrl

func NewJobCtrl() *JobCtrl

func (*JobCtrl) Add

func (c *JobCtrl) Add(ctx iris.Context)

@summary 添加脚本执行任务 @Accept json @Produce json @Param ZentaoExecReq body serverDomain.ZentaoExecReq true "Zentao Job Add Request Object" @Success 200 {object} domain.Response "code = success | fail" @Router /api/v1/jobs/add [post]

func (*JobCtrl) Cancel

func (c *JobCtrl) Cancel(ctx iris.Context)

@summary 取消脚本执行任务 @Accept json @Produce json @Param ZentaoExecReq body serverDomain.ZentaoCancelReq true "Zentao Job Cancel Request Object" @Success 200 {object} domain.Response "code = success | fail" @Router /api/v1/jobs/cancel [post]

func (*JobCtrl) List

func (c *JobCtrl) List(ctx iris.Context)

@summary 列出执行任务 @Accept json @Produce json @Param status query string true "Status List to Filter like 'created,inprogress'" @Success 200 {object} domain.Response "code = success | fail" @Router /api/v1/jobs/add [post]

type PluginCtrl

type PluginCtrl struct {
	PluginService *service.PluginService `inject:""`
	BaseCtrl
}

func NewPluginCtrl

func NewPluginCtrl() *PluginCtrl

func (*PluginCtrl) Cancel

func (c *PluginCtrl) Cancel(ctx iris.Context)

func (*PluginCtrl) Exec

func (c *PluginCtrl) Exec(ctx iris.Context)

func (*PluginCtrl) Install

func (c *PluginCtrl) Install(ctx iris.Context)

func (*PluginCtrl) Start

func (c *PluginCtrl) Start(ctx iris.Context)

func (*PluginCtrl) Stop

func (c *PluginCtrl) Stop(ctx iris.Context)

func (*PluginCtrl) Uninstall

func (c *PluginCtrl) Uninstall(ctx iris.Context)

type ProxyCtrl

type ProxyCtrl struct {
	ProxyService     *service.ProxyService     `inject:""`
	WorkspaceService *service.WorkspaceService `inject:""`
	BaseCtrl
}

func NewProxyCtrl

func NewProxyCtrl() *ProxyCtrl

func (*ProxyCtrl) Check

func (c *ProxyCtrl) Check(ctx iris.Context)

func (*ProxyCtrl) Create

func (c *ProxyCtrl) Create(ctx iris.Context)

func (*ProxyCtrl) Delete

func (c *ProxyCtrl) Delete(ctx iris.Context)

func (*ProxyCtrl) Get

func (c *ProxyCtrl) Get(ctx iris.Context)

func (*ProxyCtrl) List

func (c *ProxyCtrl) List(ctx iris.Context)

func (*ProxyCtrl) Update

func (c *ProxyCtrl) Update(ctx iris.Context)

type ServerCtrl

type ServerCtrl struct {
	ServerService    *service.ServerService    `inject:""`
	WorkspaceService *service.WorkspaceService `inject:""`
	BaseCtrl
}

func NewServerCtrl

func NewServerCtrl() *ServerCtrl

func (*ServerCtrl) Create

func (c *ServerCtrl) Create(ctx iris.Context)

func (*ServerCtrl) Delete

func (c *ServerCtrl) Delete(ctx iris.Context)

func (*ServerCtrl) Get

func (c *ServerCtrl) Get(ctx iris.Context)

func (*ServerCtrl) List

func (c *ServerCtrl) List(ctx iris.Context)

func (*ServerCtrl) Update

func (c *ServerCtrl) Update(ctx iris.Context)

type SettingsCtrl

type SettingsCtrl struct {
	BaseCtrl
}

func NewSettingsCtrl

func NewSettingsCtrl() *SettingsCtrl

func (*SettingsCtrl) SetLang

func (c *SettingsCtrl) SetLang(ctx iris.Context)

type SiteCtrl

type SiteCtrl struct {
	SiteService *service.SiteService `inject:""`
	BaseCtrl
}

func NewSiteCtrl

func NewSiteCtrl() *SiteCtrl

func (*SiteCtrl) Create

func (c *SiteCtrl) Create(ctx iris.Context)

func (*SiteCtrl) Delete

func (c *SiteCtrl) Delete(ctx iris.Context)

func (*SiteCtrl) Get

func (c *SiteCtrl) Get(ctx iris.Context)

func (*SiteCtrl) List

func (c *SiteCtrl) List(ctx iris.Context)

func (*SiteCtrl) Update

func (c *SiteCtrl) Update(ctx iris.Context)

type TestBugCtrl

type TestBugCtrl struct {
	TestBugService   *service.TestBugService   `inject:""`
	WorkspaceService *service.WorkspaceService `inject:""`
	SiteService      *service.SiteService      `inject:""`
	BaseCtrl
}

func NewTestBugCtrl

func NewTestBugCtrl() *TestBugCtrl

func (*TestBugCtrl) LoadBugs

func (c *TestBugCtrl) LoadBugs(ctx iris.Context)

查询产品下所有bug

func (*TestBugCtrl) PrepareBugData

func (c *TestBugCtrl) PrepareBugData(ctx iris.Context)

func (*TestBugCtrl) Submit

func (c *TestBugCtrl) Submit(ctx iris.Context)

Submit 提交

type TestFilterCtrl

type TestFilterCtrl struct {
	TestFilterService *service.TestFilterService `inject:""`
	BaseCtrl
}

func NewTestFilterCtrl

func NewTestFilterCtrl() *TestFilterCtrl

func (*TestFilterCtrl) ListItems

func (c *TestFilterCtrl) ListItems(ctx iris.Context)

ListItems 获取脚本过滤器的内容列表

type TestResultCtrl

type TestResultCtrl struct {
	TestResultService *service.TestResultService `inject:""`
	StatisticService  *service.StatisticService  `inject:""`
	BaseCtrl
}

func NewTestResultCtrl

func NewTestResultCtrl() *TestResultCtrl

func (*TestResultCtrl) Delete

func (c *TestResultCtrl) Delete(ctx iris.Context)

Delete 删除

func (*TestResultCtrl) DownloadLog

func (c *TestResultCtrl) DownloadLog(ctx iris.Context)

func (*TestResultCtrl) Get

func (c *TestResultCtrl) Get(ctx iris.Context)

Get 详情

func (*TestResultCtrl) GetFailure

func (c *TestResultCtrl) GetFailure(ctx iris.Context)

Get 失败用例信息

func (*TestResultCtrl) GetLatest

func (c *TestResultCtrl) GetLatest(ctx iris.Context)

func (*TestResultCtrl) GetStatistic

func (c *TestResultCtrl) GetStatistic(ctx iris.Context)

Get 统计信息

func (*TestResultCtrl) List

func (c *TestResultCtrl) List(ctx iris.Context)

List 分页列表

func (*TestResultCtrl) MvLog

func (c *TestResultCtrl) MvLog(ctx iris.Context)

func (*TestResultCtrl) Submit

func (c *TestResultCtrl) Submit(ctx iris.Context)

Submit 提交

func (*TestResultCtrl) UpdateStatistic

func (c *TestResultCtrl) UpdateStatistic(ctx iris.Context)

Put 统计信息

type TestScriptCtrl

type TestScriptCtrl struct {
	TestScriptService *service.TestScriptService `inject:""`
	SyncService       *service.SyncService       `inject:""`
	WorkspaceService  *service.WorkspaceService  `inject:""`
	SiteService       *service.SiteService       `inject:""`
	BaseCtrl
}

func NewTestScriptCtrl

func NewTestScriptCtrl() *TestScriptCtrl

func (*TestScriptCtrl) Create

func (c *TestScriptCtrl) Create(ctx iris.Context)

func (*TestScriptCtrl) Delete

func (c *TestScriptCtrl) Delete(ctx iris.Context)

func (*TestScriptCtrl) Extract

func (c *TestScriptCtrl) Extract(ctx iris.Context)

Extract 详情

func (*TestScriptCtrl) Get

func (c *TestScriptCtrl) Get(ctx iris.Context)

Get 详情

func (*TestScriptCtrl) GetCaseIdsFromReport

func (c *TestScriptCtrl) GetCaseIdsFromReport(ctx iris.Context)

Get 根据报告获取用例编号的列表

func (*TestScriptCtrl) List

func (c *TestScriptCtrl) List(ctx iris.Context)

List 列表

func (*TestScriptCtrl) LoadCodeChildren

func (c *TestScriptCtrl) LoadCodeChildren(ctx iris.Context)

LoadCodeChildren 子节点

func (*TestScriptCtrl) Move

func (c *TestScriptCtrl) Move(ctx iris.Context)

func (*TestScriptCtrl) Paste

func (c *TestScriptCtrl) Paste(ctx iris.Context)

func (*TestScriptCtrl) Rename

func (c *TestScriptCtrl) Rename(ctx iris.Context)

func (*TestScriptCtrl) SyncDirToZentao

func (c *TestScriptCtrl) SyncDirToZentao(ctx iris.Context)

func (*TestScriptCtrl) SyncFromZentao

func (c *TestScriptCtrl) SyncFromZentao(ctx iris.Context)

func (*TestScriptCtrl) SyncToZentao

func (c *TestScriptCtrl) SyncToZentao(ctx iris.Context)

func (*TestScriptCtrl) UpdateCode

func (c *TestScriptCtrl) UpdateCode(ctx iris.Context)

func (*TestScriptCtrl) UpdateName

func (c *TestScriptCtrl) UpdateName(ctx iris.Context)

type WebSocketCtrl

type WebSocketCtrl struct {
	Namespace         string
	*websocket.NSConn `stateless:"true"`

	WorkspaceService *service.WorkspaceService `inject:""`
	TestExecService  *service.TestExecService  `inject:""`
}

func NewWebSocketCtrl

func NewWebSocketCtrl() *WebSocketCtrl

func (*WebSocketCtrl) OnChat

func (c *WebSocketCtrl) OnChat(wsMsg websocket.Message) (err error)

OnChat This will call the "OnVisit" event on all clients, including the current one, with the 'newCount' variable.

func (*WebSocketCtrl) OnNamespaceConnected

func (c *WebSocketCtrl) OnNamespaceConnected(wsMsg websocket.Message) error

func (*WebSocketCtrl) OnNamespaceDisconnect

func (c *WebSocketCtrl) OnNamespaceDisconnect(wsMsg websocket.Message) error

OnNamespaceDisconnect This will call the "OnVisit" event on all clients, except the current one, it can't because it's left but for any case use this type of design.

type WorkspaceCtrl

type WorkspaceCtrl struct {
	WorkspaceService *service.WorkspaceService `inject:""`
	ProxyService     *service.ProxyService     `inject:""`
	BaseCtrl
}

func NewWorkspaceCtrl

func NewWorkspaceCtrl() *WorkspaceCtrl

func (*WorkspaceCtrl) Create

func (c *WorkspaceCtrl) Create(ctx iris.Context)

func (*WorkspaceCtrl) Delete

func (c *WorkspaceCtrl) Delete(ctx iris.Context)

Delete 删除

func (*WorkspaceCtrl) DeleteByPath

func (c *WorkspaceCtrl) DeleteByPath(ctx iris.Context)

delete by path

func (*WorkspaceCtrl) Get

func (c *WorkspaceCtrl) Get(ctx iris.Context)

func (*WorkspaceCtrl) List

func (c *WorkspaceCtrl) List(ctx iris.Context)

func (*WorkspaceCtrl) ListByProduct

func (c *WorkspaceCtrl) ListByProduct(ctx iris.Context)

func (*WorkspaceCtrl) Update

func (c *WorkspaceCtrl) Update(ctx iris.Context)

func (*WorkspaceCtrl) UploadScripts

func (c *WorkspaceCtrl) UploadScripts(ctx iris.Context)

UploadFile 上传文件

func (*WorkspaceCtrl) UploadScriptsToProxy

func (c *WorkspaceCtrl) UploadScriptsToProxy(ctx iris.Context)

type ZentaoCtrl

type ZentaoCtrl struct {
	SiteService    *service.SiteService    `inject:""`
	TestBugService *service.TestBugService `inject:""`
	BaseCtrl
}

func NewZentaoCtrl

func NewZentaoCtrl() *ZentaoCtrl

func (*ZentaoCtrl) GetProfile

func (c *ZentaoCtrl) GetProfile(ctx iris.Context)

func (*ZentaoCtrl) ListBugFields

func (c *ZentaoCtrl) ListBugFields(ctx iris.Context)

func (*ZentaoCtrl) ListCase

func (c *ZentaoCtrl) ListCase(ctx iris.Context)

func (*ZentaoCtrl) ListLang

func (c *ZentaoCtrl) ListLang(ctx iris.Context)

func (*ZentaoCtrl) ListModule

func (c *ZentaoCtrl) ListModule(ctx iris.Context)

func (*ZentaoCtrl) ListProduct

func (c *ZentaoCtrl) ListProduct(ctx iris.Context)

func (*ZentaoCtrl) ListSiteAndProduct

func (c *ZentaoCtrl) ListSiteAndProduct(ctx iris.Context)

func (*ZentaoCtrl) ListSuite

func (c *ZentaoCtrl) ListSuite(ctx iris.Context)

func (*ZentaoCtrl) ListTask

func (c *ZentaoCtrl) ListTask(ctx iris.Context)

Jump to

Keyboard shortcuts

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