serverDomain

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateScriptReq

type CreateScriptReq struct {
	Mode        commConsts.NodeCreateMode `json:"mode"`
	Type        commConsts.NodeCreateType `json:"type"`
	Target      string                    `json:"target"`
	Name        string                    `json:"name"`
	WorkspaceId int                       `json:"workspaceId"`
	ProductId   int                       `json:"productId"`
}

type ExecReq

type ExecReq struct {
	Act commConsts.ExecCmd `json:"act"`

	Seq   string                  `json:"seq"`
	Scope commConsts.ResultStatus `json:"scope"`

	// for ztf testing
	TestSets []TestSet `json:"testSets"`

	ProductId                 int    `json:"productId"`
	ModuleId                  int    `json:"moduleId"`
	SuiteId                   int    `json:"suiteId"`
	TaskId                    int    `json:"taskId"`
	ScriptDirParamFromCmdLine string `json:"-"`

	// for unit, automation testing
	TestTool  commConsts.TestTool  `json:"testTool"`
	BuildTool commConsts.BuildTool `json:"buildTool"`
	Cmd       string               `json:"cmd"`

	SubmitResult bool `json:"submitResult"`
}

type FilterItem

type FilterItem struct {
	Label string `json:"label"`
	Value int    `json:"value"`
}

type HostHeartbeatReq

type HostHeartbeatReq struct {
	MacAddress string `json:"macAddress"`
}

type HostHeartbeatResp

type HostHeartbeatResp struct {
	Token  string `json:"token" yaml:"token"`
	Server string `json:"server" yaml:"server"`
}

type HostResponse

type HostResponse struct {
	Code string      `json:"code"` // Enums consts.ResultCode
	Msg  string      `json:"msg,omitempty"`
	Data interface{} `json:"data,omitempty"`
}

type JobQueryResp

type JobQueryResp struct {
	Created    []*model.Job `json:"created"`
	Inprogress []*model.Job `json:"inprogress"`

	Canceled  []*model.Job `json:"canceled"`
	Completed []*model.Job `json:"completed"`
	Failed    []*model.Job `json:"failed"`
}

type JobReq

type JobReq struct {
	JobId uint `json:"jobId"`

	Name      string `json:"name"`
	CaseIds   []uint `json:"caseIds"`
	ProductId int    `json:"productId"`
	ModuleId  int    `json:"moduleId"`
	SuiteId   int    `json:"suiteId"`
	TaskId    int    `json:"taskId"`
}

type JobResp

type JobResp struct {
	ZentaoId int                  `json:"zentaoId"`
	Status   commConsts.JobStatus `json:"status"` // Enums commConsts.JobStatus
}

type MoveScriptReq

type MoveScriptReq struct {
	DragKey      string             `json:"dragKey"`
	DropKey      string             `json:"dropKey"`
	DropPosition commConsts.DropPos `json:"dropPosition"`
	WorkspaceId  int                `json:"workspaceId"`
}

type PasteScriptReq

type PasteScriptReq struct {
	SrcKey          string                  `json:"srcKey"`
	SrcType         commConsts.TreeNodeType `json:"srcType"`
	SrcWorkspaceId  int                     `json:"srcWorkspaceId"`
	DistKey         string                  `json:"distKey"`
	DistType        commConsts.TreeNodeType `json:"distType"`
	DistWorkspaceId int                     `json:"distWorkspaceId"`

	Action string `json:"action"`
}

type ReqPaginate

type ReqPaginate struct {
	domain.PaginateReq
	Keywords string `json:"keywords"`
	Enabled  string `json:"enabled"`
}

type RpcResult

type RpcResult struct {
	Code    consts.ResultCode `json:"code"`
	Msg     string            `json:"msg"`
	Payload interface{}       `json:"payload"`
}

func (*RpcResult) Fail

func (result *RpcResult) Fail(msg string)

func (*RpcResult) IsSuccess

func (result *RpcResult) IsSuccess() bool

func (*RpcResult) Pass

func (result *RpcResult) Pass(msg string)

type TestAsset

type TestAsset struct {
	Title string `json:"title"`
	Key   string `json:"key"`
	Path  string `json:"path"`

	Type        commConsts.TreeNodeType `json:"type"`
	ModuleId    int                     `json:"moduleId"`
	CaseId      int                     `json:"caseId"`
	Lang        string                  `json:"lang"`
	ScriptCount int                     `json:"scriptCount"`
	Slots       iris.Map                `json:"slots"`

	WorkspaceId   int                 `json:"workspaceId"`
	WorkspaceType commConsts.TestTool `json:"workspaceType"`
	Children      []*TestAsset        `json:"children"`

	Checkable bool `json:"checkable"`
	IsLeaf    bool `json:"isLeaf"`
}

