service

package
v0.0.0-...-add256a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 88 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncryptKey = "docencryptkey123"
)

Variables

View Source
var (
	ErrUserNameOrPassword = errors.New("用户名或密码错误")
)
View Source
var (
	ErrViperEmpty = errors.New("配置服务未初始化")
)
View Source
var (
	JslibsDeclares []string
)

Functions

func CombineVariables

func CombineVariables(shareVariables, envVars, globalVars []domain.GlobalVar) (
	ret map[string]interface{})

func DecimalHB

func DecimalHB(newValue float64, oldValue float64) float64

func DecimalPer

func DecimalPer(number int64, total int64) float64

func GetEarlierDateStartAndEndTime

func GetEarlierDateStartAndEndTime(earlier int64) (startTime string, endTime string)

func GetEarlierDateUntilTodayStartAndEndTime

func GetEarlierDateUntilTodayStartAndEndTime(earlier int64) (startTime string, endTime string)

func GetTodayStartAndEndTime

func GetTodayStartAndEndTime() (startTime string, endTime string)

Types

type AccountService

type AccountService struct {
	UserRepo    *repo.UserRepo           `inject:""`
	LdapService *commService.LdapService `inject:""`
}

func (*AccountService) ForgotPassword

func (s *AccountService) ForgotPassword(tenantId consts.TenantId, usernameOrPassword string) (err error)

func (*AccountService) Login

func (s *AccountService) Login(tenantId consts.TenantId, req v1.LoginReq) (ret v1.LoginResp, err error)

Login 登录

func (*AccountService) Register

func (s *AccountService) Register(tenantId consts.TenantId, req v1.RegisterReq) (err _domain.BizErr)

func (*AccountService) ResetPassword

func (s *AccountService) ResetPassword(tenantId consts.TenantId, req v1.ResetPasswordReq) (err error)

func (*AccountService) UserLogin

func (s *AccountService) UserLogin(tenantId consts.TenantId, req v1.LoginReq) (userId uint, err error)

type AuthService

type AuthService struct {
	AuthRepo *repo2.AuthRepo `inject:""`
}

func (AuthService) AddToken

func (s AuthService) AddToken(tenantId consts.TenantId, name, token, tokenType string, interfaceId, projectId int) (err error)

func (AuthService) GenOAuth2AccessToken

func (s AuthService) GenOAuth2AccessToken(tenantId consts.TenantId, accessTokenURL, clientId, clientSecret, code string) (result iris.Map, err error)

func (AuthService) ListOAuth2Token

func (s AuthService) ListOAuth2Token(tenantId consts.TenantId, projectId int) (pos []model.Auth2Token, err error)

func (AuthService) OAuth2Authorization

func (s AuthService) OAuth2Authorization(tenantId consts.TenantId, req model.DebugInterfaceOAuth20) (result iris.Map, err error)

func (AuthService) RemoveToken

func (s AuthService) RemoveToken(tenantId consts.TenantId, id int) (err error)

type BodyProperties

type BodyProperties struct {
	Type        string        `json:"type"`
	Description string        `json:"description"`
	Format      string        `json:"format"`
	Enum        []interface{} `json:"enum"`
	EnumDesc    string        `json:"enumDesc"`
}

type CategoryService

type CategoryService struct {
	EndpointService     *EndpointService          `inject:""`
	ServeService        *ServeService             `inject:""`
	CategoryRepo        *repo.CategoryRepo        `inject:""`
	EndpointRepo        *repo.EndpointRepo        `inject:""`
	PlanRepo            *repo.PlanRepo            `inject:""`
	ScenarioRepo        *repo.ScenarioRepo        `inject:""`
	ComponentSchemaRepo *repo.ComponentSchemaRepo `inject:""`
	ProjectRepo         *repo.ProjectRepo         `inject:""`
	ServeRepo           *repo.ServeRepo           `inject:""`
}

func (*CategoryService) BatchAddSchemaRoot

func (s *CategoryService) BatchAddSchemaRoot(tenantId consts.TenantId, projectIds []uint) (err error)

func (*CategoryService) BatchAddSchemaRoot1

func (s *CategoryService) BatchAddSchemaRoot1(tenantId consts.TenantId, projectIds []uint) (err error)

func (*CategoryService) Copy

func (s *CategoryService) Copy(tenantId consts.TenantId, targetId, newParentId, userId uint, username string) (category model.Category, err error)

func (*CategoryService) Create

func (s *CategoryService) Create(tenantId consts.TenantId, req v1.CategoryCreateReq) (ret model.Category, err *_domain.BizErr)

func (*CategoryService) Delete

func (s *CategoryService) Delete(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId, id uint) (err error)

func (*CategoryService) Get

func (s *CategoryService) Get(tenantId consts.TenantId, id int) (root model.Category, err error)

func (*CategoryService) GetChildrenNodes

func (s *CategoryService) GetChildrenNodes(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId, categoryId int, nodeType serverConsts.NodeCreateType) (ret []v1.Category, err error)

func (*CategoryService) GetEntities

func (s *CategoryService) GetEntities(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, id uint) (data map[uint]interface{}, err error)

func (*CategoryService) GetEntity

func (s *CategoryService) GetEntity(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, id uint) (data map[string]interface{}, err error)

func (*CategoryService) GetJoinedPath

func (s *CategoryService) GetJoinedPath(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId, categoryId uint) (path string, err error)

func (*CategoryService) GetPartTree

func (s *CategoryService) GetPartTree(nodeId uint, nodes map[uint]*model.Category) (category v1.Category)

func (*CategoryService) GetTree

func (s *CategoryService) GetTree(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId int, nodeType serverConsts.NodeCreateType) (root *v1.Category, err error)

func (*CategoryService) Move

func (s *CategoryService) Move(tenantId consts.TenantId, srcId, targetId uint, pos serverConsts.DropPos, typ serverConsts.CategoryDiscriminator, projectId uint) (
	srcScenarioNode model.Category, err error)

func (*CategoryService) Update

func (s *CategoryService) Update(tenantId consts.TenantId, req v1.CategoryReq) (err error)

func (*CategoryService) UpdateName

func (s *CategoryService) UpdateName(tenantId consts.TenantId, req v1.CategoryReq) (err error)

type CheckpointService

type CheckpointService struct {
	PostConditionRepo *repo.ConditionRepo   `inject:""`
	CheckpointRepo    *repo.CheckpointRepo  `inject:""`
	EnvironmentRepo   *repo.EnvironmentRepo `inject:""`
	ProjectRepo       *repo.ProjectRepo     `inject:""`
	ExtractorRepo     *repo.ExtractorRepo   `inject:""`
	VariableService   *VariableService      `inject:""`
}

func (*CheckpointService) Create

func (s *CheckpointService) Create(tenantId consts.TenantId, checkpoint *model.DebugConditionCheckpoint) (err error)

func (*CheckpointService) Get

func (s *CheckpointService) Get(tenantId consts.TenantId, id uint) (checkpoint model.DebugConditionCheckpoint, err error)

func (*CheckpointService) Update

func (s *CheckpointService) Update(tenantId consts.TenantId, checkpoint *model.DebugConditionCheckpoint) (err error)

type ComponentService

type ComponentService struct {
	ComponentSchemaRepo         *repo.ComponentSchemaRepo         `inject:""`
	ComponentSchemaSecurityRepo *repo.ComponentSchemaSecurityRepo `inject:""`
	CategoryRepo                *repo.CategoryRepo                `inject:""`
}

func (*ComponentService) GetSchemaByServiceId

func (s *ComponentService) GetSchemaByServiceId(serveId int64) (ret _domain.PageData, err error)

func (*ComponentService) SaveSchema

func (s *ComponentService) SaveSchema(req v1.SchemaReq) (interface{}, error)

func (*ComponentService) SaveSchemaSecurity

func (s *ComponentService) SaveSchemaSecurity(req v1.SchemaReq) (interface{}, error)

func (*ComponentService) UpdateRefById

func (s *ComponentService) UpdateRefById(tenantId consts.TenantId, id uint) (err error)

type ConditionService

type ConditionService struct {
	ConditionRepo   *repo.ConditionRepo   `inject:""`
	ExtractorRepo   *repo.ExtractorRepo   `inject:""`
	CheckpointRepo  *repo.CheckpointRepo  `inject:""`
	DatabaseOptRepo *repo.DatabaseOptRepo `inject:""`
	ScriptRepo      *repo.ScriptRepo      `inject:""`
}

func (*ConditionService) Create

func (s *ConditionService) Create(tenantId consts.TenantId, condition *model.DebugCondition) (err error)

func (*ConditionService) Delete

func (s *ConditionService) Delete(tenantId consts.TenantId, reqId uint) (err error)

func (*ConditionService) Disable

func (s *ConditionService) Disable(tenantId consts.TenantId, reqId uint) (err error)

func (*ConditionService) Get

func (s *ConditionService) Get(tenantId consts.TenantId, id uint) (condition model.DebugCondition, err error)

func (*ConditionService) List

func (s *ConditionService) List(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint,
	category consts.ConditionCategory, usedBy consts.UsedBy, src consts.ConditionSrc) (conditions []model.DebugCondition, err error)

func (*ConditionService) Move

func (s *ConditionService) Move(tenantId consts.TenantId, req serverDomain.ConditionMoveReq) (err error)

func (*ConditionService) ResetForCase

func (s *ConditionService) ResetForCase(tenantId consts.TenantId, endpointInterfaceId, debugInterfaceId uint) (err error)

type ConfigService

type ConfigService struct {
	ConfigRepo *repo.ConfigRepo `inject:""`
}

func (*ConfigService) Get

func (s *ConfigService) Get(tenantId consts.TenantId, key string) (value string, err error)

func (*ConfigService) Save

func (s *ConfigService) Save(tenantId consts.TenantId, req model.SysConfig) (err error)

type Data

type Data struct {
	QueryPath           QueryPath     `json:"query_path"`
	EditUID             int           `json:"edit_uid"`
	Status              string        `json:"status"`
	Type                string        `json:"type"`
	ReqBodyIsJSONSchema bool          `json:"req_body_is_json_schema"`
	ResBodyIsJSONSchema bool          `json:"res_body_is_json_schema"`
	APIOpened           bool          `json:"api_opened"`
	Index               int           `json:"index"`
	Tag                 []string      `json:"tag"`
	ID                  int           `json:"_id"`
	Method              string        `json:"method"`
	Title               string        `json:"title"`
	Path                string        `json:"path"`
	ReqParams           []interface{} `json:"req_params"`
	ReqBodyForm         []ReqBodyForm `json:"req_body_form"`
	ReqHeaders          []ReqHeaders  `json:"req_headers"`
	ReqQuery            []ReqQuery    `json:"req_query"`
	ReqBodyType         string        `json:"req_body_type"`
	ResBodyType         string        `json:"res_body_type"`
	ResBody             string        `json:"res_body"`
	ProjectID           int           `json:"project_id"`
	Catid               int           `json:"catid"`
	UID                 int           `json:"uid"`
	AddTime             int           `json:"add_time"`
	UpTime              int           `json:"up_time"`
	V                   int           `json:"__v"`
	Desc                string        `json:"desc"`
	Markdown            string        `json:"markdown"`
	ReqBodyOther        string        `json:"req_body_other"`
	Username            string        `json:"username"`
}

type DataService

type DataService struct {
	SysConfigSource        *source.SysConfigSource        `inject:""`
	SysAgentSource         *source.SysAgentSource         `inject:""`
	DataRepo               *repo.DataRepo                 `inject:""`
	UserRepo               *repo.UserRepo                 `inject:""`
	UserSource             *source.UserSource             `inject:""`
	RoleSource             *source.RoleSource             `inject:""`
	PermSource             *source.PermSource             `inject:""`
	ProjectRoleSource      *source.ProjectRoleSource      `inject:""`
	ProjectPermSource      *source.ProjectPermSource      `inject:""`
	ProjectRolePermSource  *source.ProjectRolePermSource  `inject:""`
	ProjectMenuSource      *source.ProjectMenuSource      `inject:""`
	ProjectRoleMenuSource  *source.ProjectRoleMenuSource  `inject:""`
	MockJsExpressionSource *source.MockJsExpressionSource `inject:""`
	ProjectRolePermService *ProjectRolePermService        `inject:""`
}

func (*DataService) InitDB

func (s *DataService) InitDB(tenantId consts.TenantId, req v1.DataReq) error

InitDB 创建数据库并初始化

type DatabaseConnService

type DatabaseConnService struct {
	DatabaseConnRepo *repo.DatabaseConnRepo `inject:""`
}

func (*DatabaseConnService) Delete

func (s *DatabaseConnService) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DatabaseConnService) Disable

func (s *DatabaseConnService) Disable(tenantId consts.TenantId, id uint) (err error)

func (*DatabaseConnService) Get

func (*DatabaseConnService) List

func (s *DatabaseConnService) List(tenantId consts.TenantId, keywords string, projectId int, ignoreDisabled bool) (ret []model.DatabaseConn, err error)

func (*DatabaseConnService) Save

func (s *DatabaseConnService) Save(tenantId consts.TenantId, po *model.DatabaseConn) (err error)

func (*DatabaseConnService) UpdateName

func (s *DatabaseConnService) UpdateName(tenantId consts.TenantId, req v1.DbConnReq) (err error)

type DatabaseOptService

type DatabaseOptService struct {
	ConditionRepo   *repo.ConditionRepo   `inject:""`
	DatabaseOptRepo *repo.DatabaseOptRepo `inject:""`
	EnvironmentRepo *repo.EnvironmentRepo `inject:""`
}

func (*DatabaseOptService) Get

func (*DatabaseOptService) Update

func (s *DatabaseOptService) Update(tenantId consts.TenantId, opt *model.DebugConditionDatabaseOpt) (err error)

type DatapoolService

type DatapoolService struct {
	DatapoolRepo *repo.DatapoolRepo `inject:""`
}

func (*DatapoolService) Delete

func (s *DatapoolService) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DatapoolService) Disable

func (s *DatapoolService) Disable(tenantId consts.TenantId, id uint) (err error)

func (*DatapoolService) Get

func (s *DatapoolService) Get(tenantId consts.TenantId, id uint) (model.Datapool, error)

func (*DatapoolService) GetByName

func (s *DatapoolService) GetByName(tenantId consts.TenantId, name string, projectId uint) (model.Datapool, error)

func (*DatapoolService) ListForExec

func (s *DatapoolService) ListForExec(tenantId consts.TenantId, projectId uint) (ret domain.Datapools, error interface{})

func (*DatapoolService) Paginate

func (s *DatapoolService) Paginate(tenantId consts.TenantId, req v1.DatapoolReqPaginate) (ret _domain.PageData, err error)

func (*DatapoolService) ReadExcel

func (s *DatapoolService) ReadExcel(pth string) (ret [][]interface{}, err error)

func (*DatapoolService) Save

func (s *DatapoolService) Save(tenantId consts.TenantId, req *model.Datapool, userId uint) (err error)

func (*DatapoolService) Upload

func (s *DatapoolService) Upload(ctx iris.Context, fh *multipart.FileHeader) (ret v1.DatapoolUploadResp, err error)

Upload 上传文件

type DebugInterfaceService

type DebugInterfaceService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	ScenarioInterfaceRepo *repo.ScenarioInterfaceRepo `inject:""`
	DiagnoseInterfaceRepo *repo.DiagnoseInterfaceRepo `inject:""`
	EndpointCaseRepo      *repo.EndpointCaseRepo      `inject:""`

	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeRepo             *repo.ServeRepo             `inject:""`
	ScenarioProcessorRepo *repo.ScenarioProcessorRepo `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`
	ExtractorRepo         *repo.ExtractorRepo         `inject:""`
	CheckpointRepo        *repo.CheckpointRepo        `inject:""`
	EnvironmentRepo       *repo.EnvironmentRepo       `inject:""`

	DebugSceneService        *DebugSceneService        `inject:""`
	ScenarioInterfaceService *ScenarioInterfaceService `inject:""`
	SceneService             *SceneService             `inject:""`
	EnvironmentService       *EnvironmentService       `inject:""`
	DatapoolService          *DatapoolService          `inject:""`
	ServeService             *ServeService             `inject:""`

	ConditionRepo *repo.ConditionRepo `inject:""`
}

func (*DebugInterfaceService) ConvertDebugDataFromEndpointInterface

func (s *DebugInterfaceService) ConvertDebugDataFromEndpointInterface(tenantId consts.TenantId, endpointInterfaceId uint) (debugData domain.DebugData, err error)

func (*DebugInterfaceService) CopyDebugDataPropsFromPo

func (s *DebugInterfaceService) CopyDebugDataPropsFromPo(tenantId consts.TenantId, debugData *domain.DebugData,
	debugInterfacePo *model.DebugInterface, endpointInterface model.EndpointInterface)

func (*DebugInterfaceService) CopyValueFromRequest

func (s *DebugInterfaceService) CopyValueFromRequest(tenantId consts.TenantId, interf *model.DebugInterface, req domain.DebugData) (err error)

func (*DebugInterfaceService) Create

func (s *DebugInterfaceService) Create(tenantId consts.TenantId, req domain.DebugData) (debugInterface model.DebugInterface, err error)

func (*DebugInterfaceService) CreateDefault

func (s *DebugInterfaceService) CreateDefault(tenantId consts.TenantId, src consts.ProcessorInterfaceSrc, projectId uint) (id uint, err error)

func (*DebugInterfaceService) CreateOrUpdate

func (s *DebugInterfaceService) CreateOrUpdate(tenantId consts.TenantId, req domain.DebugData) (debugInterface model.DebugInterface, err error)

func (*DebugInterfaceService) GenSample

func (s *DebugInterfaceService) GenSample(projectId, serveId uint) (ret *model.DebugInterface, err error)

func (*DebugInterfaceService) GetDebugDataFromDebugInterface

func (s *DebugInterfaceService) GetDebugDataFromDebugInterface(tenantId consts.TenantId, debugInterfaceId uint) (debugData domain.DebugData, err error)

func (*DebugInterfaceService) GetDebugDataFromEndpointInterface

func (s *DebugInterfaceService) GetDebugDataFromEndpointInterface(tenantId consts.TenantId, endpointInterfaceId uint) (ret domain.DebugData, err error)

func (*DebugInterfaceService) GetDebugInterfaceByDiagnoseInterface

func (s *DebugInterfaceService) GetDebugInterfaceByDiagnoseInterface(tenantId consts.TenantId, diagnoseInterfaceId uint) (ret domain.DebugData, err error)

func (*DebugInterfaceService) GetDebugInterfaceByEndpointCase

func (s *DebugInterfaceService) GetDebugInterfaceByEndpointCase(tenantId consts.TenantId, endpointCaseId uint) (ret domain.DebugData, err error)

func (*DebugInterfaceService) GetDebugInterfaceByEndpointInterface

func (s *DebugInterfaceService) GetDebugInterfaceByEndpointInterface(tenantId consts.TenantId, endpointInterfaceId uint, fromDefine bool) (ret domain.DebugData, err error)

func (*DebugInterfaceService) GetDebugInterfaceByScenarioInterface

func (s *DebugInterfaceService) GetDebugInterfaceByScenarioInterface(tenantId consts.TenantId, scenarioProcessorId uint) (ret domain.DebugData, err error)

func (*DebugInterfaceService) GetDetail

func (s *DebugInterfaceService) GetDetail(tenantId consts.TenantId, id uint) (ret model.DebugInterface, err error)

func (*DebugInterfaceService) GetEndpointAndServeIdForEndpointInterface

func (s *DebugInterfaceService) GetEndpointAndServeIdForEndpointInterface(tenantId consts.TenantId, endpointInterfaceId uint) (
	endpointId, serveId uint)

func (*DebugInterfaceService) GetScenarioIdForDebugInterface

func (s *DebugInterfaceService) GetScenarioIdForDebugInterface(tenantId consts.TenantId, processorId uint) (
	scenarioId uint)

func (*DebugInterfaceService) Load

func (s *DebugInterfaceService) Load(tenantId consts.TenantId, loadReq domain.DebugInfo) (debugData domain.DebugData, err error)

func (*DebugInterfaceService) LoadCurl

func (s *DebugInterfaceService) LoadCurl(tenantId consts.TenantId, req serverDomain.DiagnoseCurlLoadReq) (ret string, err error)

func (*DebugInterfaceService) LoadForExec

func (s *DebugInterfaceService) LoadForExec(tenantId consts.TenantId, loadReq domain.DebugInfo) (ret agentExec.InterfaceExecObj, err error)

func (*DebugInterfaceService) MergeGlobalParams

func (s *DebugInterfaceService) MergeGlobalParams(globalParams []domain.GlobalParam, selfGlobalParam []model.DebugInterfaceGlobalParam) (ret []domain.GlobalParam)

func (*DebugInterfaceService) SaveAs

func (s *DebugInterfaceService) SaveAs(tenantId consts.TenantId, debugData domain.DebugData, srcDebugInterfaceId uint, srcUsedBy consts.UsedBy) (debugInterface model.DebugInterface, err error)

func (*DebugInterfaceService) Update

func (s *DebugInterfaceService) Update(tenantId consts.TenantId, req domain.DebugData, debugInterfaceId uint) (debugInterface model.DebugInterface, err error)

type DebugInvokeService

type DebugInvokeService struct {
	DebugRepo          *repo.DebugRepo          `inject:""`
	DebugInterfaceRepo *repo.DebugInterfaceRepo `inject:""`
	DebugInvokeRepo    *repo.DebugInvokeRepo    `inject:""`

	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ScenarioRepo          *repo.ScenarioRepo          `inject:""`
	DiagnoseInterfaceRepo *repo.DiagnoseInterfaceRepo `inject:""`
	EndpointCaseRepo      *repo.EndpointCaseRepo      `inject:""`

	DebugInterfaceService *DebugInterfaceService `inject:""`
	ExecConditionService  *ExecConditionService  `inject:""`

	ConditionRepo      *repo.ConditionRepo      `inject:""`
	ExtractorRepo      *repo.ExtractorRepo      `inject:""`
	CheckpointRepo     *repo.CheckpointRepo     `inject:""`
	ScriptRepo         *repo.ScriptRepo         `inject:""`
	DatabaseOptRepo    *repo.DatabaseOptRepo    `inject:""`
	ResponseDefineRepo *repo.ResponseDefineRepo `inject:""`

	ScenarioInterfaceRepo *repo.ScenarioInterfaceRepo `inject:""`
}

func (*DebugInvokeService) Create

func (s *DebugInvokeService) Create(tenantId consts.TenantId, req domain.SubmitDebugResultRequest,
	serveId, scenarioProcessorId, scenarioId, projectId uint) (po model.DebugInvoke, err error)

func (*DebugInvokeService) Delete

func (s *DebugInvokeService) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DebugInvokeService) GetAsInterface

func (s *DebugInvokeService) GetAsInterface(tenantId consts.TenantId, id int) (debugData domain.DebugData,
	resultReq domain.DebugData, resultResp domain.DebugResponse, err error)

func (*DebugInvokeService) GetLastResp

func (s *DebugInvokeService) GetLastResp(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint) (ret iris.Map, err error)

func (*DebugInvokeService) GetLog

func (s *DebugInvokeService) GetLog(tenantId consts.TenantId, invokeId int) (results []interface{}, err error)

func (*DebugInvokeService) GetResult

func (s *DebugInvokeService) GetResult(tenantId consts.TenantId, invokeId int) (results []interface{}, err error)

func (*DebugInvokeService) ListByInterface

func (s *DebugInvokeService) ListByInterface(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint) (invocations []model.DebugInvoke, err error)

func (*DebugInvokeService) SubmitResult

func (s *DebugInvokeService) SubmitResult(tenantId consts.TenantId, req domain.SubmitDebugResultRequest) (invoke model.DebugInvoke, err error)

type DebugSceneService

type DebugSceneService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`
	ScenarioProcessorRepo *repo.ScenarioProcessorRepo `inject:""`
	EnvironmentRepo       *repo.EnvironmentRepo       `inject:""`
	DiagnoseInterfaceRepo *repo.DiagnoseInterfaceRepo `inject:""`
	ProfileRepo           *repo.ProfileRepo           `inject:""`
	ServeRepo             *repo.ServeRepo             `inject:""`

	ShareVarService *ShareVarService `inject:""`

	EnvironmentService *EnvironmentService `inject:""`
}

func (*DebugSceneService) LoadScene

func (s *DebugSceneService) LoadScene(tenantId consts.TenantId, debugData *domain.DebugData, userIdForDisplay, environmentIdForExec uint) (
	baseUrl string, shareVars []domain.GlobalVar, envVars []domain.GlobalVar,
	globalVars []domain.GlobalVar, globalParams []domain.GlobalParam)

func (*DebugSceneService) MergeGlobalParams

func (s *DebugSceneService) MergeGlobalParams(endpointInterfaceGlobalParams []model.EndpointInterfaceGlobalParam, globalParams []domain.GlobalParam) (ret []domain.GlobalParam)

type DiagnoseInterfaceService

type DiagnoseInterfaceService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	DiagnoseInterfaceRepo *repo.DiagnoseInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeRepo             *repo.ServeRepo             `inject:""`
	ScenarioProcessorRepo *repo.ScenarioProcessorRepo `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	ExtractorRepo         *repo.ExtractorRepo         `inject:""`
	CheckpointRepo        *repo.CheckpointRepo        `inject:""`

	DebugInterfaceService *DebugInterfaceService `inject:""`
}

func (*DiagnoseInterfaceService) CopyDebugDataValueFromRequest

func (s *DiagnoseInterfaceService) CopyDebugDataValueFromRequest(tenantId consts.TenantId, interf *model.DiagnoseInterface, req domain.DebugData) (err error)

func (*DiagnoseInterfaceService) CopyValueFromRequest

func (*DiagnoseInterfaceService) Get

func (s *DiagnoseInterfaceService) Get(tenantId consts.TenantId, id int) (ret model.DiagnoseInterface, err error)

func (*DiagnoseInterfaceService) ImportCurl

func (*DiagnoseInterfaceService) ImportInterfaces

func (*DiagnoseInterfaceService) ImportRecordData

func (s *DiagnoseInterfaceService) ImportRecordData(tenantId consts.TenantId, req serverDomain.RecordReq) (err error)

func (*DiagnoseInterfaceService) Load

func (s *DiagnoseInterfaceService) Load(tenantId consts.TenantId, projectId int) (ret []*serverDomain.DiagnoseInterface, err error)

func (*DiagnoseInterfaceService) Move

func (s *DiagnoseInterfaceService) Move(tenantId consts.TenantId, srcId, targetId uint, pos serverConsts.DropPos, projectId uint) (
	srcScenarioNode model.DiagnoseInterface, err error)

func (*DiagnoseInterfaceService) Remove

func (*DiagnoseInterfaceService) Save

type DocumentService

type DocumentService struct {
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ProjectRepo           *repo.ProjectRepo           `inject:""`
	ServeRepo             *repo.ServeRepo             `inject:""`
	EnvironmentRepo       *repo.EnvironmentRepo       `inject:""`
	EndpointDocumentRepo  *repo.EndpointDocumentRepo  `inject:""`
	EndpointSnapshotRepo  *repo.EndpointSnapshotRepo  `inject:""`
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointService       *EndpointService            `inject:""`
	ServeService          *ServeService               `inject:""`
}

func (*DocumentService) Content

func (s *DocumentService) Content(tenantId consts.TenantId, req domain.DocumentReq) (res domain.DocumentRep, err error)

func (*DocumentService) ContentByShare

func (s *DocumentService) ContentByShare(tenantId consts.TenantId, link string) (res domain.DocumentRep, err error)
func (s *DocumentService) DecryptShareLink(tenantId consts.TenantId, link string) (req domain.DocumentShareReq, err error)

func (*DocumentService) FillRefId

func (s *DocumentService) FillRefId(tenantId consts.TenantId, endpoints []*model.Endpoint)
func (s *DocumentService) GenerateShareLink(tenantId consts.TenantId, req domain.DocumentShareReq) (link string, err error)

func (*DocumentService) GetDocumentDetail

func (s *DocumentService) GetDocumentDetail(tenantId consts.TenantId, documentId, endpointId, interfaceId uint) (res map[string]interface{}, err error)

func (*DocumentService) GetDocumentVersionList

func (s *DocumentService) GetDocumentVersionList(tenantId consts.TenantId, projectId uint, needLatest bool) (documents []model.EndpointDocument, err error)

func (*DocumentService) GetEndpoints

func (s *DocumentService) GetEndpoints(tenantId consts.TenantId, projectId *uint, serveIds, endpointIds *[]uint, documentId uint, needDetail bool) (res map[uint][]domain.EndpointReq, err error)

func (*DocumentService) GetEndpointsByShare

func (s *DocumentService) GetEndpointsByShare(tenantId consts.TenantId, projectId, endpointId *uint, serveIds *[]uint, documentId uint) (res map[uint][]domain.EndpointReq, err error)

func (*DocumentService) GetEndpointsInfo

func (s *DocumentService) GetEndpointsInfo(projectId *uint, serveIds *[]uint, endpoints []*model.Endpoint) (res map[uint][]domain.EndpointReq)

func (*DocumentService) GetGlobalVars

func (s *DocumentService) GetGlobalVars(tenantId consts.TenantId, projectId uint) (globalVars []domain.EnvironmentParam)

func (*DocumentService) GetProject

func (s *DocumentService) GetProject(tenantId consts.TenantId, projectId uint) (doc domain.DocumentRep)

func (*DocumentService) GetSchemas

func (s *DocumentService) GetSchemas(tenantId consts.TenantId, projectId uint) (schemas []domain.ServeSchemaReq)

func (*DocumentService) GetSecurities

func (s *DocumentService) GetSecurities(tenantId consts.TenantId, serveIds []uint) (securities map[uint][]domain.ServeSecurityReq)

func (*DocumentService) GetServers

func (s *DocumentService) GetServers(tenantId consts.TenantId, serveIds []uint) (servers map[uint][]domain.ServeServer)

func (*DocumentService) GetServes

func (s *DocumentService) GetServes(tenantId consts.TenantId, serveIds []uint, endpoints map[uint][]domain.EndpointReq) (serves []domain.DocumentServe)

func (*DocumentService) MergeGlobalParams

func (s *DocumentService) MergeGlobalParams(endpointInterface *model.EndpointInterface)

func (*DocumentService) Publish

func (s *DocumentService) Publish(tenantId consts.TenantId, req domain.DocumentVersionReq, projectId uint) (documentId uint, err error)

func (*DocumentService) RemoveSnapshot

func (s *DocumentService) RemoveSnapshot(tenantId consts.TenantId, snapshotId uint) (err error)

func (*DocumentService) UpdateDocument

func (s *DocumentService) UpdateDocument(tenantId consts.TenantId, req domain.UpdateDocumentVersionReq) (err error)

func (*DocumentService) UpdateSnapshotContent

func (s *DocumentService) UpdateSnapshotContent(tenantId consts.TenantId, id uint, endpoint model.Endpoint) (err error)

type EndpointCaseAlternativeService

type EndpointCaseAlternativeService struct {
	EndpointCaseAlternativeRepo *repo.EndpointCaseAlternativeRepo `inject:""`
	EndpointCaseRepo            *repo.EndpointCaseRepo            `inject:""`

	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	CategoryRepo          *repo.CategoryRepo          `inject:""`
	ConditionRepo         *repo.ConditionRepo         `inject:""`

	EndpointCaseService      *EndpointCaseService      `inject:""`
	EndpointService          *EndpointService          `inject:""`
	DebugInterfaceService    *DebugInterfaceService    `inject:""`
	EndpointMockParamService *EndpointMockParamService `inject:""`
	DebugSceneService        *DebugSceneService        `inject:""`

	EnvironmentRepo *repo.EnvironmentRepo `inject:""`
	SceneService    *SceneService         `inject:""`
}

func (*EndpointCaseAlternativeService) CreateBenchmarkCase

func (*EndpointCaseAlternativeService) GenMultiCases

func (*EndpointCaseAlternativeService) GenSingleCase

func (*EndpointCaseAlternativeService) LoadAlternative

func (s *EndpointCaseAlternativeService) LoadAlternative(tenantId consts.TenantId, endpointId uint, method consts.HttpMethod) (
	root casesHelper.AlternativeCase, err error)

func (*EndpointCaseAlternativeService) LoadCasesForExec

func (*EndpointCaseAlternativeService) LoadDebugDataForExec

func (s *EndpointCaseAlternativeService) LoadDebugDataForExec(tenantId consts.TenantId, req casesHelper.AlternativeCase, envId uint) (
	ret domain.DebugData, err error)

func (*EndpointCaseAlternativeService) LoadFactor

func (s *EndpointCaseAlternativeService) LoadFactor(tenantId consts.TenantId, caseId uint) (ret map[string]model.EndpointCaseAlternativeFactor, err error)

func (*EndpointCaseAlternativeService) SaveCase

func (*EndpointCaseAlternativeService) SaveFactor

type EndpointCaseService

type EndpointCaseService struct {
	EndpointCaseRepo      *repo.EndpointCaseRepo      `inject:""`
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ConditionRepo         *repo.ConditionRepo         `inject:""`
	CategoryRepo          *repo.CategoryRepo          `inject:""`

	EndpointService       *EndpointService       `inject:""`
	DebugInterfaceService *DebugInterfaceService `inject:""`
}

func (*EndpointCaseService) Copy

func (s *EndpointCaseService) Copy(tenantId consts.TenantId, id int, newNamePrefix string, newEndpointId, baseCaseId, userId uint, userName,
	forAlternativeCase string) (po model.EndpointCase, err error)

func (*EndpointCaseService) CopyChildrenCases

func (s *EndpointCaseService) CopyChildrenCases(tenantId consts.TenantId, caseId, newCaseId, endpointId, userId uint, username string) (err error)

func (*EndpointCaseService) CopyValueFromRequest

func (s *EndpointCaseService) CopyValueFromRequest(tenantId consts.TenantId, po *model.EndpointCase, req serverDomain.EndpointCaseSaveReq)

func (*EndpointCaseService) Create

func (*EndpointCaseService) EndpointCaseToTo

func (*EndpointCaseService) Get

func (s *EndpointCaseService) Get(tenantId consts.TenantId, id uint) (ret model.EndpointCase, err error)

func (*EndpointCaseService) GetNodeCaseNum

func (s *EndpointCaseService) GetNodeCaseNum(tenantId consts.TenantId, req []*serverDomain.EndpointCaseTree) (ret []*serverDomain.EndpointCaseTree)

func (*EndpointCaseService) GetNodeCaseNumNew

func (s *EndpointCaseService) GetNodeCaseNumNew(tenantId consts.TenantId, node *serverDomain.EndpointCaseTree) (num int64)

func (*EndpointCaseService) List

func (s *EndpointCaseService) List(tenantId consts.TenantId, endpointId uint) (ret []model.EndpointCase, err error)

func (*EndpointCaseService) ListByCaseType

func (s *EndpointCaseService) ListByCaseType(tenantId consts.TenantId, endpointId uint, caseType consts.CaseType) (ret []model.EndpointCase, err error)

func (*EndpointCaseService) LoadTree

func (s *EndpointCaseService) LoadTree(tenantId consts.TenantId, projectId uint, serveIds consts.Integers) (ret []*serverDomain.EndpointCaseTree, err error)

func (*EndpointCaseService) MapToTree

func (s *EndpointCaseService) MapToTree(tenantId consts.TenantId, mapData map[string]*serverDomain.EndpointCaseTree, parentId string) (res []*serverDomain.EndpointCaseTree)

func (*EndpointCaseService) Paginate

func (*EndpointCaseService) Remove

func (s *EndpointCaseService) Remove(tenantId consts.TenantId, id uint) (err error)

func (*EndpointCaseService) SaveFromDebugInterface

func (s *EndpointCaseService) SaveFromDebugInterface(tenantId consts.TenantId, req serverDomain.EndpointCaseSaveReq) (po model.EndpointCase, err error)

func (*EndpointCaseService) UpdateName

func (s *EndpointCaseService) UpdateName(tenantId consts.TenantId, req serverDomain.EndpointCaseSaveReq) (err error)

type EndpointCodeService

type EndpointCodeService struct {
	ServeService *ServeService `inject:""`
}

func (*EndpointCodeService) Generate

func (s *EndpointCodeService) Generate(tenantId consts.TenantId, langType template.LangType, nameRule template.NameRule, projectId uint, data string) (code string)

type EndpointInterfaceService

type EndpointInterfaceService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointService       *EndpointService            `inject:""`
}

func (*EndpointInterfaceService) GenerateFromRequest

func (s *EndpointInterfaceService) GenerateFromRequest(tenantId consts.TenantId, req v1.GenerateFromRequestReq) (requestBody model.EndpointInterfaceRequestBody, err error)

func (*EndpointInterfaceService) GenerateFromResponse

func (s *EndpointInterfaceService) GenerateFromResponse(tenantId consts.TenantId, req v1.GenerateFromResponseReq) (responseBody model.EndpointInterfaceResponseBody, err error)

func (*EndpointInterfaceService) ImportEndpointData