type TestReportSummary

type TestReportSummary struct {
	Name      string               `json:"name"`
	No        string               `json:"no"`
	Seq       string               `json:"seq"`
	Platform  commConsts.OsType    `json:"platform,omitempty"`
	TestType  commConsts.TestType  `json:"testType"`
	TestTool  commConsts.TestTool  `json:"testTool"`
	BuildTool commConsts.BuildTool `json:"buildTool"`

	ProductId     int               `json:"productId,omitempty"`
	WorkspaceId   int               `json:"workspaceId,omitempty"`
	WorkspaceName string            `json:"workspaceName,omitempty"`
	ExecBy        commConsts.ExecBy `json:"execBy,omitempty"`
	ExecById      int               `json:"execById,omitempty"`

	TestScriptName string `json:"testScriptName,omitempty"`

	Pass      int   `json:"pass"`
	Fail      int   `json:"fail"`
	Skip      int   `json:"skip"`
	Total     int   `json:"total"`
	StartTime int64 `json:"startTime"`
	EndTime   int64 `json:"endTime"`
	Duration  int64 `json:"duration"`
}

type TestScript

type TestScript struct {
	Id      int    `json:"id"`
	Version int    `json:"version"`
	Name    string `json:"name"`
	Code    string `json:"code"`
	Desc    string `json:"desc"`
	Lang    string `json:"lang"`

	Path        string `json:"path"`
	WorkspaceId int    `json:"workspaceId"`
}

type TestSet

type TestSet struct {
	Name string `json:"name"`

	WorkspaceId   int                 `json:"workspaceId"`
	WorkspaceType commConsts.TestTool `json:"workspaceType"`
	WorkspacePath string              `json:"workspacePath"`
	Cases         []string            `json:"cases"`

	Seq                       string                  `json:"seq"`
	Scope                     commConsts.ResultStatus `json:"scope"`
	ProductId                 int                     `json:"productId"`
	ModuleId                  int                     `json:"moduleId"`
	SuiteId                   int                     `json:"suiteId"`
	TaskId                    int                     `json:"taskId"`
	ScriptDirParamFromCmdLine string                  `json:"-"`
	ProxyId                   int                     `json:"proxyId"`

	// for unit, automation testing
	TestTool  commConsts.TestTool  `json:"testTool"`
	BuildTool commConsts.BuildTool `json:"buildTool"`
	Cmd       string               `json:"cmd"`

	ResultDir string `json:"resultDir"`
	ZipDir    string `json:"zipDir"`

	SubmitResult bool `json:"submitResult"`
}

type WorkspaceReqPaginate

type WorkspaceReqPaginate struct {
	ReqPaginate

	SiteId    int `json:"siteId"`
	ProductId int `json:"productId"`
}

type ZentaoCancelReq

type ZentaoCancelReq struct {
	Task int `json:"task"`
}

type ZentaoExecReq

type ZentaoExecReq struct {
	Workspace string `json:"workspace"` // workspace absolute path
	Path      string `json:"path"`      // relative path in workspace to find scripts
	Ids       string `json:"ids"`       // zentao case ids
	Cmd       string `json:"cmd"`       // commands to exec before run test cases

	Task int `json:"task"`
}

type ZentaoJobSubmitReq

type ZentaoJobSubmitReq struct {
	Task      int                  `json:"task"`
	Status    commConsts.JobStatus `json:"status"`
	StartTime string               `json:"startTime"`
	EndTime   string               `json:"endTime"`
	RetryTime int                  `json:"retryTime"`
	Error     string               `json:"error"`
	Data      interface{}          `json:"data"`
}

type ZentaoLang

type ZentaoLang struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type ZentaoModule

type ZentaoModule struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type ZentaoProduct

type ZentaoProduct struct {
	Id      int    `json:"id"`
	Name    string `json:"name"`
	Checked bool   `json:"checked"`
}

type ZentaoResp

type ZentaoResp struct {
	Status string
	Data   string
}

type ZentaoRespData

type ZentaoRespData struct {
	Result  string `json:"result"`
	Message string `json:"message"`
}

type ZentaoResultSubmitReq

type ZentaoResultSubmitReq struct {
	Name        string `json:"name"`
	Seq         string `json:"seq"`
	WorkspaceId int    `json:"workspaceId"`
	ProductId   int    `json:"productId"`
	TaskId      int    `json:"taskId"`

	Task int `json:"task"`
}

type ZentaoSite

type ZentaoSite struct {
	Id       int    `json:"id"`
	Name     string `json:"name"`
	Url      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`

	Checked bool `json:"checked"`
}

type ZentaoSuite

type ZentaoSuite struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type ZentaoTask

type ZentaoTask struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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