func (s *EndpointInterfaceService) ImportEndpointData(tenantId consts.TenantId, req v1.ImportEndpointDataReq) (err error)

func (*EndpointInterfaceService) Paginate

type EndpointMockCompareService

type EndpointMockCompareService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
}

func (*EndpointMockCompareService) CompareBody

func (s *EndpointMockCompareService) CompareBody(expectRequest model.EndpointMockExpectRequest, contentType consts.HttpContentType,
	body string, bodyForm map[string][]string) (ret bool)

func (*EndpointMockCompareService) CompareString

func (s *EndpointMockCompareService) CompareString(actualValue interface{}, expectValue string,
	comparator consts.ComparisonOperator) (ret bool)

type EndpointMockExpectService

type EndpointMockExpectService struct {
	EndpointMockExpectRepo *repo.EndpointMockExpectRepo `inject:""`
	EndpointInterfaceRepo  *repo.EndpointInterfaceRepo  `inject:""`
	EndpointRepo           *repo.EndpointRepo           `inject:""`
}

func (*EndpointMockExpectService) Copy

func (s *EndpointMockExpectService) Copy(tenantId consts.TenantId, expectId, endpointId uint, username string) (id uint, err error)

func (*EndpointMockExpectService) DeleteById

func (s *EndpointMockExpectService) DeleteById(tenantId consts.TenantId, expectId uint) (err error)

func (*EndpointMockExpectService) Disable

func (s *EndpointMockExpectService) Disable(tenantId consts.TenantId, endpointId uint) (err error)

func (*EndpointMockExpectService) GetDetail

func (s *EndpointMockExpectService) GetDetail(tenantId consts.TenantId, expectId uint) (res model.EndpointMockExpect, err error)

func (*EndpointMockExpectService) GetExpectRequestBodyOptions

func (s *EndpointMockExpectService) GetExpectRequestBodyOptions(tenantId consts.TenantId, endpointInterfaceId uint) (options []string, err error)

func (*EndpointMockExpectService) GetExpectRequestHeaderOptions

func (s *EndpointMockExpectService) GetExpectRequestHeaderOptions(tenantId consts.TenantId, endpointInterfaceId uint) (options []v1.MockExpectRequestOption, err error)

func (*EndpointMockExpectService) GetExpectRequestOptions

func (s *EndpointMockExpectService) GetExpectRequestOptions(tenantId consts.TenantId, endpointInterfaceId uint) (ret v1.MockExpectRequestOptions, err error)

func (*EndpointMockExpectService) GetExpectRequestPathOptions

func (s *EndpointMockExpectService) GetExpectRequestPathOptions(tenantId consts.TenantId, endpointId uint) (options []v1.MockExpectRequestOption, err error)

func (*EndpointMockExpectService) GetExpectRequestQueryOptions

func (s *EndpointMockExpectService) GetExpectRequestQueryOptions(tenantId consts.TenantId, endpointInterfaceId uint) (options []v1.MockExpectRequestOption, err error)

func (*EndpointMockExpectService) InitExpectId

func (s *EndpointMockExpectService) InitExpectId(expect *model.EndpointMockExpect, endpointId uint)

func (*EndpointMockExpectService) List

func (s *EndpointMockExpectService) List(tenantId consts.TenantId, endpointId uint) (res []model.EndpointMockExpect, err error)

func (*EndpointMockExpectService) Save

func (s *EndpointMockExpectService) Save(tenantId consts.TenantId, req model.EndpointMockExpect) (expectId uint, err error)

func (*EndpointMockExpectService) SaveOrder

func (s *EndpointMockExpectService) SaveOrder(tenantId consts.TenantId, req v1.MockExpectIdsReq) (err error)

func (*EndpointMockExpectService) UpdateExpectDisabled

func (s *EndpointMockExpectService) UpdateExpectDisabled(tenantId consts.TenantId, expectId uint, disabled bool) (err error)

func (*EndpointMockExpectService) UpdateExpectName

func (s *EndpointMockExpectService) UpdateExpectName(tenantId consts.TenantId, expectId uint, name string) (err error)

type EndpointMockParamService

type EndpointMockParamService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
}

func (*EndpointMockParamService) GetRealRequestValues

func (s *EndpointMockParamService) GetRealRequestValues(tenantId consts.TenantId, ctx iris.Context,
	endpointInterface model.EndpointInterface, endpoint model.Endpoint) (
	headers []domain.Param, queryParams []domain.Param, pathParams []domain.Param,
	body string, bodyForm map[string][]string, cookies []domain.ExecCookie)

func (*EndpointMockParamService) MatchEndpointByMockPath

func (s *EndpointMockParamService) MatchEndpointByMockPath(tenantId consts.TenantId, mockPath string, endpoint model.Endpoint) (
	pathParamsMap map[string]string, matched bool)

type EndpointMockScriptService

type EndpointMockScriptService struct {
	EndpointMockScriptRepo *repo.EndpointMockScriptRepo `inject:""`
}

func (*EndpointMockScriptService) Copy

func (s *EndpointMockScriptService) Copy(tenantId consts.TenantId, endpointId, newEndpointId uint) (err error)

func (*EndpointMockScriptService) Disable

func (s *EndpointMockScriptService) Disable(tenantId consts.TenantId, endpointId uint) error

func (*EndpointMockScriptService) Get

func (*EndpointMockScriptService) Update

type EndpointService

type EndpointService struct {
	EndpointRepo              *repo.EndpointRepo           `inject:""`
	ServeRepo                 *repo.ServeRepo              `inject:""`
	EndpointInterfaceRepo     *repo.EndpointInterfaceRepo  `inject:""`
	ServeServerRepo           *repo.ServeServerRepo        `inject:""`
	UserRepo                  *repo.UserRepo               `inject:""`
	CategoryRepo              *repo.CategoryRepo           `inject:""`
	DiagnoseInterfaceService  *DiagnoseInterfaceService    `inject:""`
	EndpointTagRepo           *repo.EndpointTagRepo        `inject:""`
	EndpointTagService        *EndpointTagService          `inject:""`
	ServeService              *ServeService                `inject:""`
	MessageService            *MessageService              `inject:""`
	ThirdPartySyncService     *ThirdPartySyncService       `inject:""`
	DebugInterfaceRepo        *repo.DebugInterfaceRepo     `inject:""`
	EnvironmentRepo           *repo.EnvironmentRepo        `inject:""`
	EndpointCaseService       *EndpointCaseService         `inject:""`
	EndpointCaseRepo          *repo.EndpointCaseRepo       `inject:""`
	EndpointMockExpectRepo    *repo.EndpointMockExpectRepo `inject:""`
	EndpointMockExpectService *EndpointMockExpectService   `inject:""`
	EndpointMockScriptService *EndpointMockScriptService   `inject:""`
	EndpointFavoriteRepo      *repo.EndpointFavoriteRepo   `inject:""`
}

func (*EndpointService) AddVersion

func (s *EndpointService) AddVersion(tenantId consts.TenantId, version *model.EndpointVersion) (err error)

func (*EndpointService) BatchDelete

func (s *EndpointService) BatchDelete(tenantId consts.TenantId, ids []uint) (err error)

func (*EndpointService) BatchUpdateByField

func (s *EndpointService) BatchUpdateByField(tenantId consts.TenantId, req v1.BatchUpdateReq) (err error)

func (*EndpointService) Copy

func (s *EndpointService) Copy(tenantId consts.TenantId, nodeId, id, categoryId, userId uint, username string, version string) (res uint, err error)

func (*EndpointService) CopyDataByCategoryId

func (s *EndpointService) CopyDataByCategoryId(tenantId consts.TenantId, targetId, categoryId, userId uint, username string) (err error)

func (*EndpointService) CreateExample

func (s *EndpointService) CreateExample(tenantId consts.TenantId, req v1.CreateExampleReq) (ret interface{}, err error)

func (*EndpointService) DeleteByCategories

func (s *EndpointService) DeleteByCategories(tenantId consts.TenantId, categoryIds []uint) (err error)

func (*EndpointService) DeleteByEndpointIds

func (s *EndpointService) DeleteByEndpointIds(tenantId consts.TenantId, endpointIds []uint) (err error)

func (*EndpointService) DeleteById

func (s *EndpointService) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*EndpointService) Develop

func (s *EndpointService) Develop(tenantId consts.TenantId, id uint) (err error)

func (*EndpointService) DisableById

func (s *EndpointService) DisableById(tenantId consts.TenantId, id uint) (err error)

func (*EndpointService) Favorite

func (s *EndpointService) Favorite(tenantId consts.TenantId, endpointId, userId uint) (ret bool, err error)

func (*EndpointService) FavoriteList

func (s *EndpointService) FavoriteList(tenantId consts.TenantId, projectId, userId uint) (ret []v1.Category, err error)

func (*EndpointService) GetById

func (s *EndpointService) GetById(tenantId consts.TenantId, id uint, version string) (res model.Endpoint)

func (*EndpointService) GetDiff

func (s *EndpointService) GetDiff(tenantId consts.TenantId, endpointId uint) (res v1.EndpointDiffRes, err error)

func (*EndpointService) GetLatestVersion

func (s *EndpointService) GetLatestVersion(tenantId consts.TenantId, endpointId uint) (version string)

func (*EndpointService) GetVersionsByEndpointId

func (s *EndpointService) GetVersionsByEndpointId(tenantId consts.TenantId, endpointId uint) (res []model.EndpointVersion, err error)

func (*EndpointService) IsFavorite

func (s *EndpointService) IsFavorite(tenantId consts.TenantId, endpointId, userId uint) bool

func (*EndpointService) Paginate

func (s *EndpointService) Paginate(tenantId consts.TenantId, req v1.EndpointReqPaginate) (ret _domain.PageData, err error)

func (*EndpointService) Publish

func (s *EndpointService) Publish(tenantId consts.TenantId, id uint) (err error)

func (*EndpointService) Save

func (s *EndpointService) Save(tenantId consts.TenantId, endpoint model.Endpoint) (res map[string]uint, err error)

func (*EndpointService) SaveDiff

func (s *EndpointService) SaveDiff(tenantId consts.TenantId, endpointId uint, isChanged bool, userName string) (err error)

func (*EndpointService) SaveEndpoints

func (s *EndpointService) SaveEndpoints(tenantId consts.TenantId, endpoints []*model.Endpoint, dirs *openapi.Dirs, components map[string]*model.ComponentSchema, req v1.ImportEndpointDataReq) (err error)

func (*EndpointService) SchemaConv

func (s *EndpointService) SchemaConv(tenantId consts.TenantId, interf *model.EndpointInterface, projectId uint)

func (*EndpointService) SchemasConv

func (s *EndpointService) SchemasConv(tenantId consts.TenantId, endpoint *model.Endpoint, components *schemaHelper.Components)

func (*EndpointService) SendEndpointMessage

func (s *EndpointService) SendEndpointMessage(tenantId consts.TenantId, projectId, endpointId, userId uint) (err error)

func (*EndpointService) SyncFromThirdParty

func (s *EndpointService) SyncFromThirdParty(tenantId consts.TenantId, endpointId uint) (err error)

func (*EndpointService) UpdateAdvancedMockDisabled

func (s *EndpointService) UpdateAdvancedMockDisabled(tenantId consts.TenantId, endpointId uint, disabled bool) (err error)

func (*EndpointService) UpdateName

func (s *EndpointService) UpdateName(tenantId consts.TenantId, id uint, name string) (err error)

func (*EndpointService) UpdateStatus

func (s *EndpointService) UpdateStatus(tenantId consts.TenantId, id uint, status int64) (err error)

func (*EndpointService) UpdateTags

func (s *EndpointService) UpdateTags(tenantId consts.TenantId, req v1.EndpointTagReq, projectId uint) (err error)

func (*EndpointService) Yaml

func (s *EndpointService) Yaml(tenantId consts.TenantId, endpoint model.Endpoint) (res *openapi3.T)

type EndpointTagService

type EndpointTagService struct {
	EndpointTagRepo *repo.EndpointTagRepo `inject:""`
}

func (*EndpointTagService) BatchAddEndpointForTag

func (s *EndpointTagService) BatchAddEndpointForTag(tagName string, endpointIds []uint, projectId uint) (err error)

func (*EndpointTagService) Create

func (s *EndpointTagService) Create(tenantId consts.TenantId, name string, projectId uint) (id uint, err error)

func (*EndpointTagService) GetTagIdsNyName

func (s *EndpointTagService) GetTagIdsNyName(tenantId consts.TenantId, tagNames []string, projectId uint) (tagIds []uint, err error)

GetTagIdsNyName 存在的tagName查出来tagId,不存在的写入数据库

func (*EndpointTagService) ListTagsByProject

func (s *EndpointTagService) ListTagsByProject(tenantId consts.TenantId, projectId uint) (tags []model.EndpointTagRel, err error)

type EnvironmentService

type EnvironmentService struct {
	EnvironmentRepo *repo.EnvironmentRepo `inject:""`
	ScenarioRepo    *repo.ScenarioRepo    `inject:""`
	ProjectRepo     *repo.ProjectRepo     `inject:""`
	ServeRepo       *repo.ServeRepo       `inject:""`
	ServeServerRepo *repo.ServeServerRepo `inject:""`

	EndpointRepo          *repo.EndpointRepo          `inject:""`
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
}

func (*EnvironmentService) Change

func (s *EnvironmentService) Change(tenantId consts.TenantId, id, projectId int) (err error)

func (*EnvironmentService) ClearAllVar

func (s *EnvironmentService) ClearAllVar(tenantId consts.TenantId, environmentId uint) (err error)

func (*EnvironmentService) Clone

func (s *EnvironmentService) Clone(tenantId consts.TenantId, id uint) (environment *model.Environment, err error)

func (*EnvironmentService) Copy

func (s *EnvironmentService) Copy(tenantId consts.TenantId, envId int) (err error)

func (*EnvironmentService) Create

func (s *EnvironmentService) Create(tenantId consts.TenantId, env *model.Environment, projectId uint) (err error)

func (*EnvironmentService) CreateVar

func (s *EnvironmentService) CreateVar(tenantId consts.TenantId, po *model.EnvironmentVar) (err error)

func (*EnvironmentService) Delete

func (s *EnvironmentService) Delete(tenantId consts.TenantId, reqId uint) (err error)

func (*EnvironmentService) DeleteEnvironment

func (s *EnvironmentService) DeleteEnvironment(tenantId consts.TenantId, id uint) (err error)

func (*EnvironmentService) DeleteVar

func (s *EnvironmentService) DeleteVar(tenantId consts.TenantId, id uint) (err error)

func (*EnvironmentService) DisableAllShareVar

func (s *EnvironmentService) DisableAllShareVar(interfaceId uint) (err error)

func (*EnvironmentService) DisableShareVar

func (s *EnvironmentService) DisableShareVar(tenantId consts.TenantId, id uint) (err error)

func (*EnvironmentService) Get

func (s *EnvironmentService) Get(tenantId consts.TenantId, id, projectId uint) (env model.Environment, err error)

func (*EnvironmentService) GetGlobalParams

func (s *EnvironmentService) GetGlobalParams(tenantId consts.TenantId, projectId uint) (ret []domain.GlobalParam, err error)

func (*EnvironmentService) GetGlobalVars

func (s *EnvironmentService) GetGlobalVars(tenantId consts.TenantId, projectId uint) (ret []domain.GlobalVar, err error)

func (*EnvironmentService) GetVar

func (s *EnvironmentService) GetVar(tenantId consts.TenantId, id uint) (env model.EnvironmentVar, err error)

func (*EnvironmentService) GetVarsByEnv

func (s *EnvironmentService) GetVarsByEnv(tenantId consts.TenantId, envId uint) (ret []domain.GlobalVar, err error)

func (*EnvironmentService) GetVarsByServer

func (s *EnvironmentService) GetVarsByServer(tenantId consts.TenantId, serverId uint) (ret []domain.GlobalVar, err error)

func (*EnvironmentService) List

func (s *EnvironmentService) List(tenantId consts.TenantId, projectId int) (envs []model.Environment, err error)

func (*EnvironmentService) ListAll

func (s *EnvironmentService) ListAll(tenantId consts.TenantId, projectId uint) (res []model.Environment, err error)

func (*EnvironmentService) ListGlobal

func (s *EnvironmentService) ListGlobal(tenantId consts.TenantId, projectId uint) (res []model.EnvironmentVar, err error)

func (*EnvironmentService) ListParams

func (s *EnvironmentService) ListParams(tenantId consts.TenantId, projectId uint) (ret map[string]interface{}, err error)

func (*EnvironmentService) Save

func (s *EnvironmentService) Save(tenantId consts.TenantId, req v1.EnvironmentReq) (id uint, err error)

func (*EnvironmentService) SaveGlobal

func (s *EnvironmentService) SaveGlobal(tenantId consts.TenantId, projectId uint, req []v1.EnvironmentVariable) (err error)

func (*EnvironmentService) SaveOrder

func (s *EnvironmentService) SaveOrder(tenantId consts.TenantId, req v1.EnvironmentIdsReq) (err error)

func (*EnvironmentService) SaveParams

func (s *EnvironmentService) SaveParams(tenantId consts.TenantId, req v1.EnvironmentParamsReq) (err error)

func (*EnvironmentService) Update

func (s *EnvironmentService) Update(tenantId consts.TenantId, env *model.Environment) (err error)

func (*EnvironmentService) UpdateVar

func (s *EnvironmentService) UpdateVar(tenantId consts.TenantId, po *model.EnvironmentVar) (err error)

type ExecConditionService

type ExecConditionService struct {
	ExtractorRepo   *repo.ExtractorRepo   `inject:""`
	CheckpointRepo  *repo.CheckpointRepo  `inject:""`
	DatabaseOptRepo *repo.DatabaseOptRepo `inject:""`

	ScriptRepo         *repo.ScriptRepo         `inject:""`
	ResponseDefineRepo *repo.ResponseDefineRepo `inject:""`
	ShareVarService    *ShareVarService         `inject:""`
}

func (*ExecConditionService) SavePostConditionResult

func (s *ExecConditionService) SavePostConditionResult(tenantId consts.TenantId, invokeId,
	debugInterfaceId, caseInterfaceId, endpointInterfaceId, serveId, processorId, scenarioId uint, usedBy consts.UsedBy,
	postConditions []domain.InterfaceExecCondition) (err error)

func (*ExecConditionService) SavePreConditionResult

func (s *ExecConditionService) SavePreConditionResult(tenantId consts.TenantId, invokeId,
	debugInterfaceId, caseInterfaceId, endpointInterfaceId, serveId, processorId, scenarioId uint, usedBy consts.UsedBy,
	preConditions []domain.InterfaceExecCondition) (err error)

type ExtractorService

type ExtractorService struct {
	ExtractorRepo *repo.ExtractorRepo `inject:""`
	ConditionRepo *repo.ConditionRepo `inject:""`

	ConditionService *ConditionService `inject:""`
	ShareVarService  *ShareVarService  `inject:""`
}

func (*ExtractorService) Create

func (s *ExtractorService) Create(tenantId consts.TenantId, extractor *model.DebugConditionExtractor) (err error)

func (*ExtractorService) Get

func (s *ExtractorService) Get(tenantId consts.TenantId, id uint) (extractor model.DebugConditionExtractor, err error)

func (*ExtractorService) ListExtractorVariableByInterface

func (s *ExtractorService) ListExtractorVariableByInterface(tenantId consts.TenantId, req domain.DebugInfo) (variables []domain.Variable, err error)

func (*ExtractorService) QuickCreate

func (*ExtractorService) Update

func (s *ExtractorService) Update(tenantId consts.TenantId, extractor *model.DebugConditionExtractor) (err error)

type FavoriteService

type FavoriteService struct {
}

func (*FavoriteService) Save

func (s *FavoriteService) Save()

type ImportService

type ImportService struct {
	EnvironmentRepo *repo.EnvironmentRepo `inject:""`
}

func (*ImportService) Create

func (s *ImportService) Create(interf *model.EndpointInterface) (err error)

func (*ImportService) GenerateEnvironment

func (s *ImportService) GenerateEnvironment(tenantId consts.TenantId, doc openapi3.T, projectId uint) (err error)

func (*ImportService) GenerateInterface

func (s *ImportService) GenerateInterface(doc openapi3.T, targetId, projectId uint) (err error)

func (*ImportService) Import

func (s *ImportService) Import(doc3 openapi3.T, targetId int) (err error)

type JslibService

type JslibService struct {
	JslibRepo *repo.JslibRepo `inject:""`
}

func (*JslibService) Delete

func (s *JslibService) Delete(tenantId consts.TenantId, id uint) (err error)

func (*JslibService) Disable

func (s *JslibService) Disable(tenantId consts.TenantId, id uint) (err error)

func (*JslibService) Get

func (s *JslibService) Get(tenantId consts.TenantId, id uint) (model.SysJslib, error)

func (*JslibService) List

func (s *JslibService) List(tenantId consts.TenantId, keywords string, projectId int) (ret []model.SysJslib, err error)

func (*JslibService) Save

func (s *JslibService) Save(tenantId consts.TenantId, req *model.SysJslib) (err error)

func (*JslibService) UpdateName

func (s *JslibService) UpdateName(tenantId consts.TenantId, req v1.JslibReq) (err error)

type LecangCronService

type LecangCronService struct {
	CronConfigLecangRepo  *repo.CronConfigLecangRepo `inject:""`
	BaseRepo              *repo.BaseRepo             `inject:""`
	ProjectCronRepo       *repo.ProjectCronRepo      `inject:""`
	ProjectCronService    *ProjectCronService        `inject:""`
	ThirdPartySyncService *ThirdPartySyncService     `inject:""`
}

func (*LecangCronService) CallBack

func (s *LecangCronService) CallBack(options map[string]interface{}, err error) func()

func (*LecangCronService) Get

func (s *LecangCronService) Get(tenantId consts.TenantId, id uint) (ret model.CronConfigLecang, err error)

func (*LecangCronService) Run

func (s *LecangCronService) Run(options map[string]interface{}) (f func() error)

func (*LecangCronService) Save

func (s *LecangCronService) Save(tenantId consts.TenantId, req model.CronConfigLecang) (ret uint, err error)

type MessageService

type MessageService struct {
	MessageRepo     *repo.MessageRepo     `inject:""`
	MessageReadRepo *repo.MessageReadRepo `inject:""`
	UserRepo        *repo.UserRepo        `inject:""`
	ProjectRepo     *repo.ProjectRepo     `inject:""`
	ProjectRoleRepo *repo.ProjectRoleRepo `inject:""`
	EndpointRepo    *repo.EndpointRepo    `inject:""`
	BaseRepo        *repo.BaseRepo        `inject:""`
	ProjectService  *ProjectService       `inject:""`
	Cron            *cron.ServerCron      `inject:""`
}

func (*MessageService) Create

func (s *MessageService) Create(tenantId consts.TenantId, req v1.MessageReq) (uint, *_domain.BizErr)

func (*MessageService) GetAuditProjectResultMcsData

func (s *MessageService) GetAuditProjectResultMcsData(tenantId consts.TenantId, auditId uint) (mcsData im.EnterpriseWechatInfoData, err error)

func (*MessageService) GetEndpointMcsData

func (s *MessageService) GetEndpointMcsData(tenantId consts.TenantId, projectId, endpointId uint) (mcsData im.EnterpriseWechatInfoData, err error)

func (*MessageService) GetScope

func (s *MessageService) GetScope(tenantId consts.TenantId, userId uint) (scope map[int][]string)

func (*MessageService) OperateRead

func (s *MessageService) OperateRead(tenantId consts.TenantId, req v1.MessageReadReq) (uint, error)

func (*MessageService) Paginate

func (s *MessageService) Paginate(tenantId consts.TenantId, req v1.MessageReqPaginate, userId uint) (ret _domain.PageData, err error)

func (*MessageService) ReceiveMcsApprovalResult

func (s *MessageService) ReceiveMcsApprovalResult(tenantId consts.TenantId, res v1.McsApprovalResData) (err error)

func (*MessageService) TransferToSendStatus

func (s *MessageService) TransferToSendStatus(status int) (sendStatus consts.MessageSendStatus)

func (*MessageService) UnreadCount

func (s *MessageService) UnreadCount(tenantId consts.TenantId, userId uint) (count int64, err error)

type MockAdvanceService

type MockAdvanceService struct {
	EndpointService     *EndpointService          `inject:""`
	ProjectSettingsRepo *repo.ProjectSettingsRepo `inject:""`

	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`

	EndpointMockExpectRepo    *repo.EndpointMockExpectRepo `inject:""`
	EndpointMockScriptRepo    *repo.EndpointMockScriptRepo `inject:""`
	EndpointMockExpectService *EndpointMockExpectService   `inject:""`
	EndpointMockScriptService *EndpointMockScriptService   `inject:""`

	EndpointMockParamService   *EndpointMockParamService   `inject:""`
	EndpointMockCompareService *EndpointMockCompareService `inject:""`
}

func (*MockAdvanceService) ByAdvanceMock

func (s *MockAdvanceService) ByAdvanceMock(tenantId consts.TenantId, endpointInterface model.EndpointInterface, ctx iris.Context) (
	resp mockGenerator.Response, byAdvance bool)

func (*MockAdvanceService) ByExpect

func (s *MockAdvanceService) ByExpect(tenantId consts.TenantId, endpointInterface model.EndpointInterface, endpoint model.Endpoint, ctx iris.Context) (
	req mockGenerator.Request, resp mockGenerator.Response, byAdvance bool)

func (*MockAdvanceService) ByScript

func (s *MockAdvanceService) ByScript(tenantId consts.TenantId, endpoint model.Endpoint, req mockGenerator.Request, resp *mockGenerator.Response)

func (*MockAdvanceService) GetExpectResult

func (s *MockAdvanceService) GetExpectResult(tenantId consts.TenantId, expect model.EndpointMockExpect) (
	respContent model.EndpointMockExpectResponse, respHeaders []domain.Param)

func (*MockAdvanceService) MatchExpect

func (s *MockAdvanceService) MatchExpect(expectRequestMap map[consts.ParamIn][]model.EndpointMockExpectRequest,
	endpointInterface model.EndpointInterface, endpoint model.Endpoint,
	headerParams []domain.Param, queryParams []domain.Param, pathParams []domain.Param,
	body string, bodyForm map[string][]string, ctx iris.Context) (ret bool)

type MockJsService

type MockJsService struct {
	MockJsRepo *repo.MockJsRepo `inject:""`
}

func (*MockJsService) ListExpressions

func (s *MockJsService) ListExpressions(tenantId consts.TenantId) (pos []serverDomain.MockJsExpression, err error)

type MockRequest

type MockRequest struct {
	ProjectId int `json:"projectCode"`
	ServeId   int `json:"serveCode"`

	EndpointPath        string            `json:"endpointPath"`
	EndpointMethod      consts.HttpMethod `json:"endpointMethod"`
	EndpointInterfaceId uint              `json:"endpointInterfaceId"`

	Code        string                   `json:"code"`
	UseExamples mockData.UseExamplesEnum `json:"endpointInterfaceId"`
}

type MockResponse

type MockResponse struct {
	StatusCode  int                    `json:"statusCode"`
	ContentType string                 `json:"contentType"`
	Data        mockGenerator.Response `json:"data"`
}

type MockService

type MockService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeRepo             *repo.ServeRepo             `inject:""`
	ProjectRepo           *repo.ProjectRepo           `inject:""`

	MockAdvanceService       *MockAdvanceService       `inject:""`
	EndpointService          *EndpointService          `inject:""`
	EndpointMockParamService *EndpointMockParamService `inject:""`
	ProjectSettingsRepo      *repo.ProjectSettingsRepo `inject:""`
	// contains filtered or unexported fields
}

func (*MockService) ByRequest

func (s *MockService) ByRequest(tenantId consts.TenantId, req *MockRequest, ctx iris.Context) (resp mockGenerator.Response, err error)

func (*MockService) FindEndpointInterface

func (s *MockService) FindEndpointInterface(tenantId consts.TenantId, req *MockRequest) (
	endpointInterface model.EndpointInterface, paramsMap map[string]string, err error)

type OpLogService

type OpLogService struct {
}

type ParserHtmlService

type ParserHtmlService struct {
	ParserService     *ParserService     `inject:""`
	XPathService      *XPathService      `inject:""`
	ParserRegxService *ParserRegxService `inject:""`
}

func (*ParserHtmlService) ParseHtml

func (s *ParserHtmlService) ParseHtml(req *v1.ParserRequest) (ret v1.ParserResponse, err error)

type ParserJsonService

type ParserJsonService struct {
	XPathService      *XPathService      `inject:""`
	ParserRegxService *ParserRegxService `inject:""`
	ParserService     *ParserService     `inject:""`
}

func (*ParserJsonService) ParseJson

func (s *ParserJsonService) ParseJson(req *v1.ParserRequest) (ret v1.ParserResponse, err error)

type ParserRegxService

type ParserRegxService struct {
	XPathService  *XPathService  `inject:""`
	ParserService *ParserService `inject:""`
}

func (*ParserRegxService) ParseRegx

func (s *ParserRegxService) ParseRegx(req *v1.ParserRequest) (ret v1.ParserResponse, err error)

type ParserService

type ParserService struct {
	XPathService      *XPathService      `inject:""`
	ParserRegxService *ParserRegxService `inject:""`
}

func (*ParserService) GetRegxResponse

func (s *ParserService) GetRegxResponse(req *v1.ParserRequest) (ret v1.ParserResponse)

func (*ParserService) TestExpr

func (s *ParserService) TestExpr(req *v1.TestExprRequest) (ret v1.TestExprResponse, err error)

type ParserXmlService

type ParserXmlService struct {
	ParserService     *ParserService     `inject:""`
	XPathService      *XPathService      `inject:""`
	ParserRegxService *ParserRegxService `inject:""`
}

func (*ParserXmlService) ParseXml

func (s *ParserXmlService) ParseXml(req *v1.ParserRequest) (ret v1.ParserResponse, err error)

type PermService

type PermService struct {
	PermRepo *repo.PermRepo `inject:""`
}

func (*PermService) Create

func (s *PermService) Create(tenantId consts.TenantId, req v1.PermReq) (uint, error)

Create

func (*PermService) CreatenInBatches

func (s *PermService) CreatenInBatches(tenantId consts.TenantId, perms []model.SysPerm) error

CreatenInBatches

func (*PermService) DeleteById

func (s *PermService) DeleteById(tenantId consts.TenantId, id uint) error

DeleteById

func (*PermService) FindById

func (s *PermService) FindById(tenantId consts.TenantId, id uint) (v1.PermResp, error)

FindById

func (*PermService) FindByNameAndAct

func (s *PermService) FindByNameAndAct(tenantId consts.TenantId, name, act string, ids ...uint) (v1.PermResp, error)

FindByNameAndAct db *gorm.DB name 名称 act 方法 ids 当 ids 的 len = 1 ,排除次 id 数据

func (*PermService) GetPermsForRole

func (s *PermService) GetPermsForRole(tenantId consts.TenantId) ([][]string, error)

GetPermsForRole

func (*PermService) Paginate

func (s *PermService) Paginate(tenantId consts.TenantId, req v1.PermReqPaginate) (data _domain.PageData, err error)

Paginate

func (*PermService) Update

func (s *PermService) Update(tenantId consts.TenantId, id uint, req v1.PermReq) error

Update

type PlanExecService

type PlanExecService struct {
	PlanRepo           *repo.PlanRepo           `inject:""`
	PlanReportRepo     *repo.PlanReportRepo     `inject:""`
	ScenarioReportRepo *repo.ScenarioReportRepo `inject:""`
	TestLogRepo        *repo.LogRepo            `inject:""`
	EnvironmentRepo    *repo.EnvironmentRepo    `inject:""`
	ScenarioNodeRepo   *repo.ScenarioNodeRepo   `inject:""`

	ScenarioExecService *ScenarioExecService `inject:""`

	EnvironmentService *EnvironmentService `inject:""`
	DatapoolService    *DatapoolService    `inject:""`
}

func (*PlanExecService) CombineReport

func (s *PlanExecService) CombineReport(tenantId consts.TenantId, scenarioReport model.ScenarioReport, planReport *model.PlanReport) (err error)

func (*PlanExecService) GetPlanReportNormalData

func (s *PlanExecService) GetPlanReportNormalData(tenantId consts.TenantId, planId, environmentId uint) (ret agentDomain.Report, err error)

func (*PlanExecService) LoadExecData

func (s *PlanExecService) LoadExecData(tenantId consts.TenantId, planId, environmentId int) (ret agentExec.PlanExecObj, err error)

func (*PlanExecService) LoadExecResult

func (s *PlanExecService) LoadExecResult(tenantId consts.TenantId, planId int) (result domain.Report, err error)

func (*PlanExecService) SaveReport

func (s *PlanExecService) SaveReport(tenantId consts.TenantId, planId int, userId uint, result agentDomain.PlanExecResult) (
	report model.PlanReport, err error)

type PlanReportService

type PlanReportService struct {
	ReportRepo *repo2.PlanReportRepo `inject:""`
	LogRepo    *repo2.LogRepo        `inject:""`
}

func (*PlanReportService) DeleteById

func (s *PlanReportService) DeleteById(tenantId consts.TenantId, id uint) error

func (*PlanReportService) GetById

func (s *PlanReportService) GetById(tenantId consts.TenantId, id uint) (report model.PlanReportDetail, err error)

func (*PlanReportService) Paginate

func (s *PlanReportService) Paginate(tenantId consts.TenantId, req v1.PlanReportReqPaginate, projectId int) (ret _domain.PageData, err error)

type PlanService

type PlanService struct {
	PlanRepo        *repo.PlanRepo        `inject:""`
	PlanReportRepo  *repo.PlanReportRepo  `inject:""`
	UserRepo        *repo.UserRepo        `inject:""`
	EnvironmentRepo *repo.EnvironmentRepo `inject:""`
}

func (*PlanService) AddScenarios

func (s *PlanService) AddScenarios(tenantId consts.TenantId, planId uint, scenarioIds []uint) (err error)

func (*PlanService) Clone

func (s *PlanService) Clone(tenantId consts.TenantId, id, userId uint) (ret model.Plan, err error)

func (*PlanService) Create

func (s *PlanService) Create(tenantId consts.TenantId, req model.Plan) (po model.Plan, bizErr *_domain.BizErr)

func (*PlanService) DeleteById

func (s *PlanService) DeleteById(tenantId consts.TenantId, id uint) error

func (*PlanService) GetById

func (s *PlanService) GetById(tenantId consts.TenantId, id uint, detail bool) (ret model.Plan, err error)

func (*PlanService) MoveScenario

func (s *PlanService) MoveScenario(tenantId consts.TenantId, req v1.MoveReq) (err error)

func (*PlanService) NotRelationScenarioList

func (s *PlanService) NotRelationScenarioList(tenantId consts.TenantId, req v1.NotRelationScenarioReqPaginate, projectId int) (ret _domain.PageData, err error)

func (*PlanService) Paginate

func (s *PlanService) Paginate(tenantId consts.TenantId, req v1.PlanReqPaginate, projectId int) (ret _domain.PageData, err error)

func (*PlanService) PlanScenariosPaginate

func (s *PlanService) PlanScenariosPaginate(tenantId consts.TenantId, req v1.PlanScenariosReqPaginate, planId uint) (ret _domain.PageData, err error)

func (*PlanService) RemoveScenario

func (s *PlanService) RemoveScenario(tenantId consts.TenantId, planId int, scenarioId int) (err error)

func (*PlanService) RemoveScenarios

func (s *PlanService) RemoveScenarios(tenantId consts.TenantId, planId int, scenarioIds []uint) (err error)

func (*PlanService) StatusDropDownOptions

func (s *PlanService) StatusDropDownOptions() map[consts.TestStatus]string

func (*PlanService) TestStageDropDownOptions

func (s *PlanService) TestStageDropDownOptions() map[consts.TestStage]string

func (*PlanService) Update

func (s *PlanService) Update(tenantId consts.TenantId, req model.Plan) error

type PrefixedLogger

type PrefixedLogger struct {
	Prefix string
}

func (*PrefixedLogger) Log

func (s *PrefixedLogger) Log(msg string)

type ProcessorDataService

type ProcessorDataService struct {
}

func (*ProcessorDataService) Upload

func (s *ProcessorDataService) Upload(ctx iris.Context, fh *multipart.FileHeader) (ret v1.ProcessorDataUploadResp, err error)

Upload 上传文件

type ProjectCronService

type ProjectCronService struct {
	ProjectCronRepo      *repo.ProjectCronRepo      `inject:""`
	CronConfigLecangRepo *repo.CronConfigLecangRepo `inject:""`
	ProjectSettingsRepo  *repo.ProjectSettingsRepo  `inject:""`
	BaseRepo             *repo.BaseRepo             `inject:""`
	LecangCronService    *LecangCronService         `inject:""`
	SwaggerCron          *SwaggerCron               `inject:""`
	ServerCron           *cron.ServerCron           `inject:""`
}

func (*ProjectCronService) Clone

func (s *ProjectCronService) Clone(tenantId consts.TenantId, id, userId uint) (ret model.ProjectCron, err error)

func (*ProjectCronService) Delete

func (s *ProjectCronService) Delete(tenantId consts.TenantId, id uint) (err error)

func (*ProjectCronService) Get

func (s *ProjectCronService) Get(tenantId consts.TenantId, id uint) (ret model.ProjectCron, err error)

func (*ProjectCronService) GetTaskId

func (s *ProjectCronService) GetTaskId(source string, taskId string, tenantId consts.TenantId) string

func (*ProjectCronService) ListAllCron

func (s *ProjectCronService) ListAllCron(tenantId consts.TenantId) (res []model.ProjectCron, err error)

func (*ProjectCronService) Paginate

func (s *ProjectCronService) Paginate(tenantId consts.TenantId, req v1.ProjectCronReqPaginate) (ret _domain.PageData, err error)

func (*ProjectCronService) Save

func (s *ProjectCronService) Save(tenantId consts.TenantId, req model.ProjectCron) (ret model.ProjectCron, err error)

func (*ProjectCronService) UpdateCronExecTimeById

func (s *ProjectCronService) UpdateCronExecTimeById(tenantId consts.TenantId, configId string, source consts.CronSource, err error) error

func (*ProjectCronService) UpdateExecErr

func (s *ProjectCronService) UpdateExecErr(tenantId consts.TenantId, id uint, execErr string) (err error)

func (*ProjectCronService) UpdateExecStatusRunning

func (s *ProjectCronService) UpdateExecStatusRunning(tenantId consts.TenantId, taskId string, source consts.CronSource) error

func (*ProjectCronService) UpdateSwitchStatus

func (s *ProjectCronService) UpdateSwitchStatus(tenantId consts.TenantId, id uint, switchStatus consts.SwitchStatus) (err error)

type ProjectMenuService

type ProjectMenuService struct {
	ProjectRepo      *repo.ProjectRepo         `inject:""`
	ProjectMenuRepo  *repo.ProjectMenuRepo     `inject:""`
	ProjectRoleRepo  *repo.ProjectRoleRepo     `inject:""`
	UserRepo         *repo.UserRepo            `inject:""`
	RemoteService    *leyan.RemoteService      `inject:""`
	PrivilegeService *service.PrivilegeService `inject:""`
	RoleService      *RoleService              `inject:""`
}

func (*ProjectMenuService) GetAll

func (s *ProjectMenuService) GetAll(tenantId consts.TenantId, userId, projectRoleId uint, needSysAuth bool) (ret []string, err error)

func (*ProjectMenuService) GetUserMenuList

func (s *ProjectMenuService) GetUserMenuList(tenantId consts.TenantId, projectId, userId uint) (ret []model.ProjectMenu, err error)

func (*ProjectMenuService) GetUserMenuListNew

func (s *ProjectMenuService) GetUserMenuListNew(tenantId consts.TenantId, projectId, userId uint, userName string, needSysAuth bool) (ret []string, err error)

type ProjectRecentlyVisitedService

type ProjectRecentlyVisitedService struct {
	ProjectRecentlyVisitedRepo *repo.ProjectRecentlyVisitedRepo `inject:""`
}

func (*ProjectRecentlyVisitedService) Create

func (s *ProjectRecentlyVisitedService) Create(tenantId consts.TenantId, userId, projectId uint) (uint, error)

type ProjectRolePermService

type ProjectRolePermService struct {
	ProjectRepo         *repo.ProjectRepo         `inject:""`
	ProjectRolePermRepo *repo.ProjectRolePermRepo `inject:""`
	ProjectRoleRepo     *repo.ProjectRoleRepo     `inject:""`
	ProjectRoleMenuRepo *repo.ProjectRoleMenuRepo `inject:""`
	ProfileRepo         *repo.ProfileRepo         `inject:""`
	RemoteService       *leyan.RemoteService      `inject:""`
}

func (*ProjectRolePermService) AllRoleList

func (s *ProjectRolePermService) AllRoleList(tenantId consts.TenantId) (data []model.ProjectRole, err error)

func (*ProjectRolePermService) BatchCreateSpaceRole

func (s *ProjectRolePermService) BatchCreateSpaceRole(tenantId consts.TenantId, roleValueMap map[string]integrationDomain.SpaceRole, notExistedRoles []string) (err error)

func (*ProjectRolePermService) ComplementRoleFromOther

func (s *ProjectRolePermService) ComplementRoleFromOther(tenantId consts.TenantId, allRoleArr []string, roleValueMap map[string]integrationDomain.SpaceRole) (err error)

func (*ProjectRolePermService) DealSpaceRoles

func (s *ProjectRolePermService) DealSpaceRoles(spaceRoles []integrationDomain.SpaceRole) (res []integrationDomain.SpaceRole)

func (*ProjectRolePermService) GetAllRoleValueMap

func (s *ProjectRolePermService) GetAllRoleValueMap(spaceRoles []integrationDomain.SpaceRole) (allRoleArr []string, roleValueMap map[string]integrationDomain.SpaceRole, err error)

func (*ProjectRolePermService) GetProjectUserRole

func (s *ProjectRolePermService) GetProjectUserRole(tenantId consts.TenantId, userId, projectId uint) (data model.ProjectRole, err error)

func (*ProjectRolePermService) GetRoleFromOther

func (s *ProjectRolePermService) GetRoleFromOther(tenantId consts.TenantId) (data []model.ProjectRole, err error)

func (*ProjectRolePermService) GetRoleListFromOther

func (s *ProjectRolePermService) GetRoleListFromOther(tenantId consts.TenantId, spaceRoles []integrationDomain.SpaceRole) (data []model.ProjectRole)

func (*ProjectRolePermService) GetRoleListMap

func (s *ProjectRolePermService) GetRoleListMap(tenantId consts.TenantId) (res map[consts.RoleType]model.ProjectRole, err error)

func (*ProjectRolePermService) GetRolesNotExisted

func (s *ProjectRolePermService) GetRolesNotExisted(tenantId consts.TenantId, allRoleArr []string) (notExistedRoles []string, err error)

func (*ProjectRolePermService) PaginateRolePerms

func (s *ProjectRolePermService) PaginateRolePerms(tenantId consts.TenantId, req v1.ProjectRolePermPaginateReq) (ret _domain.PageData, err error)

func (*ProjectRolePermService) PaginateUserPerms

func (s *ProjectRolePermService) PaginateUserPerms(tenantId consts.TenantId, req v1.ProjectUserPermsPaginate, userId uint) (ret _domain.PageData, err error)

type ProjectService

type ProjectService struct {
	ProjectRepo               *repo.ProjectRepo                  `inject:""`
	ServeRepo                 *repo.ServeRepo                    `inject:""`
	UserRepo                  *repo.UserRepo                     `inject:""`
	ProjectRoleRepo           *repo.ProjectRoleRepo              `inject:""`
	MessageRepo               *repo.MessageRepo                  `inject:""`
	BaseRepo                  *repo.BaseRepo                     `inject:""`
	IntegrationRepo           *repo.IntegrationRepo              `inject:""`
	RemoteService             *leyan.RemoteService               `inject:""`
	MessageService            *MessageService                    `inject:""`
	UserService               *UserService                       `inject:""`
	IntegrationProjectService *integrationService.ProjectService `inject:""`
}

func (*ProjectService) AllProjectList

func (s *ProjectService) AllProjectList(tenantId consts.TenantId, username string) (res []model.Project, err error)

func (*ProjectService) Apply

func (s *ProjectService) Apply(tenantId consts.TenantId, req v1.ApplyProjectReq) (err error)

func (*ProjectService) Audit

func (s *ProjectService) Audit(tenantId consts.TenantId, id, auditUserId uint, status consts.AuditStatus) (err error)

func (*ProjectService) AuditList

func (s *ProjectService) AuditList(tenantId consts.TenantId, req v1.AuditProjectPaginate) (data _domain.PageData, err error)

func (*ProjectService) AuditUsers

func (s *ProjectService) AuditUsers(tenantId consts.TenantId, projectId uint) (data []model.SysUser, err error)

func (*ProjectService) ChangeProject

func (s *ProjectService) ChangeProject(tenantId consts.TenantId, projectId, userId uint) (err error)

func (*ProjectService) CheckProjectAndUser

func (s *ProjectService) CheckProjectAndUser(tenantId consts.TenantId, shortName string, userId uint) (project model.Project, userInProject bool, err error)

func (*ProjectService) Create

func (s *ProjectService) Create(tenantId consts.TenantId, req v1.ProjectReq, userId uint) (id uint, err _domain.BizErr)

func (*ProjectService) CreateProjectForThirdParty

func (s *ProjectService) CreateProjectForThirdParty(tenantId consts.TenantId, project integrationDomain.ProjectInfo) (projectId uint, err error)

func (*ProjectService) DeleteById

func (s *ProjectService) DeleteById(tenantId consts.TenantId, id uint) error

func (*ProjectService) Get

func (s *ProjectService) Get(tenantId consts.TenantId, id uint) (model.Project, error)

func (*ProjectService) GetByUser

func (s *ProjectService) GetByUser(tenantId consts.TenantId, userId uint) (projects []model.ProjectMemberRole, currProject model.Project, recentProjects []model.Project, err error)

func (*ProjectService) GetCurrProjectByUser

func (s *ProjectService) GetCurrProjectByUser(tenantId consts.TenantId, userId uint) (currProject model.Project, err error)

func (*ProjectService) GetProjectRole

func (s *ProjectService) GetProjectRole(tenantId consts.TenantId, username, projectCode string) (role string, err error)

func (*ProjectService) Members

func (s *ProjectService) Members(tenantId consts.TenantId, req v1.ProjectReqPaginate, projectId int) (data _domain.PageData, err error)

func (*ProjectService) Paginate

func (s *ProjectService) Paginate(tenantId consts.TenantId, req v1.ProjectReqPaginate, userId uint) (ret _domain.PageData, err error)

func (*ProjectService) RemoveMember

func (s *ProjectService) RemoveMember(tenantId consts.TenantId, req v1.ProjectMemberRemoveReq) (err error)

func (*ProjectService) Update

func (s *ProjectService) Update(tenantId consts.TenantId, req v1.ProjectReq) (err error)

func (*ProjectService) UpdateMemberRole

func (s *ProjectService) UpdateMemberRole(tenantId consts.TenantId, req v1.UpdateProjectMemberReq) (err error)

type ProjectSettingsService

type ProjectSettingsService struct {
	ServeRepo                *repo.ServeRepo             `inject:""`
	ProjectSettingsRepo      *repo.ProjectSettingsRepo   `inject:""`
	EndpointRepo             *repo.EndpointRepo          `inject:""`
	EndpointInterfaceRepo    *repo.EndpointInterfaceRepo `inject:""`
	Cron                     *cron.ServerCron            `inject:""`
	EndpointInterfaceService *EndpointInterfaceService   `inject:""`
}

func (*ProjectSettingsService) AddSwaggerCron

func (s *ProjectSettingsService) AddSwaggerCron(tenantId consts.TenantId, item model.SwaggerSync)

func (*ProjectSettingsService) GetMock

func (s *ProjectSettingsService) GetMock(tenantId consts.TenantId, projectId uint) (data model.ProjectMockSetting, err error)

func (*ProjectSettingsService) GetSwaggerSyncById

func (s *ProjectSettingsService) GetSwaggerSyncById(tenantId consts.TenantId, id uint) (data model.SwaggerSync, err error)

func (*ProjectSettingsService) SaveMock

func (s *ProjectSettingsService) SaveMock(tenantId consts.TenantId, req v1.MockReq) (ret model.ProjectMockSetting, err error)

func (*ProjectSettingsService) SaveSwaggerSync

func (s *ProjectSettingsService) SaveSwaggerSync(tenantId consts.TenantId, req v1.SwaggerSyncReq) (data model.SwaggerSync, err error)

func (*ProjectSettingsService) SwaggerSyncDetail

func (s *ProjectSettingsService) SwaggerSyncDetail(tenantId consts.TenantId, projectId uint) (data model.SwaggerSync, err error)

func (*ProjectSettingsService) SwaggerSyncList

func (s *ProjectSettingsService) SwaggerSyncList(tenantId consts.TenantId) (data []model.SwaggerSync, err error)

func (*ProjectSettingsService) UpdateSwaggerSyncExecTimeById

func (s *ProjectSettingsService) UpdateSwaggerSyncExecTimeById(tenantId consts.TenantId, id uint) (err error)

type QueryPath

type QueryPath struct {
	Path   string        `json:"path"`
	Params []interface{} `json:"params"`
}

type ReqBodyForm

type ReqBodyForm struct {
	Required string `json:"required"`
	ID       string `json:"_id"`
	Name     string `json:"name"`
	Desc     string `json:"desc"`
	Type     string `json:"type"`
}

type ReqBodyOther

type ReqBodyOther struct {
	Type       string                 `json:"type"`
	Properties map[string]interface{} `json:"properties"`
	Title      string                 `json:"title"`
	Ref        string                 `json:"$$ref"`
	Required   []string               `json:"required"`
}

type ReqHeaders

type ReqHeaders struct {
	Required string `json:"required"`
	ID       string `json:"_id"`
	Name     string `json:"name"`
	Value    string `json:"value"`
}

type ReqQuery

type ReqQuery struct {
	Required string `json:"required"`
	ID       string `json:"_id"`
	Name     string `json:"name"`
	Desc     string `json:"desc"`
}

type ResponseDefineService

type ResponseDefineService struct {
	ResponseDefineRepo *repo.ResponseDefineRepo `inject:""`
}

func (*ResponseDefineService) Update

func (s *ResponseDefineService) Update(tenantId consts.TenantId, id uint, disabled bool, code string) (err error)

type RoleService

type RoleService struct {
	RoleRepo *repo.RoleRepo `inject:""`
	UserRepo *repo.UserRepo `inject:""`
}

func (*RoleService) AddPermForRole

func (s *RoleService) AddPermForRole(tenantId consts.TenantId, id uint, perms [][]string) error

AddPermForRole

func (*RoleService) AllRoleList

func (s *RoleService) AllRoleList(tenantId consts.TenantId) ([]v1.RoleResp, error)

func (*RoleService) Create

func (s *RoleService) Create(tenantId consts.TenantId, req v1.RoleReq) (uint, error)

func (*RoleService) DeleteById

func (s *RoleService) DeleteById(tenantId consts.TenantId, id uint) error

func (*RoleService) FindById

func (s *RoleService) FindById(tenantId consts.TenantId, id uint) (v1.RoleResp, error)

func (*RoleService) FindByName

func (s *RoleService) FindByName(tenantId consts.TenantId, name string, ids ...uint) (v1.RoleResp, error)

FindByName

func (*RoleService) FindInId

func (s *RoleService) FindInId(tenantId consts.TenantId, ids []string) ([]v1.RoleResp, error)

func (*RoleService) GetAuthByEnv

func (s *RoleService) GetAuthByEnv(tenantId consts.TenantId, userId uint) (res []string, err error)

func (*RoleService) GetRoleIds

func (s *RoleService) GetRoleIds(tenantId consts.TenantId) ([]uint, error)

func (*RoleService) GetRoleMenuConfig

func (s *RoleService) GetRoleMenuConfig(roles []string) (menus []string, err error)

func (*RoleService) IsAdminRole

func (s *RoleService) IsAdminRole(tenantId consts.TenantId, id uint) (bool, error)

func (*RoleService) Paginate

func (s *RoleService) Paginate(tenantId consts.TenantId, req v1.RoleReqPaginate) (ret _domain.PageData, err error)

Paginate

func (*RoleService) Update

func (s *RoleService) Update(tenantId consts.TenantId, id uint, req v1.RoleReq) error

type SaasService

type SaasService struct {
	SassRepo *repo.SaasRepo `inject:""`
}

func (*SaasService) GetUserList

func (s *SaasService) GetUserList(tenantId consts.TenantId) (data interface{}, err error)

type ScenarioExecService

type ScenarioExecService struct {
	ScenarioRepo          *repo.ScenarioRepo          `inject:""`
	ScenarioProcessorRepo *repo.ScenarioProcessorRepo `inject:""`
	ScenarioNodeRepo      *repo.ScenarioNodeRepo      `inject:""`
	ScenarioReportRepo    *repo.ScenarioReportRepo    `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	TestLogRepo           *repo.LogRepo               `inject:""`
	EnvironmentRepo       *repo.EnvironmentRepo       `inject:""`

	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`

	DebugInvokeService    *DebugInvokeService    `inject:""`
	SceneService          *SceneService          `inject:""`
	EnvironmentService    *EnvironmentService    `inject:""`
	DatapoolService       *DatapoolService       `inject:""`
	ScenarioNodeService   *ScenarioNodeService   `inject:""`
	ScenarioReportService *ScenarioReportService `inject:""`

	ExecConditionService *ExecConditionService `inject:""`
}

func (*ScenarioExecService) GenerateReport

func (s *ScenarioExecService) GenerateReport(tenantId consts.TenantId, scenarioId int, userId uint, rootResult execDomain.ScenarioExecResult) (report model.ScenarioReport, err error)

func (*ScenarioExecService) GetScenarioNormalData

func (s *ScenarioExecService) GetScenarioNormalData(tenantId consts.TenantId, id, environmentId uint) (ret execDomain.Report, err error)

func (*ScenarioExecService) LoadExecData

func (s *ScenarioExecService) LoadExecData(tenantId consts.TenantId, scenarioId, environmentId uint) (ret agentExec.ScenarioExecObj, err error)

func (*ScenarioExecService) LoadExecResult

func (s *ScenarioExecService) LoadExecResult(tenantId consts.TenantId, scenarioId int) (result domain.Report, err error)

func (*ScenarioExecService) SaveReport

func (s *ScenarioExecService) SaveReport(tenantId consts.TenantId, scenarioId int, userId uint, rootResult execDomain.ScenarioExecResult) (report model.ScenarioReport, err error)

type ScenarioInterfaceService

type ScenarioInterfaceService struct {
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	ScenarioInterfaceRepo *repo.ScenarioInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeRepo             *repo.ServeRepo             `inject:""`
	ScenarioProcessorRepo *repo.ScenarioProcessorRepo `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`
	DiagnoseInterfaceRepo *repo.DiagnoseInterfaceRepo `inject:""`
	EndpointCaseRepo      *repo.EndpointCaseRepo      `inject:""`
	DebugInvokeRepo       *repo.DebugInvokeRepo       `inject:""`

	ScenarioNodeService   *ScenarioNodeService   `inject:""`
	DebugSceneService     *DebugSceneService     `inject:""`
	DebugInterfaceService *DebugInterfaceService `inject:""`
	SceneService          *SceneService          `inject:""`
	EnvironmentService    *EnvironmentService    `inject:""`
	DatapoolService       *DatapoolService       `inject:""`
	EndpointCaseService   *EndpointCaseService   `inject:""`
}

func (*ScenarioInterfaceService) GetDebugDataFromScenarioInterface

func (s *ScenarioInterfaceService) GetDebugDataFromScenarioInterface(tenantId consts.TenantId, scenarioInterfaceId uint) (req domain.DebugData, err error)

func (*ScenarioInterfaceService) ResetDebugData

func (s *ScenarioInterfaceService) ResetDebugData(tenantId consts.TenantId, scenarioProcessorId int, createBy uint) (
	newProcessor model.Processor, err error)

func (*ScenarioInterfaceService) SaveDebugData

func (s *ScenarioInterfaceService) SaveDebugData(tenantId consts.TenantId, req domain.DebugData) (debug model.DebugInterface, err error)

func (*ScenarioInterfaceService) SetProps

func (s *ScenarioInterfaceService) SetProps(tenantId consts.TenantId,
	endpointInterface model.EndpointInterface, scenarioInterfacePo *model.DebugInterface, debugData *domain.DebugData)

type ScenarioNodeService

type ScenarioNodeService struct {
	ScenarioNodeRepo         *repo.ScenarioNodeRepo      `inject:""`
	ScenarioProcessorRepo    *repo.ScenarioProcessorRepo `inject:""`
	ScenarioProcessorService *ScenarioProcessorService   `inject:""`
	ScenarioRepo             *repo.ScenarioRepo          `inject:""`
	DebugInterfaceRepo       *repo.DebugInterfaceRepo    `inject:""`
	EndpointRepo             *repo.EndpointRepo          `inject:""`
	EndpointInterfaceRepo    *repo.EndpointInterfaceRepo `inject:""`
	ExtractorRepo            *repo.ExtractorRepo         `inject:""`
	CheckpointRepo           *repo.CheckpointRepo        `inject:""`
	ServeServerRepo          *repo.ServeServerRepo       `inject:""`

	DebugInterfaceService    *DebugInterfaceService    `inject:""`
	DiagnoseInterfaceService *DiagnoseInterfaceService `inject:""`
}

func (*ScenarioNodeService) AddInterfacesFromCase

func (s *ScenarioNodeService) AddInterfacesFromCase(tenantId consts.TenantId, req serverDomain.ScenarioAddCasesFromTreeReq) (ret model.Processor, err error)

func (*ScenarioNodeService) AddInterfacesFromDefine

func (s *ScenarioNodeService) AddInterfacesFromDefine(tenantId consts.TenantId, req serverDomain.ScenarioAddInterfacesReq) (ret model.Processor, err error)

func (*ScenarioNodeService) AddInterfacesFromDiagnose

func (s *ScenarioNodeService) AddInterfacesFromDiagnose(tenantId consts.TenantId, req serverDomain.ScenarioAddInterfacesFromTreeReq) (ret model.Processor, err error)

func (*ScenarioNodeService) AddProcessor

func (s *ScenarioNodeService) AddProcessor(tenantId consts.TenantId, req serverDomain.ScenarioAddScenarioReq, source string) (ret model.Processor, err *_domain.BizErr)

func (*ScenarioNodeService) CopyInterfaceEntity

func (s *ScenarioNodeService) CopyInterfaceEntity(tenantId consts.TenantId, srcProcessorId, distProcessorId uint) (err error)

func (*ScenarioNodeService) CopyProcessor

func (s *ScenarioNodeService) CopyProcessor(tenantId consts.TenantId, req *agentExec.Processor, CreateBy uint, mod string, rootId *uint) (err *_domain.BizErr)

func (*ScenarioNodeService) Delete

func (s *ScenarioNodeService) Delete(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioNodeService) DisableOrNot

func (s *ScenarioNodeService) DisableOrNot(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioNodeService) GetNodeTree

func (s *ScenarioNodeService) GetNodeTree(tenantId consts.TenantId, scenarioId uint, node model.Processor) (root *agentExec.Processor, err error)

func (*ScenarioNodeService) GetTree

func (s *ScenarioNodeService) GetTree(tenantId consts.TenantId, scenario model.Scenario, withDetail bool) (root *agentExec.Processor, err error)

func (*ScenarioNodeService) ImportCurl

func (*ScenarioNodeService) ListToByScenario

func (s *ScenarioNodeService) ListToByScenario(tenantId consts.TenantId, id uint) (ret []*agentExec.Processor, err error)

func (*ScenarioNodeService) Move

func (s *ScenarioNodeService) Move(tenantId consts.TenantId, srcId, targetId uint, pos serverConsts.DropPos, projectId uint) (
	srcScenarioNode model.Processor, err error)

func (*ScenarioNodeService) ToTos

func (s *ScenarioNodeService) ToTos(tenantId consts.TenantId, pos []*model.Processor, withDetail bool) (tos []*agentExec.Processor)

func (*ScenarioNodeService) UpdateName

func (s *ScenarioNodeService) UpdateName(tenantId consts.TenantId, req serverDomain.ScenarioNodeReq) (err error)

type ScenarioProcessorService

type ScenarioProcessorService struct {
	ScenarioProcessorRepo *repo.ScenarioProcessorRepo `inject:""`
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`

	ConditionRepo *repo.ConditionRepo `inject:""`

	DebugInterfaceRepo *repo.DebugInterfaceRepo `inject:""`
	ServeServerRepo    *repo.ServeServerRepo    `inject:""`
	DatapoolRepo       *repo.DatapoolRepo       `inject:""`

	ExtractorService         *ExtractorService         `inject:""`
	CheckpointService        *CheckpointService        `inject:""`
	DebugInterfaceService    *DebugInterfaceService    `inject:""`
	ScenarioInterfaceService *ScenarioInterfaceService `inject:""`
	EnvironmentService       *EnvironmentService       `inject:""`
	DebugSceneService        *DebugSceneService        `inject:""`
}

func (*ScenarioProcessorService) GetEntity

func (s *ScenarioProcessorService) GetEntity(tenantId consts.TenantId, id int) (ret interface{}, err error)

func (*ScenarioProcessorService) GetEntityTo

func (s *ScenarioProcessorService) GetEntityTo(tenantId consts.TenantId, processorTo *agentExec.Processor) (ret agentExec.IProcessorEntity, err error)

func (*ScenarioProcessorService) MergeGlobalParams

func (s *ScenarioProcessorService) MergeGlobalParams(endpointInterfaceGlobalParams []model.EndpointInterfaceGlobalParam, globalParams []v1.GlobalParam) (ret []model.DebugInterfaceGlobalParam)

func (*ScenarioProcessorService) SaveAssertion

func (s *ScenarioProcessorService) SaveAssertion(tenantId consts.TenantId, req *model.ProcessorAssertion) (err error)

func (*ScenarioProcessorService) SaveBasicInfo

func (s *ScenarioProcessorService) SaveBasicInfo(tenantId consts.TenantId, req domain.ScenarioProcessorInfo) (err error)

func (*ScenarioProcessorService) SaveCookie

func (s *ScenarioProcessorService) SaveCookie(tenantId consts.TenantId, req *model.ProcessorCookie) (err error)

func (*ScenarioProcessorService) SaveCustomCode

func (s *ScenarioProcessorService) SaveCustomCode(tenantId consts.TenantId, req *model.ProcessorCustomCode) (err error)

func (*ScenarioProcessorService) SaveData

func (s *ScenarioProcessorService) SaveData(tenantId consts.TenantId, req *model.ProcessorData) (err error)

func (*ScenarioProcessorService) SaveGroup

func (s *ScenarioProcessorService) SaveGroup(tenantId consts.TenantId, req *model.ProcessorGroup) (err error)

func (*ScenarioProcessorService) SaveInterface

func (s *ScenarioProcessorService) SaveInterface(tenantId consts.TenantId, req *model.ProcessorComm) (err error)

func (*ScenarioProcessorService) SaveLogic

func (s *ScenarioProcessorService) SaveLogic(tenantId consts.TenantId, req *model.ProcessorLogic) (err error)

func (*ScenarioProcessorService) SaveLoop

func (s *ScenarioProcessorService) SaveLoop(tenantId consts.TenantId, req *model.ProcessorLoop) (err error)

func (*ScenarioProcessorService) SavePrint

func (s *ScenarioProcessorService) SavePrint(tenantId consts.TenantId, req *model.ProcessorPrint) (err error)

func (*ScenarioProcessorService) SaveTimer

func (s *ScenarioProcessorService) SaveTimer(tenantId consts.TenantId, req *model.ProcessorTimer) (err error)

func (*ScenarioProcessorService) SaveVariable

func (s *ScenarioProcessorService) SaveVariable(tenantId consts.TenantId, req *model.ProcessorVariable) (err error)

func (*ScenarioProcessorService) UpdateName

func (s *ScenarioProcessorService) UpdateName(tenantId consts.TenantId, req agentExec.ProcessorEntityBase) (err error)

type ScenarioReportService

type ScenarioReportService struct {
	ScenarioReportRepo *repo2.ScenarioReportRepo `inject:""`
	LogRepo            *repo2.LogRepo            `inject:""`
	PlanReportRepo     *repo2.PlanReportRepo     `inject:""`
	UserRepo           *repo2.UserRepo           `inject:""`
	ScenarioService    *ScenarioService          `inject:""`
}

func (*ScenarioReportService) CreatePlanReport

func (s *ScenarioReportService) CreatePlanReport(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioReportService) DeleteById

func (s *ScenarioReportService) DeleteById(tenantId consts.TenantId, id uint) error

func (*ScenarioReportService) GetById

func (s *ScenarioReportService) GetById(tenantId consts.TenantId, id uint) (report model.ScenarioReport, err error)

func (*ScenarioReportService) Paginate

func (s *ScenarioReportService) Paginate(tenantId consts.TenantId, req v1.ReportReqPaginate) (ret _domain.PageData, err error)

type ScenarioService

type ScenarioService struct {
	ScenarioRepo     *repo2.ScenarioRepo     `inject:""`
	ScenarioNodeRepo *repo2.ScenarioNodeRepo `inject:""`
	UserRepo         *repo2.UserRepo         `inject:""`
}

func (*ScenarioService) AddPlans

func (s *ScenarioService) AddPlans(tenantId consts.TenantId, scenarioId int, planIds []int) (err error)

func (*ScenarioService) Create

func (s *ScenarioService) Create(tenantId consts.TenantId, req model.Scenario) (po model.Scenario, err error)

func (*ScenarioService) DeleteById

func (s *ScenarioService) DeleteById(tenantId consts.TenantId, id uint) error

func (*ScenarioService) GetById

func (s *ScenarioService) GetById(tenantId consts.TenantId, id uint) (scenario model.Scenario, err error)

func (*ScenarioService) ListByProject

func (s *ScenarioService) ListByProject(tenantId consts.TenantId, serveId int) (pos []model.Scenario, err error)

func (*ScenarioService) Paginate

func (s *ScenarioService) Paginate(tenantId consts.TenantId, req v1.ScenarioReqPaginate, projectId int) (ret _domain.PageData, err error)

func (*ScenarioService) PlanPaginate

func (s *ScenarioService) PlanPaginate(tenantId consts.TenantId, req v1.ScenarioPlanReqPaginate, scenarioId int) (ret _domain.PageData, err error)

func (*ScenarioService) RemovePlans

func (s *ScenarioService) RemovePlans(tenantId consts.TenantId, scenarioId int, planIds []int) (err error)

func (*ScenarioService) Update

func (s *ScenarioService) Update(tenantId consts.TenantId, req model.Scenario) error

func (*ScenarioService) UpdatePriority

func (s *ScenarioService) UpdatePriority(tenantId consts.TenantId, id uint, priority string, updateUserId uint, updateUserName string) (err error)

func (*ScenarioService) UpdateStatus

func (s *ScenarioService) UpdateStatus(tenantId consts.TenantId, id uint, status consts.TestStatus, updateUserId uint, updateUserName string) (err error)

type SceneService

type SceneService struct {
	ScenarioNodeRepo   *repo.ScenarioNodeRepo   `inject:""`
	EnvironmentRepo    *repo.EnvironmentRepo    `inject:""`
	DebugInterfaceRepo *repo.DebugInterfaceRepo `inject:""`

	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`

	ShareVarService     *ShareVarService     `inject:""`
	EnvironmentService  *EnvironmentService  `inject:""`
	DatapoolService     *DatapoolService     `inject:""`
	ScenarioNodeService *ScenarioNodeService `inject:""`
}

func (*SceneService) GetExecServer

func (s *SceneService) GetExecServer(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId, environmentId uint) (server model.ServeServer)

func (*SceneService) LoadEnvVarMapByScenario

func (s *SceneService) LoadEnvVarMapByScenario(tenantId consts.TenantId, scene *domain.ExecScene, scenarioId, environmentId uint)

func (*SceneService) LoadEnvVars

func (s *SceneService) LoadEnvVars(tenantId consts.TenantId, scene *domain.ExecScene, serverId, debugInterfaceId uint) (projectId uint, err error)

func (*SceneService) LoadProjectSettings

func (s *SceneService) LoadProjectSettings(tenantId consts.TenantId, scene *domain.ExecScene, projectId uint)

type ScriptService

type ScriptService struct {
	ScriptRepo      *repo.ScriptRepo      `inject:""`
	EnvironmentRepo *repo.EnvironmentRepo `inject:""`
	ProjectRepo     *repo.ProjectRepo     `inject:""`
	ExtractorRepo   *repo.ExtractorRepo   `inject:""`
	VariableService *VariableService      `inject:""`
}

func (*ScriptService) Create

func (s *ScriptService) Create(tenantId consts.TenantId, script *model.DebugConditionScript) (err error)

func (*ScriptService) Get

func (s *ScriptService) Get(tenantId consts.TenantId, id uint) (script model.DebugConditionScript, err error)

func (*ScriptService) Update

func (s *ScriptService) Update(tenantId consts.TenantId, script *model.DebugConditionScript) (err error)

type ServeService

type ServeService struct {
	ServeRepo                *repo.ServeRepo             `inject:""`
	ServeServerRepo          *repo.ServeServerRepo       `inject:""`
	EndpointRepo             *repo.EndpointRepo          `inject:""`
	EndpointInterfaceRepo    *repo.EndpointInterfaceRepo `inject:""`
	ProjectRepo              *repo.ProjectRepo           `inject:""`
	EnvironmentRepo          *repo.EnvironmentRepo       `inject:""`
	CategoryRepo             *repo.CategoryRepo          `inject:""`
	Cron                     *cron.ServerCron            `inject:""`
	EndpointInterfaceService *EndpointInterfaceService   `inject:""`
	CategoryService          *CategoryService            `inject:""`
	ComponentService         *ComponentService           `inject:""`
}

func (*ServeService) AddServerForHistory

func (s *ServeService) AddServerForHistory(tenantId consts.TenantId, req v1.HistoryServeAddServesReq) (err error)

func (*ServeService) BindEndpoint

func (s *ServeService) BindEndpoint(tenantId consts.TenantId, req v1.ServeVersionBindEndpointReq) (err error)

func (*ServeService) ChangeServe

func (s *ServeService) ChangeServe(tenantId consts.TenantId, serveId, userId uint) (serve model.Serve, err error)

func (*ServeService) ChangeServer

func (s *ServeService) ChangeServer(tenantId consts.TenantId, projectId, userId, serveId, serverId uint) (currServer model.ServeServer, err error)

func (*ServeService) Components

func (s *ServeService) Components(tenantId consts.TenantId, projectId uint) (components *schemaHelper.Components)

func (*ServeService) Copy

func (s *ServeService) Copy(tenantId consts.TenantId, id uint) (err error)

func (*ServeService) CopySchema

func (s *ServeService) CopySchema(tenantId consts.TenantId, id uint) (category model.Category, err error)

func (*ServeService) CopySchemaOther

func (s *ServeService) CopySchemaOther(tenantId consts.TenantId, id uint) (entityId uint, err error)

func (*ServeService) DeleteById

func (s *ServeService) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*ServeService) DeleteSchemaById

func (s *ServeService) DeleteSchemaById(tenantId consts.TenantId, id uint) (err error)

func (*ServeService) DeleteSecurityId

func (s *ServeService) DeleteSecurityId(tenantId consts.TenantId, id uint) (err error)

func (*ServeService) DeleteVersionById

func (s *ServeService) DeleteVersionById(tenantId consts.TenantId, id uint) (err error)

func (*ServeService) DependComponents

func (s *ServeService) DependComponents(schemaStr string, components, dependComponents *schemaHelper.Components)

func (*ServeService) DisableById

func (s *ServeService) DisableById(tenantId consts.TenantId, id uint) (err error)

func (*ServeService) DisableVersionById

func (s *ServeService) DisableVersionById(tenantId consts.TenantId, id uint) (err error)

func (*ServeService) Example2Schema

func (s *ServeService) Example2Schema(data string) (schema schemaHelper.Schema)

func (*ServeService) FillSchemaRefId

func (s *ServeService) FillSchemaRefId(tenantId consts.TenantId, projectId uint, schemaStr string, components *schemaHelper.Components) string

func (*ServeService) GetById

func (s *ServeService) GetById(tenantId consts.TenantId, id uint) (res model.Serve)

func (*ServeService) GetComponents

func (s *ServeService) GetComponents(tenantId consts.TenantId, projectId uint) (result []model.ComponentSchema, err error)

func (*ServeService) GetSchema

func (s *ServeService) GetSchema(tenantId consts.TenantId, id uint) (schema model.ComponentSchema, err error)

func (*ServeService) ListByProject

func (s *ServeService) ListByProject(tenantId consts.TenantId, projectId int, userId uint) (ret []model.Serve, currServe model.Serve, err error)

func (*ServeService) ListServer

func (s *ServeService) ListServer(tenantId consts.TenantId, req v1.ServeServer, projectId, userId uint) (res []model.ServeServer, currServer model.ServeServer, err error)

func (*ServeService) Paginate

func (s *ServeService) Paginate(tenantId consts.TenantId, req v1.ServeReqPaginate) (ret _domain.PageData, err error)

func (*ServeService) PaginateSchema

func (s *ServeService) PaginateSchema(tenantId consts.TenantId, req v1.ServeSchemaPaginate) (ret _domain.PageData, err error)

func (*ServeService) PaginateSecurity

func (s *ServeService) PaginateSecurity(tenantId consts.TenantId, req v1.ServeSecurityPaginate) (ret _domain.PageData, err error)

func (*ServeService) PaginateVersion

func (s *ServeService) PaginateVersion(tenantId consts.TenantId, req v1.ServeVersionPaginate) (ret _domain.PageData, err error)

func (*ServeService) Save

func (s *ServeService) Save(tenantId consts.TenantId, req v1.ServeReq) (res uint, err error)

func (*ServeService) SaveSchema

func (s *ServeService) SaveSchema(tenantId consts.TenantId, req v1.ServeSchemaReq) (res uint, err error)

func (*ServeService) SaveSecurity

func (s *ServeService) SaveSecurity(tenantId consts.TenantId, req v1.ServeSecurityReq) (res uint, err error)

func (*ServeService) SaveServer

func (s *ServeService) SaveServer(tenantId consts.TenantId, req v1.ServeServer) (res uint, err error)

func (*ServeService) SaveVersion

func (s *ServeService) SaveVersion(tenantId consts.TenantId, req v1.ServeVersionReq) (res uint, err error)

func (*ServeService) Schema2Example

func (s *ServeService) Schema2Example(tenantId consts.TenantId, projectId uint, data string) (obj interface{})

func (*ServeService) Schema2Yaml

func (s *ServeService) Schema2Yaml(data string) (res string)

type ShareVarService

type ShareVarService struct {
	ShareVariableRepo *repo.ShareVariableRepo `inject:""`

	DiagnoseInterfaceRepo *repo.DiagnoseInterfaceRepo `inject:""`
	EndpointCaseRepo      *repo.EndpointCaseRepo      `inject:""`
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`
	ServeServerRepo       *repo.ServeServerRepo       `inject:""`
	ScenarioProcessorRepo *repo.ScenarioProcessorRepo `inject:""`
}

func (*ShareVarService) Clear

func (s *ShareVarService) Clear(tenantId consts.TenantId, debugReq domain.DebugInfo) (err error)

func (*ShareVarService) Delete

func (s *ShareVarService) Delete(tenantId consts.TenantId, id int) (err error)

func (*ShareVarService) List

func (s *ShareVarService) List(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId, diagnoseInterfaceId, caseInterfaceId, scenarioProcessorId uint,
	usedBy consts.UsedBy) (
	shareVariables []domain.GlobalVar)

func (*ShareVarService) ListForDebug

func (s *ShareVarService) ListForDebug(tenantId consts.TenantId, serveId, scenarioProcessorId uint, usedBy consts.UsedBy) (ret []domain.GlobalVar, err error)

func (*ShareVarService) Save

func (s *ShareVarService) Save(tenantId consts.TenantId, name, value string, resultType consts.ExtractorResultType,
	invokeId, debugInterfaceId, caseInterfaceId, endpointInterfaceId, serveId, processorId, scenarioId uint,
	scope consts.ExtractorScope, usedBy consts.UsedBy) (err error)

type SnippetService

type SnippetService struct {
	SnippetRepo *repo.SnippetRepo `inject:""`
	JslibRepo   *repo.JslibRepo   `inject:""`
}

func (*SnippetService) Get

func (*SnippetService) GetJslibs

func (s *SnippetService) GetJslibs(tenantId consts.TenantId, projectId int) (pos []jslibHelper.Jslib, err error)

func (*SnippetService) GetJslibsForAgent

func (s *SnippetService) GetJslibsForAgent(tenantId consts.TenantId, loadedLibs map[uint]time.Time, projectId int) (tos []jslibHelper.Jslib, err error)

func (*SnippetService) ListJslibNames

func (s *SnippetService) ListJslibNames(tenantId consts.TenantId, projectId int) (names []string, err error)

type Step

type Step struct {
	Value     interface{}
	Optimized bool
}

func NewStep

func NewStep(value interface{}, optimized bool) *Step

type SummaryBugsService

type SummaryBugsService struct {
	SummaryBugsRepo *repo.SummaryBugsRepo `inject:""`
}

func (*SummaryBugsService) Bugs

func (s *SummaryBugsService) Bugs(tenantId consts.TenantId, projectId int64) (res v1.ResSummaryBugs, err error)

func (*SummaryBugsService) Count

func (s *SummaryBugsService) Count(tenantId consts.TenantId) (count int64, err error)

Count

func (*SummaryBugsService) CountByProjectId

func (s *SummaryBugsService) CountByProjectId(tenantId consts.TenantId, projectId int64) (count int64, err error)

CountByProjectId

func (*SummaryBugsService) Create

func (s *SummaryBugsService) Create(tenantId consts.TenantId, req model.SummaryBugs) (err error)

func (*SummaryBugsService) CreateBug

func (s *SummaryBugsService) CreateBug(tenantId consts.TenantId, req model.SummaryBugs) (err error)

func (*SummaryBugsService) Existed

func (s *SummaryBugsService) Existed(tenantId consts.TenantId, bugId int64, projectId int64) (id int64, err error)

func (*SummaryBugsService) FindByProjectIdGroupByBugSeverity

func (s *SummaryBugsService) FindByProjectIdGroupByBugSeverity(tenantId consts.TenantId, projectId int64) (summaryBugsSeverity []model.SummaryBugsSeverity, err error)

FindByProjectId

func (*SummaryBugsService) FindGroupByBugSeverity

func (s *SummaryBugsService) FindGroupByBugSeverity(tenantId consts.TenantId) (summaryBugsSeverity []model.SummaryBugsSeverity, err error)

FindGroupByBugSeverity

func (*SummaryBugsService) FindProjectIds

func (s *SummaryBugsService) FindProjectIds(tenantId consts.TenantId) (projectIds []int64, err error)

func (*SummaryBugsService) HandlerSummaryBugsRepo

func (s *SummaryBugsService) HandlerSummaryBugsRepo() *repo.SummaryBugsRepo

func (*SummaryBugsService) UpdateColumnsByDate

func (s *SummaryBugsService) UpdateColumnsByDate(tenantId consts.TenantId, req model.SummaryBugs, id int64) (err error)

type SummaryDetailsService

type SummaryDetailsService struct {
	SummaryDetailsRepo *repo.SummaryDetailsRepo `inject:""`
	UserRepo           *repo.UserRepo           `inject:""`
}

func (*SummaryDetailsService) Card

func (s *SummaryDetailsService) Card(tenantId consts.TenantId, projectId int64) (res v1.ResSummaryCard, err error)

func (*SummaryDetailsService) CopyDetailsWithoutBaseModel

func (s *SummaryDetailsService) CopyDetailsWithoutBaseModel(detail model.SummaryDetails) (ret model.SummaryDetails)

func (*SummaryDetailsService) CopyProjectInfo

func (s *SummaryDetailsService) CopyProjectInfo(projectInfo model.SummaryProjectInfo, detail model.SummaryDetails) (resDetail v1.ResSummaryDetails)

func (*SummaryDetailsService) Count

func (s *SummaryDetailsService) Count(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsService) CountAllEndpointTotal

func (s *SummaryDetailsService) CountAllEndpointTotal(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsService) CountAllEndpointTotalProjectId

func (s *SummaryDetailsService) CountAllEndpointTotalProjectId(tenantId consts.TenantId) (counts map[int64]int64, err error)

func (*SummaryDetailsService) CountAllExecTotal

func (s *SummaryDetailsService) CountAllExecTotal(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsService) CountAllExecTotalProjectId

func (s *SummaryDetailsService) CountAllExecTotalProjectId(tenantId consts.TenantId) (counts map[int64]int64, err error)

func (*SummaryDetailsService) CountAllScenarioTotal

func (s *SummaryDetailsService) CountAllScenarioTotal(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsService) CountAllScenarioTotalProjectId

func (s *SummaryDetailsService) CountAllScenarioTotalProjectId(tenantId consts.TenantId) (scenarioTotal map[int64]int64, err error)

func (*SummaryDetailsService) CountBugsGroupByProjectId

func (s *SummaryDetailsService) CountBugsGroupByProjectId(tenantId consts.TenantId) (bugsCount map[int64]int64, err error)

func (*SummaryDetailsService) CountByUserId

func (s *SummaryDetailsService) CountByUserId(tenantId consts.TenantId, userId int64) (count int64, err error)

func (*SummaryDetailsService) CountEndpointTotalProjectId

func (s *SummaryDetailsService) CountEndpointTotalProjectId(tenantId consts.TenantId, projectId int64) (count int64, err error)

func (*SummaryDetailsService) CountExecTotalProjectId

func (s *SummaryDetailsService) CountExecTotalProjectId(tenantId consts.TenantId, projectId int64) (count int64, err error)

func (*SummaryDetailsService) CountProjectUserTotal

func (s *SummaryDetailsService) CountProjectUserTotal(tenantId consts.TenantId, projectId int64) (count int64, err error)

func (*SummaryDetailsService) CountScenarioTotalProjectId

func (s *SummaryDetailsService) CountScenarioTotalProjectId(tenantId consts.TenantId, projectId int64) (count int64, err error)

func (*SummaryDetailsService) CountUserTotal

func (s *SummaryDetailsService) CountUserTotal(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsService) Create

func (s *SummaryDetailsService) Create(tenantId consts.TenantId, req model.SummaryDetails) (err error)

func (*SummaryDetailsService) CreateByDate

func (s *SummaryDetailsService) CreateByDate(tenantId consts.TenantId, req model.SummaryDetails) (err error)

func (*SummaryDetailsService) Details

func (s *SummaryDetailsService) Details(tenantId consts.TenantId, userId int64, engineering string) (res v1.ResSummaryDetail, err error)

func (*SummaryDetailsService) Find

func (s *SummaryDetailsService) Find(tenantId consts.TenantId) (details []model.SummaryDetails, err error)

func (*SummaryDetailsService) FindAllAdminNameByAdminId

func (s *SummaryDetailsService) FindAllAdminNameByAdminId(tenantId consts.TenantId, adminId int64) (adminName string, err error)

func (*SummaryDetailsService) FindAllEndpointIdsGroupByProjectId

func (s *SummaryDetailsService) FindAllEndpointIdsGroupByProjectId(tenantId consts.TenantId, projectIds []int64) (ids map[int64][]int64, err error)

func (*SummaryDetailsService) FindAllExecLogProcessorInterfaceTotal

func (s *SummaryDetailsService) FindAllExecLogProcessorInterfaceTotal(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsService) FindAllExecLogProcessorInterfaceTotalGroupByProjectId

func (s *SummaryDetailsService) FindAllExecLogProcessorInterfaceTotalGroupByProjectId(tenantId consts.TenantId) (counts map[int64]int64, err error)

func (*SummaryDetailsService) FindAllPassRate

func (s *SummaryDetailsService) FindAllPassRate(tenantId consts.TenantId) (passRate float64, err error)

func (*SummaryDetailsService) FindAllPassRateByProjectId

func (s *SummaryDetailsService) FindAllPassRateByProjectId(tenantId consts.TenantId) (ret map[int64]float64, err error)

func (*SummaryDetailsService) FindAllProjectInfo

func (s *SummaryDetailsService) FindAllProjectInfo(tenantId consts.TenantId, engineering string) (projectDetails []model.SummaryProjectInfo, err error)

func (*SummaryDetailsService) FindAllUserIdAndNameOfProject

func (s *SummaryDetailsService) FindAllUserIdAndNameOfProject(tenantId consts.TenantId) (users []model.UserIdAndName, err error)

func (*SummaryDetailsService) FindByProjectId

func (s *SummaryDetailsService) FindByProjectId(tenantId consts.TenantId, projectId int64) (summaryDetail model.SummaryDetails, err error)

func (*SummaryDetailsService) FindByProjectIdAndDate

func (s *SummaryDetailsService) FindByProjectIdAndDate(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (summaryDetails model.SummaryDetails, err error)

func (*SummaryDetailsService) FindByProjectIds

func (s *SummaryDetailsService) FindByProjectIds(tenantId consts.TenantId, projectIds []int64) (details []model.SummaryDetails, err error)

func (*SummaryDetailsService) FindCreateUserNameByProjectId

func (s *SummaryDetailsService) FindCreateUserNameByProjectId(tenantId consts.TenantId, projectId int64) (userName string, err error)

func (*SummaryDetailsService) FindEndpointIdsByProjectId

func (s *SummaryDetailsService) FindEndpointIdsByProjectId(tenantId consts.TenantId, projectId int64) (ids []int64, err error)

func (*SummaryDetailsService) FindExecLogProcessorInterfaceTotalGroupByProjectId

func (s *SummaryDetailsService) FindExecLogProcessorInterfaceTotalGroupByProjectId(tenantId consts.TenantId, projectId int64) (count int64, err error)

func (*SummaryDetailsService) FindPassRateByProjectId

func (s *SummaryDetailsService) FindPassRateByProjectId(tenantId consts.TenantId, projectId int64) (passRate float64, err error)

func (*SummaryDetailsService) FindProjectIds

func (s *SummaryDetailsService) FindProjectIds(tenantId consts.TenantId) (ids []int64, err error)

func (*SummaryDetailsService) FindProjectIdsByUserId

func (s *SummaryDetailsService) FindProjectIdsByUserId(tenantId consts.TenantId, userId int64) (count []int64, err error)

func (*SummaryDetailsService) GetAllDetailGroupByProjectId

func (s *SummaryDetailsService) GetAllDetailGroupByProjectId(tenantId consts.TenantId) (ret map[int64]model.SummaryDetails, err error)

func (*SummaryDetailsService) HandleDetail

func (s *SummaryDetailsService) HandleDetail(projectId int64, ScenariosTotal int64, interfacesTotal int64, execsTotal int64, passRates float64, endPointCountOfProcessor int64) (ret model.SummaryDetails, err error)

func (*SummaryDetailsService) HandleSummaryDetails

func (s *SummaryDetailsService) HandleSummaryDetails(tenantId consts.TenantId, userId int64, userProjectIds []int64, allDetails map[int64]model.SummaryDetails, allProjectsInfo []model.SummaryProjectInfo) (resAllDetails []v1.ResSummaryDetails, resUserDetails []v1.ResSummaryDetails, err error)

func (*SummaryDetailsService) HandlerSummaryDetailsRepo

func (s *SummaryDetailsService) HandlerSummaryDetailsRepo() *repo.SummaryDetailsRepo

func (*SummaryDetailsService) HasDataOfDate

func (s *SummaryDetailsService) HasDataOfDate(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (id int64, err error)

func (*SummaryDetailsService) LetUsersGroupByProjectId

func (s *SummaryDetailsService) LetUsersGroupByProjectId(projectsInfo []model.SummaryProjectInfo, projectsUsers []model.UserIdAndName) (ret map[int64][]v1.ResUserIdAndName)

func (*SummaryDetailsService) SaveDetails

func (s *SummaryDetailsService) SaveDetails(tenantId consts.TenantId) (err error)

SaveDetails 查询今日是否已存在当前projectId对应的数据,没有则create,有则update

func (*SummaryDetailsService) SummaryCard

func (s *SummaryDetailsService) SummaryCard(tenantId consts.TenantId) (summaryCardTotal model.SummaryCardTotal, err error)

func (*SummaryDetailsService) SummaryCardByDate

func (s *SummaryDetailsService) SummaryCardByDate(tenantId consts.TenantId, startTime string, endTime string) (summaryCardTotal model.SummaryCardTotal, err error)

func (*SummaryDetailsService) SummaryCardByDateAndProjectId

func (s *SummaryDetailsService) SummaryCardByDateAndProjectId(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (summaryCardTotal model.SummaryCardTotal, err error)

func (*SummaryDetailsService) SummaryCardByProjectId

func (s *SummaryDetailsService) SummaryCardByProjectId(tenantId consts.TenantId, projectId int64) (summaryCardTotal model.SummaryCardTotal, err error)

func (*SummaryDetailsService) UpdateColumnsByDate

func (s *SummaryDetailsService) UpdateColumnsByDate(tenantId consts.TenantId, id int64, req model.SummaryDetails) (err error)

type SummaryProjectUserRankingService

type SummaryProjectUserRankingService struct {
	SummaryProjectUserRankingRepo *repo.SummaryProjectUserRankingRepo `inject:""`
}

func (*SummaryProjectUserRankingService) CheckUpdated

func (s *SummaryProjectUserRankingService) CheckUpdated(tenantId consts.TenantId, lastUpdateTime *time.Time) (result bool, err error)

func (*SummaryProjectUserRankingService) Create

func (*SummaryProjectUserRankingService) CreateByDate

func (*SummaryProjectUserRankingService) Existed

func (s *SummaryProjectUserRankingService) Existed(tenantId consts.TenantId, startTime string, endTiem string, projectId int64, userId int64) (id int64, err error)

func (*SummaryProjectUserRankingService) FindAllUserName

func (s *SummaryProjectUserRankingService) FindAllUserName(tenantId consts.TenantId) (result map[int64]string, err error)

func (*SummaryProjectUserRankingService) FindByProjectId

func (s *SummaryProjectUserRankingService) FindByProjectId(tenantId consts.TenantId, projectId int64) (summaryProjectUserRanking []model.SummaryProjectUserRanking, err error)

func (*SummaryProjectUserRankingService) FindCasesTotalByProjectId

func (s *SummaryProjectUserRankingService) FindCasesTotalByProjectId(tenantId consts.TenantId, projectId int64) (result map[int64]int64, err error)

func (*SummaryProjectUserRankingService) FindMaxDataByDateAndProjectId

func (s *SummaryProjectUserRankingService) FindMaxDataByDateAndProjectId(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (summaryProjectUserRanking []model.SummaryProjectUserRanking, err error)

func (*SummaryProjectUserRankingService) FindMaxDataByDateAndProjectIdOfMap

func (s *SummaryProjectUserRankingService) FindMaxDataByDateAndProjectIdOfMap(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (result map[int64]model.SummaryProjectUserRanking, err error)

func (*SummaryProjectUserRankingService) FindMinDataByDateAndProjectId

func (s *SummaryProjectUserRankingService) FindMinDataByDateAndProjectId(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (summaryProjectUserRanking []model.SummaryProjectUserRanking, err error)

func (*SummaryProjectUserRankingService) FindMinDataByDateAndProjectIdOfMap

func (s *SummaryProjectUserRankingService) FindMinDataByDateAndProjectIdOfMap(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (result map[int64]model.SummaryProjectUserRanking, err error)

func (*SummaryProjectUserRankingService) FindProjectIds

func (s *SummaryProjectUserRankingService) FindProjectIds(tenantId consts.TenantId) (projectIds []int64, err error)

func (*SummaryProjectUserRankingService) FindScenarioTotalOfUserGroupByProject

func (s *SummaryProjectUserRankingService) FindScenarioTotalOfUserGroupByProject(tenantId consts.TenantId) (ScenariosTotal map[int64][]model.ProjectUserTotal, err error)

func (*SummaryProjectUserRankingService) FindScenariosTotalByProjectId

func (s *SummaryProjectUserRankingService) FindScenariosTotalByProjectId(tenantId consts.TenantId, projectId int64) (result map[int64]int64, err error)

func (*SummaryProjectUserRankingService) FindTestCasesTotalOfUserGroupByProject

func (s *SummaryProjectUserRankingService) FindTestCasesTotalOfUserGroupByProject(tenantId consts.TenantId) (testCasesTotal map[int64][]model.ProjectUserTotal, err error)

func (*SummaryProjectUserRankingService) FindUserByProjectId

func (s *SummaryProjectUserRankingService) FindUserByProjectId(tenantId consts.TenantId, projectId int64) (users []model.RankingUser, err error)

func (*SummaryProjectUserRankingService) FindUserIdsByProjectId

func (s *SummaryProjectUserRankingService) FindUserIdsByProjectId(tenantId consts.TenantId, projectId int64) (userIds []int64, err error)

func (*SummaryProjectUserRankingService) FindUserLastUpdateTestCasesByProjectId

func (s *SummaryProjectUserRankingService) FindUserLastUpdateTestCasesByProjectId(tenantId consts.TenantId, projectId int64) (result map[int64]*time.Time, err error)

func (*SummaryProjectUserRankingService) ForMap

func (s *SummaryProjectUserRankingService) ForMap(userTotal []model.UserTotal) (ret []map[int64]int64, err error)

func (*SummaryProjectUserRankingService) GetRanking

func (s *SummaryProjectUserRankingService) GetRanking(tenantId consts.TenantId, projectId int64) (rankings []model.SummaryProjectUserRanking, err error)

func (*SummaryProjectUserRankingService) HandlerSummaryProjectUserRankingRepo

func (s *SummaryProjectUserRankingService) HandlerSummaryProjectUserRankingRepo() *repo.SummaryProjectUserRankingRepo

func (*SummaryProjectUserRankingService) ProjectUserRanking

func (s *SummaryProjectUserRankingService) ProjectUserRanking(tenantId consts.TenantId, cycle int64, projectId int64) (resRankingList v1.ResRankingList, err error)

func (*SummaryProjectUserRankingService) SaveRanking

func (s *SummaryProjectUserRankingService) SaveRanking(tenantId consts.TenantId) (err error)

func (*SummaryProjectUserRankingService) SortRanking

func (*SummaryProjectUserRankingService) SortRankingList

func (s *SummaryProjectUserRankingService) SortRankingList(req v1.ResRankingList) (ret v1.ResRankingList, err error)

func (*SummaryProjectUserRankingService) UpdateColumnsByDate

func (s *SummaryProjectUserRankingService) UpdateColumnsByDate(tenantId consts.TenantId, id int64, req model.SummaryProjectUserRanking) (err error)

type SummaryService

type SummaryService struct {
	SummaryDetailsService            *SummaryDetailsService            `inject:""`
	SummaryBugsService               *SummaryBugsService               `inject:""`
	SummaryProjectUserRankingService *SummaryProjectUserRankingService `inject:""`
}

func (*SummaryService) Bugs

func (s *SummaryService) Bugs(tenantId consts.TenantId, projectId int64) (res v1.ResSummaryBugs, err error)

func (*SummaryService) Card

func (s *SummaryService) Card(tenantId consts.TenantId, projectId int64) (res v1.ResSummaryCard, err error)

func (*SummaryService) Collection

func (s *SummaryService) Collection(tenantId consts.TenantId) (err error)

func (*SummaryService) CollectionBugs

func (s *SummaryService) CollectionBugs(tenantId consts.TenantId) (err error)

func (*SummaryService) CollectionDetails

func (s *SummaryService) CollectionDetails(tenantId consts.TenantId) (err error)

func (*SummaryService) CollectionRanking

func (s *SummaryService) CollectionRanking(tenantId consts.TenantId) (err error)

func (*SummaryService) Details

func (s *SummaryService) Details(tenantId consts.TenantId, userId int64, engineering string) (res v1.ResSummaryDetail, err error)

func (*SummaryService) ProjectUserRanking

func (s *SummaryService) ProjectUserRanking(tenantId consts.TenantId, cycle int64, projectId int64) (res v1.ResRankingList, err error)

type SwaggerCron

type SwaggerCron struct {
	ServeRepo                *repo.ServeRepo             `inject:""`
	ProjectSettingsRepo      *repo.ProjectSettingsRepo   `inject:""`
	EndpointRepo             *repo.EndpointRepo          `inject:""`
	EndpointInterfaceRepo    *repo.EndpointInterfaceRepo `inject:""`
	ProjectCronRepo          *repo.ProjectCronRepo       `inject:""`
	Cron                     *cron.ServerCron            `inject:""`
	EndpointInterfaceService *EndpointInterfaceService   `inject:""`
	ProjectCronService       *ProjectCronService         `inject:""`
}

func (*SwaggerCron) CallBack

func (s *SwaggerCron) CallBack(options map[string]interface{}, err error) func()

func (*SwaggerCron) GetSwaggerSyncById

func (s *SwaggerCron) GetSwaggerSyncById(tenantId consts.TenantId, id uint) (data model.SwaggerSync, err error)

func (*SwaggerCron) Run

func (s *SwaggerCron) Run(options map[string]interface{}) (f func() error)

func (*SwaggerCron) SaveSwaggerSync

func (s *SwaggerCron) SaveSwaggerSync(tenantId consts.TenantId, req model.SwaggerSync) (id uint, err error)

type SysAgentService

type SysAgentService struct {
	SysAgentRepo *repo.SysAgentRepo `inject:""`
}

func (*SysAgentService) Delete

func (s *SysAgentService) Delete(tenantId consts.TenantId, id uint) (err error)

func (*SysAgentService) Disable

func (s *SysAgentService) Disable(tenantId consts.TenantId, id uint) (err error)

func (*SysAgentService) Get

func (s *SysAgentService) Get(tenantId consts.TenantId, id uint) (po model.SysAgent, err error)

func (*SysAgentService) List

func (s *SysAgentService) List(tenantId consts.TenantId, keywords string) (pos []model.SysAgent, err error)

func (*SysAgentService) Save

func (s *SysAgentService) Save(tenantId consts.TenantId, req *model.SysAgent) (err error)

func (*SysAgentService) UpdateName

func (s *SysAgentService) UpdateName(tenantId consts.TenantId, req v1.AgentReq) (err error)

type ThirdPartySyncService

type ThirdPartySyncService struct {
	ThirdPartySyncRepo       *repo.ThirdPartySyncRepo    `inject:""`
	CategoryRepo             *repo.CategoryRepo          `inject:""`
	EndpointRepo             *repo.EndpointRepo          `inject:""`
	EndpointInterfaceRepo    *repo.EndpointInterfaceRepo `inject:""`
	UserRepo                 *repo.UserRepo              `inject:""`
	BaseRepo                 *repo.BaseRepo              `inject:""`
	RemoteService            *lecang.RemoteService       `inject:""`
	ServeService             *ServeService               `inject:""`
	EndpointService          *EndpointService            `inject:""`
	EndpointInterfaceService *EndpointInterfaceService   `inject:""`
	EndpointTagService       *EndpointTagService         `inject:""`
	Cron                     *cron.ServerCron            `inject:""`
}

func (*ThirdPartySyncService) AddThirdPartySyncCron

func (s *ThirdPartySyncService) AddThirdPartySyncCron(tenantId consts.TenantId)

func (*ThirdPartySyncService) BatchAddTag

func (s *ThirdPartySyncService) BatchAddTag(data map[string][]uint, projectId uint) (err error)

func (*ThirdPartySyncService) DoGetFunctionsByClass

func (*ThirdPartySyncService) FillTagEndpointRel

func (s *ThirdPartySyncService) FillTagEndpointRel(rel *map[string][]uint, function integrationDomain.GetFunctionsByClassResData, endpointId uint)

func (*ThirdPartySyncService) GenerateEndpoint

func (s *ThirdPartySyncService) GenerateEndpoint(functionDetail integrationDomain.MetaGetMethodDetailResData) (res model.Endpoint, err error)

func (*ThirdPartySyncService) GetAllData

func (s *ThirdPartySyncService) GetAllData(tenantId consts.TenantId) (res []model.ThirdPartySync, err error)

func (*ThirdPartySyncService) GetClasses

func (s *ThirdPartySyncService) GetClasses(serviceCode, token string, baseUrl string) (classes []integrationDomain.FindClassByServiceCodeResData)

func (*ThirdPartySyncService) GetFilteredFunctions

func (*ThirdPartySyncService) GetFunctionDetail

func (s *ThirdPartySyncService) GetFunctionDetail(classCode, function, token string, baseUrl string) (data integrationDomain.MetaGetMethodDetailResData)

func (*ThirdPartySyncService) GetFunctionsByClassNew

func (s *ThirdPartySyncService) GetFunctionsByClassNew(classInfo integrationDomain.FindClassByServiceCodeResData, funcLimit v1.LecangFuncLimit, token, baseUrl string) (functions []integrationDomain.GetFunctionsByClassResData)

func (*ThirdPartySyncService) GetSchema

func (s *ThirdPartySyncService) GetSchema(bodyString, requestType string) (schema *openapi3.SchemaRef)

func (*ThirdPartySyncService) GetToken

func (s *ThirdPartySyncService) GetToken(baseUrl string) (token string, err error)

func (*ThirdPartySyncService) ImportEndpoint

func (s *ThirdPartySyncService) ImportEndpoint(tenantId consts.TenantId, projectId uint, cronConfig model.CronConfigLecang) (err error)

func (*ThirdPartySyncService) ImportEndpointForService

func (s *ThirdPartySyncService) ImportEndpointForService(tenantId consts.TenantId, req v1.LecangCronReq) (err error)

func (*ThirdPartySyncService) ImportThirdPartyFunctions

func (s *ThirdPartySyncService) ImportThirdPartyFunctions(tenantId consts.TenantId, req v1.ImportEndpointDataReq) (err error)

func (*ThirdPartySyncService) ListFunctionsByClass

func (s *ThirdPartySyncService) ListFunctionsByClass(baseUrl, classCode string) (res []integrationDomain.GetFunctionDetailsByClassResData, err error)

func (*ThirdPartySyncService) SaveBody

func (s *ThirdPartySyncService) SaveBody(tenantId consts.TenantId, functionDetail integrationDomain.MetaGetMethodDetailResData, interfaceId uint) (err error)

func (*ThirdPartySyncService) SaveCategory

func (s *ThirdPartySyncService) SaveCategory(tenantId consts.TenantId, class integrationDomain.FindClassByServiceCodeResData, projectId, serveId uint, parentCategoryId int, categoryId *int64) (err error)

func (*ThirdPartySyncService) SaveData

func (s *ThirdPartySyncService) SaveData(tenantId consts.TenantId) (err error)

func (*ThirdPartySyncService) SaveEndpoint

func (s *ThirdPartySyncService) SaveEndpoint(tenantId consts.TenantId, req v1.SaveLcEndpointReq) (endpointId uint, err error)

func (*ThirdPartySyncService) SaveEndpointInterface

func (s *ThirdPartySyncService) SaveEndpointInterface(tenantId consts.TenantId, title string, functionDetail integrationDomain.MetaGetMethodDetailResData, endpointId, projectId uint, path string) (interfaceId uint, err error)

func (*ThirdPartySyncService) SyncFunctionBody

func (s *ThirdPartySyncService) SyncFunctionBody(tenantId consts.TenantId, projectId, serveId, interfaceId uint, classCode, functionCode string) (err error)

func (*ThirdPartySyncService) UpdateExecTimeById

func (s *ThirdPartySyncService) UpdateExecTimeById(tenantId consts.TenantId, id uint) (err error)

type UserAuthService

type UserAuthService struct {
	RemoteService *leyan.RemoteService `inject:""`
	UserRepo      *repo.UserRepo       `inject:""`
}

func (*UserAuthService) Auth

func (s *UserAuthService) Auth(tenantId consts.TenantId, token string) (user model.SysUser, err error)

type UserService

type UserService struct {
	UserRepo *repo.UserRepo `inject:""`
}

func (*UserService) AddRoleForUser

func (s *UserService) AddRoleForUser(tenantId consts.TenantId, user *model.SysUser) error

AddRoleForUser add roles for user

func (*UserService) CleanToken

func (s *UserService) CleanToken(authorityType int, userId string) error

CleanToken 清空 token

func (*UserService) Create

func (s *UserService) Create(tenantId consts.TenantId, req v1.UserReq) (uint, error)

func (*UserService) DelToken

func (s *UserService) DelToken(token string) error

DelToken 删除token

func (*UserService) DeleteById

func (s *UserService) DeleteById(tenantId consts.TenantId, id uint) error

func (*UserService) FindById

func (s *UserService) FindById(tenantId consts.TenantId, id uint) (v1.UserResp, error)

func (*UserService) FindByUserName

func (s *UserService) FindByUserName(tenantId consts.TenantId, username string, ids ...uint) (v1.UserResp, error)

func (*UserService) FindPasswordByUserName

func (s *UserService) FindPasswordByUserName(tenantId consts.TenantId, username string, ids ...uint) (v1.LoginResp, error)

func (*UserService) GetUsersNotExistedInProject

func (s *UserService) GetUsersNotExistedInProject(tenantId consts.TenantId, projectId uint) (ret []v1.UserResp, err error)

func (*UserService) Invite

func (s *UserService) Invite(tenantId consts.TenantId, req v1.InviteUserReq) (user model.SysUser, bizErr *_domain.BizErr)

func (*UserService) IsAdminUser

func (s *UserService) IsAdminUser(tenantId consts.TenantId, id uint) (bool, error)

func (*UserService) Paginate

func (s *UserService) Paginate(tenantId consts.TenantId, req v1.UserReqPaginate) (_domain.PageData, error)

func (*UserService) Update

func (s *UserService) Update(tenantId consts.TenantId, userId, id uint, req v1.UserReq) error

func (*UserService) UpdateAvatar

func (s *UserService) UpdateAvatar(id uint, avatar string) error

func (*UserService) UpdateSysRoleForUser

func (s *UserService) UpdateSysRoleForUser(tenantId consts.TenantId, userId uint, roleIds []uint) (err error)

type VariableService

type VariableService struct {
	DebugInterfaceRepo    *repo.DebugInterfaceRepo    `inject:""`
	DiagnoseInterfaceRepo *repo.DiagnoseInterfaceRepo `inject:""`

	EndpointInterfaceRepo *repo.EndpointInterfaceRepo `inject:""`
	EndpointRepo          *repo.EndpointRepo          `inject:""`

	ExtractorRepo   *repo.ExtractorRepo   `inject:""`
	EnvironmentRepo *repo.EnvironmentRepo `inject:""`
	ServeServerRepo *repo.ServeServerRepo `inject:""`

	EnvironmentService *EnvironmentService `inject:""`
	ShareVarService    *ShareVarService    `inject:""`
	DatapoolService    *DatapoolService    `inject:""`
}

func (*VariableService) GetCombinedVarsForCheckpoint

func (s *VariableService) GetCombinedVarsForCheckpoint(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId, caseInterfaceId, scenarioProcessorId uint, usedBy consts.UsedBy) (
	ret map[string]interface{}, datapools domain.Datapools, err error)

type WebSocketService

type WebSocketService struct {
}

func (*WebSocketService) Broadcast

func (s *WebSocketService) Broadcast(namespace, room, event string, data interface{})

func (*WebSocketService) SendMsg

func (s *WebSocketService) SendMsg(namespace, room string, data interface{})

func (*WebSocketService) SetConn

func (s *WebSocketService) SetConn(conn *neffos.Conn)

type XPathService

type XPathService struct {
}

func (*XPathService) GetHtmlXPath

func (s *XPathService) GetHtmlXPath(node *html.Node,
	selectContent string, selectionType consts.NodeType, optimized bool) (ret string, err error)

func (*XPathService) GetJsonXPath

func (s *XPathService) GetJsonXPath(node *jsonquery.Node, selectContent string, optimized bool) (ret string, err error)

func (*XPathService) GetXmlXPath

func (s *XPathService) GetXmlXPath(node *xmlquery.Node,
	selectContent string, selectionType consts.NodeType, optimized bool) (ret string, err error)

type YapiCatMenu

type YapiCatMenu struct {
	Errcode int               `json:"errcode"`
	Errmsg  string            `json:"errmsg"`
	Data    []YapiCatMenuData `json:"data"`
}

type YapiCatMenuData

type YapiCatMenuData struct {
	Index     int    `json:"index"`
	ID        int    `json:"_id"`
	Name      string `json:"name"`
	ProjectID int    `json:"project_id"`
	Desc      string `json:"desc"`
	UID       int    `json:"uid"`
	AddTime   int    `json:"add_time"`
	UpTime    int    `json:"up_time"`
	V         int    `json:"__v"`
}

type YapiInterfaceList

type YapiInterfaceList struct {
	Errcode int                   `json:"errcode"`
	Errmsg  string                `json:"errmsg"`
	Data    YapiInterfaceListData `json:"data"`
}

type YapiInterfaceListData

type YapiInterfaceListData struct {
	Count int                         `json:"count"`
	Total int                         `json:"total"`
	List  []YapiInterfaceListDataList `json:"list"`
}

type YapiInterfaceListDataList

type YapiInterfaceListDataList struct {
	EditUID   int      `json:"edit_uid"`
	Status    string   `json:"status"`
	APIOpened bool     `json:"api_opened"`
	Tag       []string `json:"tag"`
	ID        int      `json:"_id"`
	Method    string   `json:"method"`
	Title     string   `json:"title"`
	Path      string   `json:"path"`
	ProjectID int      `json:"project_id"`
	Catid     int      `json:"catid"`
	UID       int      `json:"uid"`
	AddTime   int      `json:"add_time"`
}

type YapiRes

type YapiRes struct {
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
	Data    Data   `json:"data"`
}

type YapiService

type YapiService struct {
	ImportService *ImportService `inject:""`
}

func (*YapiService) GetYapiInterface

func (s *YapiService) GetYapiInterface(yapiHost, token, interfaceId string) (ret domain.DebugResponse)

func (*YapiService) GetYapiMenuInterfaceList

func (s *YapiService) GetYapiMenuInterfaceList(yapiHost, token, catid string) (yapiInterfaceList YapiInterfaceList)

func (*YapiService) ImportYapiProject

func (s *YapiService) ImportYapiProject(req v1.InterfaceYapiReq) (err error)

func (*YapiService) YapiInterfaceInfoToInterf

func (s *YapiService) YapiInterfaceInfoToInterf(ret domain.DebugResponse) (interf m.EndpointInterface)

Jump to

Keyboard shortcuts

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