repo

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRepo

type AuthRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*AuthRepo) CreateToken

func (r *AuthRepo) CreateToken(tenantId consts.TenantId, name, token, tokenType string, projectId int) (po model.Auth2Token, err error)

func (*AuthRepo) FindByName

func (r *AuthRepo) FindByName(tenantId consts.TenantId, name string) (pos []model.Auth2Token, err error)

func (*AuthRepo) FindByToken

func (r *AuthRepo) FindByToken(tenantId consts.TenantId, token string) (pos []model.Auth2Token, err error)

func (*AuthRepo) ListOAuth2Token

func (r *AuthRepo) ListOAuth2Token(tenantId consts.TenantId, projectId int) (pos []model.Auth2Token, err error)

func (*AuthRepo) RemoveToken

func (r *AuthRepo) RemoveToken(tenantId consts.TenantId, id uint) (err error)

type BaseRepo

type BaseRepo struct {
	DB *gorm.DB `inject:""`
}

func (*BaseRepo) GetAdminRoleName

func (r *BaseRepo) GetAdminRoleName() (roleName consts.RoleType)

func (*BaseRepo) GetAllChildIdsSimple

func (r *BaseRepo) GetAllChildIdsSimple(tenantId consts.TenantId, id uint, tableName string) (
	ids []uint, err error)

func (*BaseRepo) GetAncestorIds

func (r *BaseRepo) GetAncestorIds(tenantId consts.TenantId, id uint, tableName string) (ids []uint, err error)

func (*BaseRepo) GetDB

func (r *BaseRepo) GetDB(tenantId consts.TenantId) (db *gorm.DB)

func (*BaseRepo) GetDescendantIds

func (r *BaseRepo) GetDescendantIds(tenantId consts.TenantId, id uint, tableName string, typ serverConsts.CategoryDiscriminator, projectId int) (
	ids []uint, err error)

func (*BaseRepo) GetEntities

func (r *BaseRepo) GetEntities(tenantId consts.TenantId, id uint) (entities map[uint]interface{}, err error)

func (*BaseRepo) GetEntity

func (r *BaseRepo) GetEntity(tenantId consts.TenantId, id uint) (entity map[string]interface{}, err error)

func (*BaseRepo) MoveEntity

func (r *BaseRepo) MoveEntity(tenantId consts.TenantId, category *model.Category) (err error)

func (*BaseRepo) Save

func (r *BaseRepo) Save(tenantId consts.TenantId, id uint, entity interface{}) (err error)

func (*BaseRepo) SaveEntity

func (r *BaseRepo) SaveEntity(tenantId consts.TenantId, category *model.Category) (err error)

type CategoryRepo

type CategoryRepo struct {
	*BaseRepo   `inject:""`
	DB          *gorm.DB     `inject:""`
	ProjectRepo *ProjectRepo `inject:""`
}

func (*CategoryRepo) BatchAddProjectRootSchemaCategory

func (r *CategoryRepo) BatchAddProjectRootSchemaCategory(tenantId consts.TenantId, projectIds []uint) (err error)

func (*CategoryRepo) BatchDelete

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

func (*CategoryRepo) BatchGetByIds

func (r *CategoryRepo) BatchGetByIds(tenantId consts.TenantId, ids []int) (res []model.Category, err error)

func (*CategoryRepo) BatchGetRootNodeProjectIds

func (r *CategoryRepo) BatchGetRootNodeProjectIds(tenantId consts.TenantId, projectIds []uint, typ serverConsts.CategoryDiscriminator) (res []uint, err error)

func (*CategoryRepo) BatchGetRootNodes

func (r *CategoryRepo) BatchGetRootNodes(tenantId consts.TenantId, projectIds []uint, typ serverConsts.CategoryDiscriminator) (res []model.Category, err error)

func (*CategoryRepo) CopySelf

func (r *CategoryRepo) CopySelf(tenantId consts.TenantId, id, newParentId int) (category model.Category, err error)

func (*CategoryRepo) Delete

func (r *CategoryRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*CategoryRepo) DeleteByEntityId

func (r *CategoryRepo) DeleteByEntityId(tenantId consts.TenantId, entityId uint, _type serverConsts.CategoryDiscriminator) (err error)

func (*CategoryRepo) Get

func (r *CategoryRepo) Get(tenantId consts.TenantId, id int) (po model.Category, err error)

func (*CategoryRepo) GetAllChild

func (r *CategoryRepo) GetAllChild(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId uint, parentId int, nodeType serverConsts.NodeCreateType) (child []*model.Category, err error)

func (*CategoryRepo) GetAllChildrenMap

func (r *CategoryRepo) GetAllChildrenMap(tenantId consts.TenantId, categoryId uint) (root *model.Category, ret map[uint][]*model.Category, err error)

func (*CategoryRepo) GetByEntityId

func (r *CategoryRepo) GetByEntityId(tenantId consts.TenantId, entityId uint, _type serverConsts.CategoryDiscriminator) (category model.Category, err error)

func (*CategoryRepo) GetByItem

func (r *CategoryRepo) GetByItem(tenantId consts.TenantId, parentId uint, typ serverConsts.CategoryDiscriminator, projectId uint, name string) (res model.Category, err error)

func (*CategoryRepo) GetChild

func (r *CategoryRepo) GetChild(tenantId consts.TenantId, categories, result []*model.Category, parentId int) []*model.Category

func (*CategoryRepo) GetChildren

func (r *CategoryRepo) GetChildren(tenantId consts.TenantId, nodeId uint, nodeType serverConsts.NodeCreateType) (children []*model.Category, err error)

func (*CategoryRepo) GetChildrenNodes

func (r *CategoryRepo) GetChildrenNodes(tenantId consts.TenantId, categoryId uint, nodeType serverConsts.NodeCreateType) (ret []*model.Category, err error)

func (*CategoryRepo) GetDetail

func (r *CategoryRepo) GetDetail(tenantId consts.TenantId, req model.Category) (res model.Category, err error)

func (*CategoryRepo) GetEntityCountByCategoryId

func (r *CategoryRepo) GetEntityCountByCategoryId(tenantId consts.TenantId, categoryId uint) int64

func (*CategoryRepo) GetEntityIdsByIds

func (r *CategoryRepo) GetEntityIdsByIds(tenantId consts.TenantId, ids []uint) (entityIds []uint, err error)

func (*CategoryRepo) GetJoinedPath

func (r *CategoryRepo) GetJoinedPath(tenantId consts.TenantId, categoryId uint) (path []string, err error)

func (*CategoryRepo) GetMaxOrder

func (r *CategoryRepo) GetMaxOrder(tenantId consts.TenantId, parentId uint, typ serverConsts.CategoryDiscriminator, projectId uint) (order int)

func (*CategoryRepo) GetRoot

func (r *CategoryRepo) GetRoot(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId uint) (res model.Category, err error)

func (*CategoryRepo) GetRootNode

func (r *CategoryRepo) GetRootNode(tenantId consts.TenantId, projectId uint, typ serverConsts.CategoryDiscriminator) (node model.Category, err error)

func (*CategoryRepo) GetTree

func (r *CategoryRepo) GetTree(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId uint, nodeType serverConsts.NodeCreateType) (root *v1.Category, err error)

func (*CategoryRepo) ListByProject

func (r *CategoryRepo) ListByProject(tenantId consts.TenantId, typ serverConsts.CategoryDiscriminator, projectId uint, nodeType serverConsts.NodeCreateType) (pos []*model.Category, err error)

func (*CategoryRepo) Save

func (r *CategoryRepo) Save(tenantId consts.TenantId, category *model.Category) (err error)

func (*CategoryRepo) SaveEntityNode

func (r *CategoryRepo) SaveEntityNode(tenantId consts.TenantId, nodeId uint, typ serverConsts.CategoryDiscriminator, projectId, categoryId, entityId uint, name string) (id uint, err error)

func (*CategoryRepo) Update

func (r *CategoryRepo) Update(tenantId consts.TenantId, req v1.CategoryReq) (err error)

func (*CategoryRepo) UpdateEntityId

func (r *CategoryRepo) UpdateEntityId(tenantId consts.TenantId, id, entityId uint) (err error)

func (*CategoryRepo) UpdateName

func (r *CategoryRepo) UpdateName(tenantId consts.TenantId, id int, name string) (err error)

func (*CategoryRepo) UpdateNameByEntityId

func (r *CategoryRepo) UpdateNameByEntityId(tenantId consts.TenantId, entityId uint, name string, _type serverConsts.CategoryDiscriminator) (err error)

func (*CategoryRepo) UpdateOrdAndParent

func (r *CategoryRepo) UpdateOrdAndParent(tenantId consts.TenantId, node model.Category) (err error)

func (*CategoryRepo) UpdateOrder

func (r *CategoryRepo) UpdateOrder(tenantId consts.TenantId, pos serverConsts.DropPos, targetId int, typ serverConsts.CategoryDiscriminator, projectId uint) (
	parentId int, ordr int)

func (*CategoryRepo) UpdateParentIdByEntityIds

func (r *CategoryRepo) UpdateParentIdByEntityIds(tenantId consts.TenantId, entityIds []uint, parentId uint, _type serverConsts.CategoryDiscriminator) (err error)

type CheckpointRepo

type CheckpointRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*CheckpointRepo) CreateDefault

func (r *CheckpointRepo) CreateDefault(tenantId consts.TenantId, conditionId uint) (po model.DebugConditionCheckpoint)

func (*CheckpointRepo) CreateLog

func (r *CheckpointRepo) CreateLog(tenantId consts.TenantId, checkpoint domain.CheckpointBase) (
	log model.ExecLogCheckpoint, err error)

func (*CheckpointRepo) Delete

func (r *CheckpointRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*CheckpointRepo) DeleteByCondition

func (r *CheckpointRepo) DeleteByCondition(tenantId consts.TenantId, conditionId uint) (err error)

func (*CheckpointRepo) Get

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

func (*CheckpointRepo) GetByName

func (r *CheckpointRepo) GetByName(tenantId consts.TenantId, name string, interfaceId uint) (checkpoint model.DebugConditionCheckpoint, err error)

func (*CheckpointRepo) GetLog

func (r *CheckpointRepo) GetLog(tenantId consts.TenantId, conditionId, invokeId uint) (ret model.ExecLogCheckpoint, err error)

func (*CheckpointRepo) GetLogFromScriptAssert

func (r *CheckpointRepo) GetLogFromScriptAssert(tenantId consts.TenantId, conditionId, invokeId uint) (ret []model.ExecLogCheckpoint, err error)

func (*CheckpointRepo) Save

func (r *CheckpointRepo) Save(tenantId consts.TenantId, checkpoint *model.DebugConditionCheckpoint) (err error)

func (*CheckpointRepo) UpdateDesc

func (r *CheckpointRepo) UpdateDesc(tenantId consts.TenantId, po *model.DebugConditionCheckpoint) (err error)

func (*CheckpointRepo) UpdateResult

func (r *CheckpointRepo) UpdateResult(tenantId consts.TenantId, checkpoint domain.CheckpointBase) (err error)

type ComponentSchemaRepo

type ComponentSchemaRepo struct {
	DB           *gorm.DB `inject:""`
	*BaseRepo    `inject:""`
	CategoryRepo *CategoryRepo `inject:""`
}

func (*ComponentSchemaRepo) ChangeRef

func (r *ComponentSchemaRepo) ChangeRef(tenantId consts.TenantId, id, categoryId uint) (err error)

func (*ComponentSchemaRepo) DeleteByIds

func (r *ComponentSchemaRepo) DeleteByIds(tenantId consts.TenantId, ids []uint) (err error)

func (*ComponentSchemaRepo) GetCategoryCount

func (r *ComponentSchemaRepo) GetCategoryCount(tenantId consts.TenantId, result interface{}, projectId uint) (err error)

func (*ComponentSchemaRepo) GetSchemasNotExistedInCategory

func (r *ComponentSchemaRepo) GetSchemasNotExistedInCategory(tenantId consts.TenantId, projectIds []uint) (res []model.ComponentSchema, err error)

func (*ComponentSchemaRepo) ListAll

func (r *ComponentSchemaRepo) ListAll(tenantId consts.TenantId) (res []model.ComponentSchema, err error)

func (*ComponentSchemaRepo) MoveEntity

func (r *ComponentSchemaRepo) MoveEntity(tenantId consts.TenantId, category *model.Category) (err error)

func (*ComponentSchemaRepo) SaveEntity

func (r *ComponentSchemaRepo) SaveEntity(tenantId consts.TenantId, category *model.Category) (err error)

func (*ComponentSchemaRepo) UpdateRefById

func (r *ComponentSchemaRepo) UpdateRefById(tenantId consts.TenantId, id uint, ref string) (err error)

type ComponentSchemaSecurityRepo

type ComponentSchemaSecurityRepo struct {
	DB *gorm.DB `inject:""`
}

func (*ComponentSchemaSecurityRepo) Save

func (r *ComponentSchemaSecurityRepo) Save(ComponentSchema model.ComponentSchema) (err error)

type ConditionRepo

type ConditionRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`

	ExtractorRepo    *ExtractorRepo    `inject:""`
	CheckpointRepo   *CheckpointRepo   `inject:""`
	ScriptRepo       *ScriptRepo       `inject:""`
	DatabaseOptRepo  *DatabaseOptRepo  `inject:""`
	DatabaseConnRepo *DatabaseConnRepo `inject:""`

	ResponseDefineRepo    *ResponseDefineRepo    `inject:""`
	EndpointInterfaceRepo *EndpointInterfaceRepo `inject:""`
}

func (*ConditionRepo) CloneAll

func (r *ConditionRepo) CloneAll(tenantId consts.TenantId, srcDebugInterfaceId, srcEndpointInterfaceId, distDebugInterfaceId uint,
	dictUsedBy, srcUsedBy consts.UsedBy, forAlternativeCase string) (err error)

func (*ConditionRepo) CreateDefaultResponseDefine

func (r *ConditionRepo) CreateDefaultResponseDefine(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint, usedBy consts.UsedBy) (condition domain.Condition)

func (*ConditionRepo) Delete

func (r *ConditionRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*ConditionRepo) Disable

func (r *ConditionRepo) Disable(tenantId consts.TenantId, id uint) (err error)

func (*ConditionRepo) Get

func (r *ConditionRepo) Get(tenantId consts.TenantId, id uint) (po model.DebugCondition, err error)

func (*ConditionRepo) GetByDebugInterfaceId

func (r *ConditionRepo) GetByDebugInterfaceId(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint, by consts.UsedBy) (po model.DebugCondition, err error)

func (*ConditionRepo) GetMaxOrder

func (r *ConditionRepo) GetMaxOrder(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint, isForBenchmarkCase bool) (order int)

func (*ConditionRepo) List

func (r *ConditionRepo) List(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint, typ consts.ConditionCategory,
	usedBy consts.UsedBy, forAlternativeCase string, src consts.ConditionSrc) (
	pos []model.DebugCondition, err error)

func (*ConditionRepo) ListDbOpt

func (r *ConditionRepo) ListDbOpt(tenantId consts.TenantId, req domain.DebugInfo) (pos []model.DebugCondition, err error)

func (*ConditionRepo) ListExtractor

func (r *ConditionRepo) ListExtractor(tenantId consts.TenantId, req domain.DebugInfo) (
	pos []model.DebugCondition, err error)

func (*ConditionRepo) ListTo

func (r *ConditionRepo) ListTo(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint,
	usedBy consts.UsedBy, forAlternativeCase string, src consts.ConditionSrc) (ret []domain.InterfaceExecCondition, err error)

func (*ConditionRepo) RemoveAllForBenchmarkCase

func (r *ConditionRepo) RemoveAllForBenchmarkCase(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint, usedBy consts.UsedBy, entityType consts.ConditionCategory) (err error)

func (*ConditionRepo) ReplaceAll

func (r *ConditionRepo) ReplaceAll(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint, conditions []domain.InterfaceExecCondition,
	usedBy consts.UsedBy, src consts.ConditionSrc) (err error)

func (*ConditionRepo) Save

func (r *ConditionRepo) Save(tenantId consts.TenantId, po *model.DebugCondition) (err error)

func (*ConditionRepo) UpdateEntityId

func (r *ConditionRepo) UpdateEntityId(tenantId consts.TenantId, id uint, entityId uint) (err error)

func (*ConditionRepo) UpdateOrders

func (r *ConditionRepo) UpdateOrders(tenantId consts.TenantId, req serverDomain.ConditionMoveReq) (err error)

type ConfigRepo

type ConfigRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*ConfigRepo) Get

func (r *ConfigRepo) Get(tenantId consts.TenantId, key string) (config model.SysConfig, err error)

func (*ConfigRepo) Save

func (r *ConfigRepo) Save(tenantId consts.TenantId, req model.SysConfig) (err error)

type CronConfigLecangRepo

type CronConfigLecangRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*CronConfigLecangRepo) Create

func (r *CronConfigLecangRepo) Create(tenantId consts.TenantId, config model.CronConfigLecang) (id uint, err error)

func (*CronConfigLecangRepo) DeleteById

func (r *CronConfigLecangRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*CronConfigLecangRepo) GetById

func (r *CronConfigLecangRepo) GetById(tenantId consts.TenantId, id uint) (config model.CronConfigLecang, err error)

func (*CronConfigLecangRepo) Save

func (r *CronConfigLecangRepo) Save(tenantId consts.TenantId, config model.CronConfigLecang) (id uint, err error)

func (*CronConfigLecangRepo) Update

func (r *CronConfigLecangRepo) Update(tenantId consts.TenantId, config model.CronConfigLecang) (err error)

type DataRepo

type DataRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func NewDataRepo

func NewDataRepo(db *gorm.DB) *DataRepo

func (*DataRepo) CreateMySqlDb

func (s *DataRepo) CreateMySqlDb(tenantId consts.TenantId) error

CreateMySqlDb 创建数据库(mysql)

func (*DataRepo) SetSqlMode

func (s *DataRepo) SetSqlMode() (err error)

type DatabaseConnRepo

type DatabaseConnRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*DatabaseConnRepo) Delete

func (r *DatabaseConnRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DatabaseConnRepo) Disable

func (r *DatabaseConnRepo) Disable(tenantId consts.TenantId, id uint) (err error)

func (*DatabaseConnRepo) Get

func (r *DatabaseConnRepo) Get(tenantId consts.TenantId, id uint) (po model.DatabaseConn, err error)

func (*DatabaseConnRepo) GetByName

func (r *DatabaseConnRepo) GetByName(tenantId consts.TenantId, id, projectId uint, name string) (po model.DatabaseConn, err error)

func (*DatabaseConnRepo) List

func (r *DatabaseConnRepo) List(tenantId consts.TenantId, keywords string, projectId int, ignoreDisabled bool) (pos []model.DatabaseConn, err error)

func (*DatabaseConnRepo) Save

func (r *DatabaseConnRepo) Save(tenantId consts.TenantId, po *model.DatabaseConn) (err error)

func (*DatabaseConnRepo) UpdateName

func (r *DatabaseConnRepo) UpdateName(tenantId consts.TenantId, req v1.DbConnReq) (err error)

type DatabaseOptRepo

type DatabaseOptRepo struct {
	*BaseRepo        `inject:""`
	DB               *gorm.DB          `inject:""`
	DatabaseConnRepo *DatabaseConnRepo `inject:""`
}

func (*DatabaseOptRepo) CreateDefault

func (r *DatabaseOptRepo) CreateDefault(tenantId consts.TenantId, conditionId uint, src consts.ConditionSrc) (po model.DebugConditionDatabaseOpt)

func (*DatabaseOptRepo) CreateLog

func (r *DatabaseOptRepo) CreateLog(tenantId consts.TenantId, databaseOpt domain.DatabaseOptBase) (
	log model.ExecLogDatabaseOpt, err error)

func (*DatabaseOptRepo) Delete

func (r *DatabaseOptRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DatabaseOptRepo) DeleteByCondition

func (r *DatabaseOptRepo) DeleteByCondition(tenantId consts.TenantId, conditionId uint) (err error)

func (*DatabaseOptRepo) Get

func (r *DatabaseOptRepo) Get(tenantId consts.TenantId, id uint) (databaseOpt model.DebugConditionDatabaseOpt, err error)

func (*DatabaseOptRepo) GetLog

func (r *DatabaseOptRepo) GetLog(tenantId consts.TenantId, conditionId, invokeId uint) (ret model.ExecLogDatabaseOpt, err error)

func (*DatabaseOptRepo) Save

func (r *DatabaseOptRepo) Save(tenantId consts.TenantId, databaseOpt *model.DebugConditionDatabaseOpt) (err error)

func (*DatabaseOptRepo) UpdateDesc

func (r *DatabaseOptRepo) UpdateDesc(tenantId consts.TenantId, po *model.DebugConditionDatabaseOpt) (err error)

func (*DatabaseOptRepo) UpdateResult

func (r *DatabaseOptRepo) UpdateResult(tenantId consts.TenantId, databaseOpt domain.DatabaseOptBase) (err error)

type DatapoolRepo

type DatapoolRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB  `inject:""`
	UserRepo  *UserRepo `inject:""`
}

func (*DatapoolRepo) Delete

func (r *DatapoolRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DatapoolRepo) Disable

func (r *DatapoolRepo) Disable(tenantId consts.TenantId, id uint) (err error)

func (*DatapoolRepo) Get

func (r *DatapoolRepo) Get(tenantId consts.TenantId, id uint) (project model.Datapool, err error)

func (*DatapoolRepo) GetByName

func (r *DatapoolRepo) GetByName(tenantId consts.TenantId, name string, projectId uint) (po model.Datapool, err error)

func (*DatapoolRepo) ListForExec

func (r *DatapoolRepo) ListForExec(tenantId consts.TenantId, projectId uint) (ret []v1.DatapoolReq, err error)

func (*DatapoolRepo) Paginate

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

func (*DatapoolRepo) Save

func (r *DatapoolRepo) Save(tenantId consts.TenantId, po *model.Datapool, userId uint) (err error)

func (*DatapoolRepo) SaveData

func (r *DatapoolRepo) SaveData(tenantId consts.TenantId, req v1.DatapoolReq) (err error)

type DebugInterfaceRepo

type DebugInterfaceRepo struct {
	*BaseRepo             `inject:""`
	DB                    *gorm.DB `inject:""`
	*ServeRepo            `inject:""`
	*ServeServerRepo      `inject:""`
	EndpointCaseRepo      *EndpointCaseRepo      `inject:""`
	DiagnoseInterfaceRepo *DiagnoseInterfaceRepo `inject:""`
}

func (*DebugInterfaceRepo) CreateDefault

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

func (*DebugInterfaceRepo) Delete

func (r *DebugInterfaceRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) DeleteByProcessorIds

func (r *DebugInterfaceRepo) DeleteByProcessorIds(tenantId consts.TenantId, ids []uint) (err error)

func (*DebugInterfaceRepo) Get

func (r *DebugInterfaceRepo) Get(tenantId consts.TenantId, id uint) (po model.DebugInterface, err error)

func (*DebugInterfaceRepo) GetApiKey

func (r *DebugInterfaceRepo) GetApiKey(tenantId consts.TenantId, id uint) (po model.DebugInterfaceApiKey, err error)

func (*DebugInterfaceRepo) GetBasicAuth

func (r *DebugInterfaceRepo) GetBasicAuth(tenantId consts.TenantId, id uint) (po model.DebugInterfaceBasicAuth, err error)

func (*DebugInterfaceRepo) GetBearerToken

func (r *DebugInterfaceRepo) GetBearerToken(tenantId consts.TenantId, id uint) (po model.DebugInterfaceBearerToken, err error)

func (*DebugInterfaceRepo) GetByCaseInterfaceId

func (r *DebugInterfaceRepo) GetByCaseInterfaceId(tenantId consts.TenantId, caseInterfaceId uint) (po model.DebugInterface, err error)

func (*DebugInterfaceRepo) GetChildren

func (r *DebugInterfaceRepo) GetChildren(tenantId consts.TenantId, defId, fieldId uint) (children []*model.DebugInterface, err error)

func (*DebugInterfaceRepo) GetDetail

func (r *DebugInterfaceRepo) GetDetail(tenantId consts.TenantId, interfId uint) (interf model.DebugInterface, err error)

func (*DebugInterfaceRepo) GetGlobalParams

func (r *DebugInterfaceRepo) GetGlobalParams(tenantId consts.TenantId, id uint) (po []model.DebugInterfaceGlobalParam, err error)

func (*DebugInterfaceRepo) GetOAuth20

func (r *DebugInterfaceRepo) GetOAuth20(tenantId consts.TenantId, id uint) (po model.DebugInterfaceOAuth20, err error)

func (*DebugInterfaceRepo) GetSourceNameById

func (r *DebugInterfaceRepo) GetSourceNameById(tenantId consts.TenantId, id uint) (name string, err error)

func (*DebugInterfaceRepo) ListBodyFormData

func (r *DebugInterfaceRepo) ListBodyFormData(tenantId consts.TenantId, interfaceId uint) (pos []model.DebugInterfaceBodyFormDataItem, err error)

func (*DebugInterfaceRepo) ListBodyFormUrlencoded

func (r *DebugInterfaceRepo) ListBodyFormUrlencoded(tenantId consts.TenantId, interfaceId uint) (pos []model.DebugInterfaceBodyFormUrlEncodedItem, err error)

func (*DebugInterfaceRepo) ListByProject

func (r *DebugInterfaceRepo) ListByProject(tenantId consts.TenantId, projectId int) (pos []*model.DebugInterface, err error)

func (*DebugInterfaceRepo) ListCookies

func (r *DebugInterfaceRepo) ListCookies(tenantId consts.TenantId, interfaceId uint) (pos []model.DebugInterfaceCookie, err error)

func (*DebugInterfaceRepo) ListHeaders

func (r *DebugInterfaceRepo) ListHeaders(tenantId consts.TenantId, interfaceId uint) (pos []model.DebugInterfaceHeader, err error)

func (*DebugInterfaceRepo) ListParams

func (r *DebugInterfaceRepo) ListParams(tenantId consts.TenantId, interfaceId uint) (
	queryParams []model.DebugInterfaceParam, pathParams []model.DebugInterfaceParam, err error)

func (*DebugInterfaceRepo) PopulateProps

func (r *DebugInterfaceRepo) PopulateProps(tenantId consts.TenantId, po *model.DebugInterface) (err error)

func (*DebugInterfaceRepo) RemoveApiKey

func (r *DebugInterfaceRepo) RemoveApiKey(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveBasicAuth

func (r *DebugInterfaceRepo) RemoveBasicAuth(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveBearerToken

func (r *DebugInterfaceRepo) RemoveBearerToken(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveBodyFormData

func (r *DebugInterfaceRepo) RemoveBodyFormData(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveBodyFormUrlencoded

func (r *DebugInterfaceRepo) RemoveBodyFormUrlencoded(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveCookie

func (r *DebugInterfaceRepo) RemoveCookie(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveGlobalParams

func (r *DebugInterfaceRepo) RemoveGlobalParams(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveHeaders

func (r *DebugInterfaceRepo) RemoveHeaders(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) RemoveOAuth20

func (r *DebugInterfaceRepo) RemoveOAuth20(tenantId consts.TenantId, interfaceId uint) (err error)

func (*DebugInterfaceRepo) RemoveParams

func (r *DebugInterfaceRepo) RemoveParams(tenantId consts.TenantId, id uint) (err error)

func (*DebugInterfaceRepo) Save

func (r *DebugInterfaceRepo) Save(tenantId consts.TenantId, interf *model.DebugInterface) (err error)

func (*DebugInterfaceRepo) SaveInterfaces

func (r *DebugInterfaceRepo) SaveInterfaces(tenantId consts.TenantId, interf *model.DebugInterface) (err error)

func (*DebugInterfaceRepo) SetIsRange

func (r *DebugInterfaceRepo) SetIsRange(tenantId consts.TenantId, fieldId uint, b bool) (err error)

func (*DebugInterfaceRepo) SetOAuth2AccessToken

func (r *DebugInterfaceRepo) SetOAuth2AccessToken(tenantId consts.TenantId, token string, interfaceId int) (err error)

func (*DebugInterfaceRepo) SyncPath

func (r *DebugInterfaceRepo) SyncPath(tenantId consts.TenantId, endpointId, serveId uint, newPath, oldPath string)

func (*DebugInterfaceRepo) SyncServeId

func (r *DebugInterfaceRepo) SyncServeId(tenantId consts.TenantId, endpointIds []uint, serveId uint) (err error)

func (*DebugInterfaceRepo) Tested

func (r *DebugInterfaceRepo) Tested(tenantId consts.TenantId, id uint) (res bool, err error)

func (*DebugInterfaceRepo) UpdateApiKey

func (r *DebugInterfaceRepo) UpdateApiKey(tenantId consts.TenantId, id uint, payload model.DebugInterfaceApiKey) (err error)

func (*DebugInterfaceRepo) UpdateBasicAuth

func (r *DebugInterfaceRepo) UpdateBasicAuth(tenantId consts.TenantId, id uint, payload model.DebugInterfaceBasicAuth) (err error)

func (*DebugInterfaceRepo) UpdateBearerToken

func (r *DebugInterfaceRepo) UpdateBearerToken(tenantId consts.TenantId, id uint, payload model.DebugInterfaceBearerToken) (err error)

func (*DebugInterfaceRepo) UpdateBodyFormData

func (r *DebugInterfaceRepo) UpdateBodyFormData(tenantId consts.TenantId, id uint, items []model.DebugInterfaceBodyFormDataItem) (err error)

func (*DebugInterfaceRepo) UpdateBodyFormUrlencoded

func (r *DebugInterfaceRepo) UpdateBodyFormUrlencoded(tenantId consts.TenantId, id uint, items []model.DebugInterfaceBodyFormUrlEncodedItem) (err error)

func (*DebugInterfaceRepo) UpdateCookies

func (r *DebugInterfaceRepo) UpdateCookies(tenantId consts.TenantId, id uint, cookies []model.DebugInterfaceCookie) (err error)

func (*DebugInterfaceRepo) UpdateDebugInfo

func (r *DebugInterfaceRepo) UpdateDebugInfo(tenantId consts.TenantId, id uint, values map[string]interface{}) (err error)

func (*DebugInterfaceRepo) UpdateDefinePath

func (r *DebugInterfaceRepo) UpdateDefinePath(tenantId consts.TenantId, ids []uint, newPath, oldPath string) (err error)

UpdateDefinePath 如果路径没变更,则更新接口定义-调试-接口定义-用例路径

func (*DebugInterfaceRepo) UpdateGlobalParams

func (r *DebugInterfaceRepo) UpdateGlobalParams(tenantId consts.TenantId, id uint, params []model.DebugInterfaceGlobalParam) (err error)

func (*DebugInterfaceRepo) UpdateHeaders

func (r *DebugInterfaceRepo) UpdateHeaders(tenantId consts.TenantId, id uint, headers []model.DebugInterfaceHeader) (err error)

func (*DebugInterfaceRepo) UpdateInterface

func (r *DebugInterfaceRepo) UpdateInterface(tenantId consts.TenantId, interf *model.DebugInterface) (err error)

func (*DebugInterfaceRepo) UpdateName

func (r *DebugInterfaceRepo) UpdateName(tenantId consts.TenantId, req serverDomain.EndpointCase) (err error)

func (*DebugInterfaceRepo) UpdateOAuth20

func (r *DebugInterfaceRepo) UpdateOAuth20(tenantId consts.TenantId, interfaceId uint, payload model.DebugInterfaceOAuth20) (err error)

func (*DebugInterfaceRepo) UpdateOrdAndParent

func (r *DebugInterfaceRepo) UpdateOrdAndParent(tenantId consts.TenantId, interf model.DebugInterface) (err error)

func (*DebugInterfaceRepo) UpdateOrder

func (r *DebugInterfaceRepo) UpdateOrder(tenantId consts.TenantId, pos serverConsts.DropPos, targetId uint) (parentId uint, ordr int)

func (*DebugInterfaceRepo) UpdateParams

func (r *DebugInterfaceRepo) UpdateParams(tenantId consts.TenantId, id uint, queryParams, pathParams []model.DebugInterfaceParam) (err error)

func (*DebugInterfaceRepo) UpdateProcessorId

func (r *DebugInterfaceRepo) UpdateProcessorId(tenantId consts.TenantId, id, processorId uint) (err error)

func (*DebugInterfaceRepo) UpdateServeId

func (r *DebugInterfaceRepo) UpdateServeId(tenantId consts.TenantId, ids []uint, serveId uint) (err error)

type DebugInvokeRepo

type DebugInvokeRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*DebugInvokeRepo) ChangeProcessorOwner

func (r *DebugInvokeRepo) ChangeProcessorOwner(tenantId consts.TenantId, oldProcessId, newProcessId, debugInterfaceId, endpointInterfaceId uint) (err error)

func (*DebugInvokeRepo) Get

func (r *DebugInvokeRepo) Get(tenantId consts.TenantId, id uint) (po model.DebugInvoke, err error)

func (*DebugInvokeRepo) Save

func (r *DebugInvokeRepo) Save(tenantId consts.TenantId, invocation *model.DebugInvoke) (err error)

type DebugRepo

type DebugRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*DebugRepo) Delete

func (r *DebugRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DebugRepo) Get

func (r *DebugRepo) Get(tenantId consts.TenantId, id uint) (invocation model.DebugInvoke, err error)

func (*DebugRepo) GetLast

func (r *DebugRepo) GetLast(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint) (debug model.DebugInvoke, err error)

func (*DebugRepo) List

func (r *DebugRepo) List(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint) (pos []model.DebugInvoke, err error)

type DiagnoseInterfaceRepo

type DiagnoseInterfaceRepo struct {
	*BaseRepo              `inject:""`
	*DiagnoseInterfaceRepo `inject:""`
	*DebugInterfaceRepo    `inject:""`
	DB                     *gorm.DB `inject:""`
}

func (*DiagnoseInterfaceRepo) CreateInterfaceFromCurl

func (r *DiagnoseInterfaceRepo) CreateInterfaceFromCurl(tenantId consts.TenantId, interf *model.DiagnoseInterface, parent model.DiagnoseInterface) (
	err error)

func (*DiagnoseInterfaceRepo) Delete

func (r *DiagnoseInterfaceRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*DiagnoseInterfaceRepo) Get

func (r *DiagnoseInterfaceRepo) Get(tenantId consts.TenantId, id uint) (po model.DiagnoseInterface, err error)

func (*DiagnoseInterfaceRepo) GetChildren

func (r *DiagnoseInterfaceRepo) GetChildren(tenantId consts.TenantId, nodeId uint) (children []*model.DiagnoseInterface, err error)

func (*DiagnoseInterfaceRepo) GetDetail

func (r *DiagnoseInterfaceRepo) GetDetail(tenantId consts.TenantId, interfId uint) (diagnoseInterface model.DiagnoseInterface, err error)

func (*DiagnoseInterfaceRepo) GetMaxOrder

func (r *DiagnoseInterfaceRepo) GetMaxOrder(tenantId consts.TenantId, parentId uint) (order int)

func (*DiagnoseInterfaceRepo) GetTree

func (r *DiagnoseInterfaceRepo) GetTree(tenantId consts.TenantId, projectId uint) (root *serverDomain.DiagnoseInterface, err error)

func (*DiagnoseInterfaceRepo) ListByProject

func (r *DiagnoseInterfaceRepo) ListByProject(tenantId consts.TenantId, projectId uint) (pos []*model.DiagnoseInterface, err error)

func (*DiagnoseInterfaceRepo) Remove

func (*DiagnoseInterfaceRepo) Save

func (r *DiagnoseInterfaceRepo) Save(tenantId consts.TenantId, po *model.DiagnoseInterface) (err error)

func (*DiagnoseInterfaceRepo) SaveDebugData

func (r *DiagnoseInterfaceRepo) SaveDebugData(tenantId consts.TenantId, interf *model.DiagnoseInterface) (err error)

func (*DiagnoseInterfaceRepo) ToTo

func (*DiagnoseInterfaceRepo) Update

func (*DiagnoseInterfaceRepo) UpdateDebugInfo

func (r *DiagnoseInterfaceRepo) UpdateDebugInfo(tenantId consts.TenantId, interf *model.DiagnoseInterface) (err error)

func (*DiagnoseInterfaceRepo) UpdateMethod

func (r *DiagnoseInterfaceRepo) UpdateMethod(tenantId consts.TenantId, id uint, method consts.HttpMethod) (err error)

func (*DiagnoseInterfaceRepo) UpdateName

func (r *DiagnoseInterfaceRepo) UpdateName(tenantId consts.TenantId, id int, name string) (err error)

func (*DiagnoseInterfaceRepo) UpdateOrdAndParent

func (r *DiagnoseInterfaceRepo) UpdateOrdAndParent(tenantId consts.TenantId, node model.DiagnoseInterface) (err error)

func (*DiagnoseInterfaceRepo) UpdateOrder

func (r *DiagnoseInterfaceRepo) UpdateOrder(tenantId consts.TenantId, pos serverConsts.DropPos, targetId uint, projectId uint) (
	parentId uint, ordr int)

type EndpointCaseAlternativeRepo

type EndpointCaseAlternativeRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`

	EndpointRepo       *EndpointRepo       `inject:""`
	DebugInterfaceRepo *DebugInterfaceRepo `inject:""`
	ProjectRepo        *ProjectRepo        `inject:""`
	CategoryRepo       *CategoryRepo       `inject:""`
}

func (*EndpointCaseAlternativeRepo) Get

func (r *EndpointCaseAlternativeRepo) Get(tenantId consts.TenantId, id uint) (po model.EndpointCase, err error)

func (*EndpointCaseAlternativeRepo) GetCategoryEndpointCase

func (r *EndpointCaseAlternativeRepo) GetCategoryEndpointCase(tenantId consts.TenantId, projectId, serveId uint) (result []serverDomain.CategoryEndpointCase, err error)

func (*EndpointCaseAlternativeRepo) GetDetail

func (r *EndpointCaseAlternativeRepo) GetDetail(tenantId consts.TenantId, caseId uint) (endpointCase model.EndpointCase, err error)

func (*EndpointCaseAlternativeRepo) GetEndpointCount

func (r *EndpointCaseAlternativeRepo) GetEndpointCount(tenantId consts.TenantId, projectId, serveId uint) (result []serverDomain.EndpointCount, err error)

func (*EndpointCaseAlternativeRepo) List

func (r *EndpointCaseAlternativeRepo) List(tenantId consts.TenantId, caseId uint) (pos []model.EndpointCaseAlternative, err error)

func (*EndpointCaseAlternativeRepo) ListByProjectIdAndServeId

func (r *EndpointCaseAlternativeRepo) ListByProjectIdAndServeId(tenantId consts.TenantId, projectId, serveId uint) (endpointCases []*serverDomain.InterfaceCase, err error)

func (*EndpointCaseAlternativeRepo) LoadFactor

func (r *EndpointCaseAlternativeRepo) LoadFactor(tenantId consts.TenantId, caseId uint) (pos []model.EndpointCaseAlternativeFactor, err error)

func (*EndpointCaseAlternativeRepo) Remove

func (r *EndpointCaseAlternativeRepo) Remove(tenantId consts.TenantId, id uint) (err error)

func (*EndpointCaseAlternativeRepo) Save

func (r *EndpointCaseAlternativeRepo) Save(tenantId consts.TenantId, po *model.EndpointCase) (err error)

func (*EndpointCaseAlternativeRepo) SaveDebugData

func (r *EndpointCaseAlternativeRepo) SaveDebugData(tenantId consts.TenantId, interf *model.EndpointCase) (err error)

func (*EndpointCaseAlternativeRepo) SaveFactor

func (*EndpointCaseAlternativeRepo) UpdateDebugInfo

func (r *EndpointCaseAlternativeRepo) UpdateDebugInfo(tenantId consts.TenantId, interf *model.EndpointCase) (err error)

func (*EndpointCaseAlternativeRepo) UpdateDebugInterfaceId

func (r *EndpointCaseAlternativeRepo) UpdateDebugInterfaceId(tenantId consts.TenantId, debugInterfaceId, id uint) (err error)

func (*EndpointCaseAlternativeRepo) UpdateName

func (*EndpointCaseAlternativeRepo) UpdateSerialNumber

func (r *EndpointCaseAlternativeRepo) UpdateSerialNumber(tenantId consts.TenantId, id, projectId uint) (err error)

type EndpointCaseRepo

type EndpointCaseRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`

	EndpointRepo       *EndpointRepo       `inject:""`
	DebugInterfaceRepo *DebugInterfaceRepo `inject:""`
	ProjectRepo        *ProjectRepo        `inject:""`
	CategoryRepo       *CategoryRepo       `inject:""`
}

func (*EndpointCaseRepo) Get

func (r *EndpointCaseRepo) Get(tenantId consts.TenantId, id uint) (po model.EndpointCase, err error)

func (*EndpointCaseRepo) GetCategoryEndpointCase

func (r *EndpointCaseRepo) GetCategoryEndpointCase(tenantId consts.TenantId, projectId uint, serveIds consts.Integers) (result []serverDomain.CategoryEndpointCase, err error)

func (*EndpointCaseRepo) GetDetail

func (r *EndpointCaseRepo) GetDetail(tenantId consts.TenantId, caseId uint) (endpointCase model.EndpointCase, err error)

func (*EndpointCaseRepo) GetEndpointCount

func (r *EndpointCaseRepo) GetEndpointCount(tenantId consts.TenantId, projectId uint, serveIds consts.Integers) (result []serverDomain.EndpointCount, err error)

func (*EndpointCaseRepo) List

func (r *EndpointCaseRepo) List(tenantId consts.TenantId, endpointId uint) (pos []model.EndpointCase, err error)

func (*EndpointCaseRepo) ListByCaseType

func (r *EndpointCaseRepo) ListByCaseType(tenantId consts.TenantId, endpointId uint, caseTypes []consts.CaseType) (pos []model.EndpointCase, err error)

func (*EndpointCaseRepo) ListByCaseTypeAndBaseCase

func (r *EndpointCaseRepo) ListByCaseTypeAndBaseCase(tenantId consts.TenantId, caseType consts.CaseType, baseCase uint) (cases []model.EndpointCase, err error)

func (*EndpointCaseRepo) ListByProjectIdAndServeId

func (r *EndpointCaseRepo) ListByProjectIdAndServeId(tenantId consts.TenantId, projectId, serveId uint) (endpointCases []*serverDomain.InterfaceCase, err error)

func (*EndpointCaseRepo) MountChildrenForBenchmark

func (r *EndpointCaseRepo) MountChildrenForBenchmark(tenantId consts.TenantId, cases []*model.EndpointCase)

func (*EndpointCaseRepo) Paginate

func (*EndpointCaseRepo) Remove

func (r *EndpointCaseRepo) Remove(tenantId consts.TenantId, id uint) (err error)

func (*EndpointCaseRepo) Save

func (r *EndpointCaseRepo) Save(tenantId consts.TenantId, po *model.EndpointCase) (err error)

func (*EndpointCaseRepo) SaveDebugData

func (r *EndpointCaseRepo) SaveDebugData(tenantId consts.TenantId, interf *model.EndpointCase) (err error)

func (*EndpointCaseRepo) UpdateDebugInfo

func (r *EndpointCaseRepo) UpdateDebugInfo(tenantId consts.TenantId, interf *model.EndpointCase) (err error)

func (*EndpointCaseRepo) UpdateDebugInterfaceId

func (r *EndpointCaseRepo) UpdateDebugInterfaceId(tenantId consts.TenantId, debugInterfaceId, id uint) (err error)

func (*EndpointCaseRepo) UpdateInfo

func (r *EndpointCaseRepo) UpdateInfo(tenantId consts.TenantId, id uint, values map[string]interface{}) (err error)

func (*EndpointCaseRepo) UpdateName

func (r *EndpointCaseRepo) UpdateName(tenantId consts.TenantId, req serverDomain.EndpointCaseSaveReq) (err error)

func (*EndpointCaseRepo) UpdateSerialNumber

func (r *EndpointCaseRepo) UpdateSerialNumber(tenantId consts.TenantId, id, projectId uint) (err error)

type EndpointDocumentRepo

type EndpointDocumentRepo struct {
	*BaseRepo             `inject:""`
	EndpointInterfaceRepo *EndpointInterfaceRepo `inject:""`
	ServeRepo             *ServeRepo             `inject:""`
	ProjectRepo           *ProjectRepo           `inject:""`
}

func NewEndpointDocumentRepo

func NewEndpointDocumentRepo() *EndpointDocumentRepo

func (*EndpointDocumentRepo) Create

func (r *EndpointDocumentRepo) Create(tenantId consts.TenantId, req v1.DocumentVersionReq, projectId uint) (id uint, err error)

func (*EndpointDocumentRepo) DeleteById

func (r *EndpointDocumentRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*EndpointDocumentRepo) GetById

func (r *EndpointDocumentRepo) GetById(tenantId consts.TenantId, id uint) (document model.EndpointDocument, err error)

func (*EndpointDocumentRepo) GetByVersionAndProject

func (r *EndpointDocumentRepo) GetByVersionAndProject(tenantId consts.TenantId, version string, projectId uint) (document model.EndpointDocument, err error)

func (*EndpointDocumentRepo) GetIdByVersionAndProject

func (r *EndpointDocumentRepo) GetIdByVersionAndProject(tenantId consts.TenantId, req v1.DocumentVersionReq, projectId uint) (id uint, err error)

func (*EndpointDocumentRepo) ListByProject

func (r *EndpointDocumentRepo) ListByProject(tenantId consts.TenantId, projectId uint) (documents []model.EndpointDocument, err error)

func (*EndpointDocumentRepo) Update

func (r *EndpointDocumentRepo) Update(tenantId consts.TenantId, req v1.UpdateDocumentVersionReq) (err error)

type EndpointFavoriteRepo

type EndpointFavoriteRepo struct {
	*BaseRepo `inject:""`
}

func (*EndpointFavoriteRepo) Create

func (r *EndpointFavoriteRepo) Create(tenantId consts.TenantId, record model.EndpointFavorite) (err error)

func (*EndpointFavoriteRepo) Delete

func (r *EndpointFavoriteRepo) Delete(tenantId consts.TenantId, record model.EndpointFavorite) (err error)

func (*EndpointFavoriteRepo) Get

func (r *EndpointFavoriteRepo) Get(tenantId consts.TenantId, endpointId, userId uint) (ret model.EndpointFavorite)

func (*EndpointFavoriteRepo) GetEndpointIds

func (r *EndpointFavoriteRepo) GetEndpointIds(tenantId consts.TenantId, userId uint) (ids []uint, err error)

type EndpointInterfaceRepo

type EndpointInterfaceRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`

	EndpointRepo       *EndpointRepo       `inject:""`
	DebugInterfaceRepo *DebugInterfaceRepo `inject:""`
	EnvironmentRepo    *EnvironmentRepo    `inject:""`
}

func (*EndpointInterfaceRepo) AddResponseCode

func (r *EndpointInterfaceRepo) AddResponseCode(tenantId consts.TenantId, interfaceId uint, code string) (err error)

func (*EndpointInterfaceRepo) BatchGet

func (r *EndpointInterfaceRepo) BatchGet(tenantId consts.TenantId, interfaceIds []uint) (fields []model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) BatchGetByEndpointIds

func (r *EndpointInterfaceRepo) BatchGetByEndpointIds(tenantId consts.TenantId, endpointIds []uint) (fields []model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) Delete

func (r *EndpointInterfaceRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*EndpointInterfaceRepo) DeleteBatch

func (r *EndpointInterfaceRepo) DeleteBatch(tenantId consts.TenantId, ids []uint) (err error)

func (*EndpointInterfaceRepo) DeleteByEndpoint

func (r *EndpointInterfaceRepo) DeleteByEndpoint(tenantId consts.TenantId, endpointId uint) (err error)

func (*EndpointInterfaceRepo) DeleteByEndpoints

func (r *EndpointInterfaceRepo) DeleteByEndpoints(tenantId consts.TenantId, endpointIds []uint) (err error)

func (*EndpointInterfaceRepo) Get

func (r *EndpointInterfaceRepo) Get(tenantId consts.TenantId, interfaceId uint) (po model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) GetByEndpointId

func (r *EndpointInterfaceRepo) GetByEndpointId(tenantId consts.TenantId, endpointId uint) (fields []model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) GetByItem

func (r *EndpointInterfaceRepo) GetByItem(tenantId consts.TenantId, sourceType consts.SourceType, endpointId uint, method consts.HttpMethod) (res model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) GetByMethod

func (r *EndpointInterfaceRepo) GetByMethod(tenantId consts.TenantId, endpointId uint, method consts.HttpMethod) (debugInterfaceId, endpointInterfaceId uint)

func (*EndpointInterfaceRepo) GetByMethodAndPathAndServeId

func (r *EndpointInterfaceRepo) GetByMethodAndPathAndServeId(tenantId consts.TenantId, serveId uint, path string, method consts.HttpMethod) (endpointInterfaceId uint)

func (*EndpointInterfaceRepo) GetChildren

func (r *EndpointInterfaceRepo) GetChildren(tenantId consts.TenantId, defId, fieldId uint) (children []*model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) GetCookies

func (r *EndpointInterfaceRepo) GetCookies(tenantId consts.TenantId, interfaceIds []uint) (cookies map[uint][]model.EndpointInterfaceCookie, err error)

func (*EndpointInterfaceRepo) GetCountByRef

func (r *EndpointInterfaceRepo) GetCountByRef(tenantId consts.TenantId, ref string) (count int64, err error)

func (*EndpointInterfaceRepo) GetDetail

func (r *EndpointInterfaceRepo) GetDetail(tenantId consts.TenantId, interfId uint) (interf model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) GetGlobalParams

func (r *EndpointInterfaceRepo) GetGlobalParams(tenantId consts.TenantId, id, projectId uint) (ret []model.EndpointInterfaceGlobalParam, err error)

func (*EndpointInterfaceRepo) GetHeaders

func (r *EndpointInterfaceRepo) GetHeaders(tenantId consts.TenantId, interfaceIds []uint) (headers map[uint][]model.EndpointInterfaceHeader, err error)

func (*EndpointInterfaceRepo) GetIdAndModelMap

func (r *EndpointInterfaceRepo) GetIdAndModelMap(tenantId consts.TenantId, interfaceIds []uint) (res map[uint]model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) GetInterfaces

func (r *EndpointInterfaceRepo) GetInterfaces(tenantId consts.TenantId, endpointIds []uint, needDetail bool) (interfaces map[uint][]model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) GetMapGlobalParams

func (r *EndpointInterfaceRepo) GetMapGlobalParams(tenantId consts.TenantId, interfaceIds []uint) (params map[uint][]model.EndpointInterfaceGlobalParam, err error)

func (*EndpointInterfaceRepo) GetMethodsByEndpointId

func (r *EndpointInterfaceRepo) GetMethodsByEndpointId(tenantId consts.TenantId, endpointId uint) (ret []string, err error)

func (*EndpointInterfaceRepo) GetQueryParams

func (r *EndpointInterfaceRepo) GetQueryParams(tenantId consts.TenantId, interfaceIds []uint) (params map[uint][]model.EndpointInterfaceParam, err error)

func (*EndpointInterfaceRepo) GetRequestBodies

func (r *EndpointInterfaceRepo) GetRequestBodies(tenantId consts.TenantId, interfaceIds []uint) (requestBodies map[uint]model.EndpointInterfaceRequestBody, err error)

func (*EndpointInterfaceRepo) GetRequestBody

func (r *EndpointInterfaceRepo) GetRequestBody(tenantId consts.TenantId, interfaceId uint) (result model.EndpointInterfaceRequestBody, err error)

func (*EndpointInterfaceRepo) GetRequestBodyItem

func (r *EndpointInterfaceRepo) GetRequestBodyItem(tenantId consts.TenantId, requestBodyId uint) (result model.EndpointInterfaceRequestBodyItem, err error)

func (*EndpointInterfaceRepo) GetRequestBodyItems

func (r *EndpointInterfaceRepo) GetRequestBodyItems(tenantId consts.TenantId, requestBodyIds []uint) (requestBodyItems map[uint]model.EndpointInterfaceRequestBodyItem, err error)

func (*EndpointInterfaceRepo) GetResponse

func (r *EndpointInterfaceRepo) GetResponse(tenantId consts.TenantId, endpointInterfaceId uint, code string) (ret model.EndpointInterfaceResponseBody)

func (*EndpointInterfaceRepo) GetResponseBodies

func (r *EndpointInterfaceRepo) GetResponseBodies(tenantId consts.TenantId, interfaceIds []uint) (responseBodies map[uint][]model.EndpointInterfaceResponseBody, err error)

func (*EndpointInterfaceRepo) GetResponseBody

func (r *EndpointInterfaceRepo) GetResponseBody(tenantId consts.TenantId, interfaceId uint, code string) (result model.EndpointInterfaceResponseBody, err error)

func (*EndpointInterfaceRepo) GetResponseBodyHeaders

func (r *EndpointInterfaceRepo) GetResponseBodyHeaders(tenantId consts.TenantId, responseBodyIds []uint) (responseBodyHeaders map[uint][]model.EndpointInterfaceResponseBodyHeader, err error)

func (*EndpointInterfaceRepo) GetResponseBodyItem

func (r *EndpointInterfaceRepo) GetResponseBodyItem(tenantId consts.TenantId, responseBodyId uint) (result model.EndpointInterfaceResponseBodyItem, err error)

func (*EndpointInterfaceRepo) GetResponseBodyItems

func (r *EndpointInterfaceRepo) GetResponseBodyItems(tenantId consts.TenantId, responseBodyIds []uint) (responseBodyItem map[uint]model.EndpointInterfaceResponseBodyItem, err error)

func (*EndpointInterfaceRepo) GetResponseCodes

func (r *EndpointInterfaceRepo) GetResponseCodes(tenantId consts.TenantId, endpointInterfaceId uint) (codes []string)

func (*EndpointInterfaceRepo) GetResponseDefine

func (r *EndpointInterfaceRepo) GetResponseDefine(tenantId consts.TenantId, endpointId uint, method consts.HttpMethod, code string) (ret model.EndpointInterfaceResponseBodyItem, err error)

func (*EndpointInterfaceRepo) ImportEndpointData

func (r *EndpointInterfaceRepo) ImportEndpointData(tenantId consts.TenantId, req v1.ImportEndpointDataReq) (err error)

func (*EndpointInterfaceRepo) ListByEndpointId

func (r *EndpointInterfaceRepo) ListByEndpointId(tenantId consts.TenantId, endpointId uint, version string) (interfaces []model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) ListByProject

func (r *EndpointInterfaceRepo) ListByProject(tenantId consts.TenantId, projectId int) (pos []*model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) ListCookies

func (r *EndpointInterfaceRepo) ListCookies(tenantId consts.TenantId, interfaceId uint) (pos []model.EndpointInterfaceCookie, err error)

func (*EndpointInterfaceRepo) ListHeaders

func (r *EndpointInterfaceRepo) ListHeaders(tenantId consts.TenantId, interfaceId uint) (pos []model.EndpointInterfaceHeader, err error)

func (*EndpointInterfaceRepo) ListIdByEndpoint

func (r *EndpointInterfaceRepo) ListIdByEndpoint(tenantId consts.TenantId, endpointId uint) (ids []uint, err error)

func (*EndpointInterfaceRepo) ListIdByEndpoints

func (r *EndpointInterfaceRepo) ListIdByEndpoints(tenantId consts.TenantId, endpointIds []uint) (ids []uint, err error)

func (*EndpointInterfaceRepo) ListParams

func (r *EndpointInterfaceRepo) ListParams(tenantId consts.TenantId, interfaceId uint) (pos []model.EndpointInterfaceParam, err error)

func (*EndpointInterfaceRepo) ListRequestBody

func (r *EndpointInterfaceRepo) ListRequestBody(tenantId consts.TenantId, interfaceId uint) (requestBody model.EndpointInterfaceRequestBody, err error)

func (*EndpointInterfaceRepo) ListRequestBodyItem

func (r *EndpointInterfaceRepo) ListRequestBodyItem(tenantId consts.TenantId, requestBodyId uint) (requestBodyItem model.EndpointInterfaceRequestBodyItem, err error)

func (*EndpointInterfaceRepo) ListResponseBodies

func (r *EndpointInterfaceRepo) ListResponseBodies(tenantId consts.TenantId, interfaceId uint) (responseBodies []model.EndpointInterfaceResponseBody, err error)

func (*EndpointInterfaceRepo) ListResponseBodyHeaders

func (r *EndpointInterfaceRepo) ListResponseBodyHeaders(tenantId consts.TenantId, requestBodyId uint) (responseBodyHeaders []model.EndpointInterfaceResponseBodyHeader, err error)

func (*EndpointInterfaceRepo) ListResponseBodyItem

func (r *EndpointInterfaceRepo) ListResponseBodyItem(tenantId consts.TenantId, requestBodyId uint) (responseBodyItem model.EndpointInterfaceResponseBodyItem, err error)

func (*EndpointInterfaceRepo) Paginate

func (*EndpointInterfaceRepo) QueryByEndpointId

func (r *EndpointInterfaceRepo) QueryByEndpointId(tenantId consts.TenantId, endpointId uint, version string) (pos []model.EndpointInterface, err error)

func (*EndpointInterfaceRepo) RemoveAll

func (r *EndpointInterfaceRepo) RemoveAll(tenantId consts.TenantId, id uint) (err error)

func (*EndpointInterfaceRepo) RemoveCookie

func (r *EndpointInterfaceRepo) RemoveCookie(tenantId consts.TenantId, id uint) (err error)

func (*EndpointInterfaceRepo) RemoveHeaders

func (r *EndpointInterfaceRepo) RemoveHeaders(tenantId consts.TenantId, id uint) (err error)

func (*EndpointInterfaceRepo) RemoveParams

func (r *EndpointInterfaceRepo) RemoveParams(tenantId consts.TenantId, id uint) (err error)

func (*EndpointInterfaceRepo) Save

func (r *EndpointInterfaceRepo) Save(tenantId consts.TenantId, interf *model.EndpointInterface) (err error)

func (*EndpointInterfaceRepo) SaveInterfaces

func (r *EndpointInterfaceRepo) SaveInterfaces(tenantId consts.TenantId, interf *model.EndpointInterface) (err error)

func (*EndpointInterfaceRepo) SaveResponseBody

func (r *EndpointInterfaceRepo) SaveResponseBody(tenantId consts.TenantId, responseBody *model.EndpointInterfaceResponseBody) (err error)

func (*EndpointInterfaceRepo) SetDebugInterfaceId

func (r *EndpointInterfaceRepo) SetDebugInterfaceId(tenantId consts.TenantId, endpointInterfaceId, debugInterfaceId uint) (err error)

func (*EndpointInterfaceRepo) SetIsRange

func (r *EndpointInterfaceRepo) SetIsRange(tenantId consts.TenantId, fieldId uint, b bool) (err error)

func (*EndpointInterfaceRepo) Update

func (r *EndpointInterfaceRepo) Update(tenantId consts.TenantId, interf model.EndpointInterface) (err error)

func (*EndpointInterfaceRepo) UpdateCookies

func (r *EndpointInterfaceRepo) UpdateCookies(tenantId consts.TenantId, id uint, cookies []model.EndpointInterfaceCookie) (err error)

func (*EndpointInterfaceRepo) UpdateHeaders

func (r *EndpointInterfaceRepo) UpdateHeaders(tenantId consts.TenantId, id uint, headers []model.EndpointInterfaceHeader) (err error)

func (*EndpointInterfaceRepo) UpdateInterface

func (r *EndpointInterfaceRepo) UpdateInterface(tenantId consts.TenantId, interf *model.EndpointInterface) (err error)

func (*EndpointInterfaceRepo) UpdateName

func (r *EndpointInterfaceRepo) UpdateName(tenantId consts.TenantId, id int, name string) (err error)

func (*EndpointInterfaceRepo) UpdateNameByEndpointId

func (r *EndpointInterfaceRepo) UpdateNameByEndpointId(tenantId consts.TenantId, endpointId uint, name string) (err error)

func (*EndpointInterfaceRepo) UpdateParams

func (r *EndpointInterfaceRepo) UpdateParams(tenantId consts.TenantId, id uint, params []model.EndpointInterfaceParam) (err error)

func (*EndpointInterfaceRepo) UpdateRequestBody

func (r *EndpointInterfaceRepo) UpdateRequestBody(tenantId consts.TenantId, requestBody *model.EndpointInterfaceRequestBody) (err error)

func (*EndpointInterfaceRepo) UpdateResponseBodies

func (r *EndpointInterfaceRepo) UpdateResponseBodies(tenantId consts.TenantId, interfaceId uint, responseBodies []model.EndpointInterfaceResponseBody) (err error)

type EndpointMockExpectRepo

type EndpointMockExpectRepo struct {
	*BaseRepo `inject:""`
}

func (*EndpointMockExpectRepo) BatchCreateExpectRequest

func (r *EndpointMockExpectRepo) BatchCreateExpectRequest(tenantId consts.TenantId, req []model.EndpointMockExpectRequest) (err error)

func (*EndpointMockExpectRepo) BatchCreateExpectResponseHeader

func (r *EndpointMockExpectRepo) BatchCreateExpectResponseHeader(tenantId consts.TenantId, req []model.EndpointMockExpectResponseHeader) (err error)

func (*EndpointMockExpectRepo) CreateExpectRequest

func (r *EndpointMockExpectRepo) CreateExpectRequest(tenantId consts.TenantId, req model.EndpointMockExpect) (err error)

func (*EndpointMockExpectRepo) CreateExpectResponseHeaders

func (r *EndpointMockExpectRepo) CreateExpectResponseHeaders(tenantId consts.TenantId, req model.EndpointMockExpect) (err error)

func (*EndpointMockExpectRepo) DeleteById

func (r *EndpointMockExpectRepo) DeleteById(tenantId consts.TenantId, expectId uint) (err error)

func (*EndpointMockExpectRepo) DeleteDetail

func (r *EndpointMockExpectRepo) DeleteDetail(tenantId consts.TenantId, expectId uint) (err error)

func (*EndpointMockExpectRepo) DeleteDetailByExpectId

func (r *EndpointMockExpectRepo) DeleteDetailByExpectId(tenantId consts.TenantId, model interface{}, expectId uint) (err error)

func (*EndpointMockExpectRepo) Disable

func (r *EndpointMockExpectRepo) Disable(tenantId consts.TenantId, endpointId uint) (err error)

func (*EndpointMockExpectRepo) GetExpectById

func (r *EndpointMockExpectRepo) GetExpectById(tenantId consts.TenantId, expectId uint) (expect model.EndpointMockExpect, err error)

func (*EndpointMockExpectRepo) GetExpectDetail

func (r *EndpointMockExpectRepo) GetExpectDetail(tenantId consts.TenantId, expectId uint) (expect model.EndpointMockExpect, err error)

func (*EndpointMockExpectRepo) GetExpectRequest

func (r *EndpointMockExpectRepo) GetExpectRequest(tenantId consts.TenantId, expectId uint) (res map[consts.ParamIn][]model.EndpointMockExpectRequest, err error)

func (*EndpointMockExpectRepo) GetExpectResponse

func (r *EndpointMockExpectRepo) GetExpectResponse(tenantId consts.TenantId, expectId uint) (response model.EndpointMockExpectResponse, err error)

func (*EndpointMockExpectRepo) GetExpectResponseHeaders

func (r *EndpointMockExpectRepo) GetExpectResponseHeaders(tenantId consts.TenantId, expectId uint) (responseHeaders []model.EndpointMockExpectResponseHeader, err error)

func (*EndpointMockExpectRepo) GetMaxOrder

func (r *EndpointMockExpectRepo) GetMaxOrder(tenantId consts.TenantId, endpointId uint) (order int)

func (*EndpointMockExpectRepo) ListByEndpointId

func (r *EndpointMockExpectRepo) ListByEndpointId(tenantId consts.TenantId, endpointId uint) (res []model.EndpointMockExpect, err error)

func (*EndpointMockExpectRepo) Save

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

func (*EndpointMockExpectRepo) SaveOrder

func (r *EndpointMockExpectRepo) SaveOrder(tenantId consts.TenantId, ids []uint) (err error)

func (*EndpointMockExpectRepo) UpdateDisabledStatus

func (r *EndpointMockExpectRepo) UpdateDisabledStatus(tenantId consts.TenantId, expectId uint, disabled bool) (err error)

func (*EndpointMockExpectRepo) UpdateExpectName

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

type EndpointMockScriptRepo

type EndpointMockScriptRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*EndpointMockScriptRepo) Disable

func (r *EndpointMockScriptRepo) Disable(tenantId consts.TenantId, endpointId uint) (err error)

func (*EndpointMockScriptRepo) Get

func (r *EndpointMockScriptRepo) Get(tenantId consts.TenantId, endpointId uint) (script model.EndpointMockScript, err error)

func (*EndpointMockScriptRepo) Update

func (r *EndpointMockScriptRepo) Update(tenantId consts.TenantId, po model.EndpointMockScript) (err error)

type EndpointRepo

type EndpointRepo struct {
	*BaseRepo             `inject:""`
	EndpointInterfaceRepo *EndpointInterfaceRepo `inject:""`
	ServeRepo             *ServeRepo             `inject:""`
	ProjectRepo           *ProjectRepo           `inject:""`
	EndpointTagRepo       *EndpointTagRepo       `inject:""`
	EnvironmentRepo       *EnvironmentRepo       `inject:""`
	EndpointFavoriteRepo  *EndpointFavoriteRepo  `inject:""`
}

func (*EndpointRepo) BatchUpdate

func (r *EndpointRepo) BatchUpdate(tenantId consts.TenantId, ids []uint, data map[string]interface{}) error

func (*EndpointRepo) BatchUpdateCategory

func (r *EndpointRepo) BatchUpdateCategory(tenantId consts.TenantId, ids []uint, categoryId int64) error

func (*EndpointRepo) BatchUpdateStatus

func (r *EndpointRepo) BatchUpdateStatus(tenantId consts.TenantId, ids []uint, status int64) error

func (*EndpointRepo) ChangeSnapShot

func (r *EndpointRepo) ChangeSnapShot(tenantId consts.TenantId, endpointId uint, snapshot string) (err error)

func (*EndpointRepo) CombineMethodsForEndpoints

func (r *EndpointRepo) CombineMethodsForEndpoints(tenantId consts.TenantId, endpoints []*model.Endpoint)

func (*EndpointRepo) CreateEndpointSample

func (r *EndpointRepo) CreateEndpointSample(tenantId consts.TenantId, serveId uint) (endpointId uint, err error)

func (*EndpointRepo) CreateEndpoints

func (r *EndpointRepo) CreateEndpoints(tenantId consts.TenantId, endpoints []*model.Endpoint) error

func (*EndpointRepo) DeleteByCategoryIds

func (r *EndpointRepo) DeleteByCategoryIds(tenantId consts.TenantId, categoryIds []int64) (err error)

func (*EndpointRepo) DeleteById

func (r *EndpointRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*EndpointRepo) DeleteByIds

func (r *EndpointRepo) DeleteByIds(tenantId consts.TenantId, ids []uint) error

func (*EndpointRepo) DisableById

func (r *EndpointRepo) DisableById(tenantId consts.TenantId, id uint) error

func (*EndpointRepo) FavoriteList

func (r *EndpointRepo) FavoriteList(tenantId consts.TenantId, projectId, userId uint) (endpoints []model.Endpoint, err error)

func (*EndpointRepo) FindVersion

func (r *EndpointRepo) FindVersion(tenantId consts.TenantId, res *model.EndpointVersion) (err error)

func (*EndpointRepo) Get

func (r *EndpointRepo) Get(tenantId consts.TenantId, id uint) (res model.Endpoint, err error)

func (*EndpointRepo) GetAll

func (r *EndpointRepo) GetAll(tenantId consts.TenantId, id uint, version string) (endpoint model.Endpoint, err error)

func (*EndpointRepo) GetByCategoryId

func (r *EndpointRepo) GetByCategoryId(tenantId consts.TenantId, categoryId uint) (endpoints []model.Endpoint, err error)

func (*EndpointRepo) GetByEndpointIds

func (r *EndpointRepo) GetByEndpointIds(tenantId consts.TenantId, endpointIds []uint, needDetail bool) (endpoints []*model.Endpoint, err error)

func (*EndpointRepo) GetByEndpoints

func (r *EndpointRepo) GetByEndpoints(tenantId consts.TenantId, endpoints []*model.Endpoint, needDetail bool)

func (*EndpointRepo) GetByItem

func (r *EndpointRepo) GetByItem(tenantId consts.TenantId, sourceType consts.SourceType, projectId uint, path string, serveId uint, categoryId int64) (res model.Endpoint, err error)

func (*EndpointRepo) GetByNameAndProject

func (r *EndpointRepo) GetByNameAndProject(tenantId consts.TenantId, name string, projectId uint) (res model.Endpoint, err error)

func (*EndpointRepo) GetByPath

func (r *EndpointRepo) GetByPath(tenantId consts.TenantId, serveId uint, pth string, method consts.HttpMethod) (endpoints []*model.Endpoint, err error)

func (*EndpointRepo) GetByProjectId

func (r *EndpointRepo) GetByProjectId(tenantId consts.TenantId, projectId uint, needDetail bool) (endpoints []*model.Endpoint, err error)

func (*EndpointRepo) GetByServeIds

func (r *EndpointRepo) GetByServeIds(tenantId consts.TenantId, serveIds []uint, needDetail bool) (endpoints []*model.Endpoint, err error)

func (*EndpointRepo) GetCategoryCount

func (r *EndpointRepo) GetCategoryCount(tenantId consts.TenantId, result interface{}, projectId uint) (err error)

func (*EndpointRepo) GetCountByServeId

func (r *EndpointRepo) GetCountByServeId(tenantId consts.TenantId, serveId uint) (count int64, err error)

func (*EndpointRepo) GetEndpointPathParams

func (r *EndpointRepo) GetEndpointPathParams(tenantId consts.TenantId, endpointId uint) (pathParam []model.EndpointPathParam, err error)

func (*EndpointRepo) GetEntities

func (r *EndpointRepo) GetEntities(tenantId consts.TenantId, categoryId uint) (ret map[uint]interface{}, err error)

func (*EndpointRepo) GetEntity

func (r *EndpointRepo) GetEntity(tenantId consts.TenantId, id uint) (data map[string]interface{}, err error)

func (*EndpointRepo) GetFirstMethod

func (r *EndpointRepo) GetFirstMethod(tenantId consts.TenantId, id uint) (res model.EndpointInterface, err error)

func (*EndpointRepo) GetLatestVersion

func (r *EndpointRepo) GetLatestVersion(tenantId consts.TenantId, endpointId uint) (res model.EndpointVersion, err error)

func (*EndpointRepo) GetPathParams

func (r *EndpointRepo) GetPathParams(tenantId consts.TenantId, endpointIds []uint) (err error, pathParams model.EndpointPathParam)

func (*EndpointRepo) GetUsedCountByEndpointId

func (r *EndpointRepo) GetUsedCountByEndpointId(tenantId consts.TenantId, endpointId uint) (count int64, err error)

func (*EndpointRepo) GetVersionsByEndpointId

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

func (*EndpointRepo) GetWithInterface

func (r *EndpointRepo) GetWithInterface(tenantId consts.TenantId, id uint, version string) (endpoint model.Endpoint, err error)

func (*EndpointRepo) ListByProjectIdAndServeId

func (r *EndpointRepo) ListByProjectIdAndServeId(tenantId consts.TenantId, serveId uint, method consts.HttpMethod) (endpoints []*model.Endpoint, err error)

func (*EndpointRepo) ListEndpointByCategories

func (r *EndpointRepo) ListEndpointByCategories(tenantId consts.TenantId, categoryIds []uint) (ids []uint, err error)

func (*EndpointRepo) ListEndpointByCategory

func (r *EndpointRepo) ListEndpointByCategory(tenantId consts.TenantId, categoryId uint) (ids []uint, err error)

func (*EndpointRepo) MoveEntity

func (r *EndpointRepo) MoveEntity(tenantId consts.TenantId, category *model.Category) (err error)

func (*EndpointRepo) Paginate

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

func (*EndpointRepo) SaveAll

func (r *EndpointRepo) SaveAll(tenantId consts.TenantId, endpoint *model.Endpoint) (err error)

func (*EndpointRepo) UpdateAdvancedMockDisabled

func (r *EndpointRepo) UpdateAdvancedMockDisabled(tenantId consts.TenantId, endpointId uint, advancedMockDisabled bool) (err error)

func (*EndpointRepo) UpdateBodyIsChanged

func (r *EndpointRepo) UpdateBodyIsChanged(tenantId consts.TenantId, endpointId uint, changedStatus consts.ChangedStatus) (err error)

func (*EndpointRepo) UpdateCategory

func (r *EndpointRepo) UpdateCategory(tenantId consts.TenantId, id, categoryId uint) (err error)

func (*EndpointRepo) UpdateName

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

func (*EndpointRepo) UpdateSerialNumber

func (r *EndpointRepo) UpdateSerialNumber(tenantId consts.TenantId, id, projectId uint) (err error)

func (*EndpointRepo) UpdateSnapshot

func (r *EndpointRepo) UpdateSnapshot(tenantId consts.TenantId, endpointId uint, snapshot string) (err error)

func (*EndpointRepo) UpdateStatus

func (r *EndpointRepo) UpdateStatus(tenantId consts.TenantId, id uint, status int64) error

type EndpointSnapshotRepo

type EndpointSnapshotRepo struct {
	*BaseRepo             `inject:""`
	EndpointInterfaceRepo *EndpointInterfaceRepo `inject:""`
	ServeRepo             *ServeRepo             `inject:""`
	ProjectRepo           *ProjectRepo           `inject:""`
	EndpointRepo          *EndpointRepo          `inject:""`
	EndpointDocumentRepo  *EndpointDocumentRepo  `inject:""`
}

func NewEndpointSnapshotRepo

func NewEndpointSnapshotRepo() *EndpointSnapshotRepo

func (*EndpointSnapshotRepo) BatchCreateSnapshot

func (r *EndpointSnapshotRepo) BatchCreateSnapshot(tenantId consts.TenantId, req v1.DocumentVersionReq, projectId uint) (documentId uint, err error)

func (*EndpointSnapshotRepo) BatchDeleteByEndpointId

func (r *EndpointSnapshotRepo) BatchDeleteByEndpointId(tenantId consts.TenantId, endpointIds []uint, documentId uint) (err error)

func (*EndpointSnapshotRepo) DeleteById

func (r *EndpointSnapshotRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*EndpointSnapshotRepo) GetByDocumentId

func (r *EndpointSnapshotRepo) GetByDocumentId(tenantId consts.TenantId, documentId uint) (endpoints []*model.Endpoint, err error)

func (*EndpointSnapshotRepo) GetByDocumentIdAndEndpointId

func (r *EndpointSnapshotRepo) GetByDocumentIdAndEndpointId(tenantId consts.TenantId, documentId, endpointId uint) (endpoints []*model.Endpoint, err error)

func (*EndpointSnapshotRepo) GetContentByDocumentAndEndpoint

func (r *EndpointSnapshotRepo) GetContentByDocumentAndEndpoint(tenantId consts.TenantId, documentId, endpointId uint) (endpoint model.Endpoint, err error)

func (*EndpointSnapshotRepo) GetInterfaceDetail

func (r *EndpointSnapshotRepo) GetInterfaceDetail(tenantId consts.TenantId, documentId, endpointId, interfaceId uint) (interf model.EndpointInterface, err error)

func (*EndpointSnapshotRepo) UpdateContent

func (r *EndpointSnapshotRepo) UpdateContent(tenantId consts.TenantId, id uint, endpoint model.Endpoint) (err error)

type EndpointTagRepo

type EndpointTagRepo struct {
	*BaseRepo             `inject:""`
	EndpointInterfaceRepo *EndpointInterfaceRepo `inject:""`
	ServeRepo             *ServeRepo             `inject:""`
	ProjectRepo           *ProjectRepo           `inject:""`
}

func NewEndpointTagRepo

func NewEndpointTagRepo() *EndpointTagRepo

func (*EndpointTagRepo) AddRel

func (r *EndpointTagRepo) AddRel(tenantId consts.TenantId, endpointId uint, tagIds []uint) (err error)

func (*EndpointTagRepo) BatchAddRel

func (r *EndpointTagRepo) BatchAddRel(tenantId consts.TenantId, endpointId, projectId uint, tagNames []string) (err error)

func (*EndpointTagRepo) BatchAddRelForTag

func (r *EndpointTagRepo) BatchAddRelForTag(tagName string, endpointIds []uint, projectId uint) (err error)

func (*EndpointTagRepo) BatchCreate

func (r *EndpointTagRepo) BatchCreate(tenantId consts.TenantId, names []string, projectId uint) (err error)

func (*EndpointTagRepo) BatchDeleteByIds

func (r *EndpointTagRepo) BatchDeleteByIds(tenantId consts.TenantId, ids []uint) (err error)

func (*EndpointTagRepo) BatchGetById

func (r *EndpointTagRepo) BatchGetById(tenantId consts.TenantId, ids []string, projectId uint) (tags []model.EndpointTag, err error)

func (*EndpointTagRepo) BatchGetByName

func (r *EndpointTagRepo) BatchGetByName(tenantId consts.TenantId, names []string, projectId uint) (tags []model.EndpointTag, err error)

func (*EndpointTagRepo) BatchGetEndpointIdsByTag

func (r *EndpointTagRepo) BatchGetEndpointIdsByTag(tagName string, endpointIds []uint, projectId uint) (res []uint, err error)

func (*EndpointTagRepo) BatchGetIdsByName

func (r *EndpointTagRepo) BatchGetIdsByName(tenantId consts.TenantId, names []string, projectId uint) (ids []uint, err error)

func (*EndpointTagRepo) Create

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

func (*EndpointTagRepo) DeleteById

func (r *EndpointTagRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*EndpointTagRepo) DeleteRelByEndpointAndProject

func (r *EndpointTagRepo) DeleteRelByEndpointAndProject(tenantId consts.TenantId, endpointId, projectId uint) (err error)

func (*EndpointTagRepo) DeleteRelByEndpointId

func (r *EndpointTagRepo) DeleteRelByEndpointId(tenantId consts.TenantId, endpointId uint) (err error)

func (*EndpointTagRepo) GetEndpointIdsByTagNames

func (r *EndpointTagRepo) GetEndpointIdsByTagNames(tenantId consts.TenantId, tagNames []string, projectId int64) (endpointIds []uint, err error)

func (*EndpointTagRepo) GetTagIdsByEndpointId

func (r *EndpointTagRepo) GetTagIdsByEndpointId(tenantId consts.TenantId, endpointId uint) (tagIds []uint, err error)

func (*EndpointTagRepo) GetTagNamesByEndpointId

func (r *EndpointTagRepo) GetTagNamesByEndpointId(tenantId consts.TenantId, endpointId, projectId uint) (tagNames []string, err error)

func (*EndpointTagRepo) ListByProject

func (r *EndpointTagRepo) ListByProject(tenantId consts.TenantId, projectId uint) (tags []model.EndpointTag, err error)

func (*EndpointTagRepo) ListRelByEndpointId

func (r *EndpointTagRepo) ListRelByEndpointId(tenantId consts.TenantId, endpointId uint) (rel []model.EndpointTagRel, err error)

func (*EndpointTagRepo) ListRelByProject

func (r *EndpointTagRepo) ListRelByProject(tenantId consts.TenantId, projectId uint) (tags []model.EndpointTagRel, err error)

func (*EndpointTagRepo) ListRelByTagId

func (r *EndpointTagRepo) ListRelByTagId(tenantId consts.TenantId, tagId uint) (rel []model.EndpointTagRel, err error)

type EnvironmentRepo

type EnvironmentRepo struct {
	*BaseRepo   `inject:""`
	DB          *gorm.DB     `inject:""`
	ProjectRepo *ProjectRepo `inject:""`
	ServeRepo   *ServeRepo   `inject:""`
}

func (*EnvironmentRepo) AddDefaultForProject

func (r *EnvironmentRepo) AddDefaultForProject(tenantId consts.TenantId, projectId uint) (err error)

func (*EnvironmentRepo) ClearAllVar

func (r *EnvironmentRepo) ClearAllVar(tenantId consts.TenantId, environmentId uint) (err error)

func (*EnvironmentRepo) Copy

func (r *EnvironmentRepo) Copy(tenantId consts.TenantId, id int) (err error)

func (*EnvironmentRepo) Delete

func (r *EnvironmentRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*EnvironmentRepo) DeleteEnvironment

func (r *EnvironmentRepo) DeleteEnvironment(tenantId consts.TenantId, id uint) (err error)

func (*EnvironmentRepo) DeleteVar

func (r *EnvironmentRepo) DeleteVar(tenantId consts.TenantId, id uint) (err error)

func (*EnvironmentRepo) DisableAllShareVar

func (r *EnvironmentRepo) DisableAllShareVar(tenantId consts.TenantId, projectId uint) (err error)

func (*EnvironmentRepo) DisableShareVar

func (r *EnvironmentRepo) DisableShareVar(tenantId consts.TenantId, id uint) (err error)

func (*EnvironmentRepo) Get

func (r *EnvironmentRepo) Get(tenantId consts.TenantId, id uint) (env model.Environment, err error)

func (*EnvironmentRepo) GetByIds

func (r *EnvironmentRepo) GetByIds(tenantId consts.TenantId, ids []uint) (envs map[uint]model.Environment, err error)

func (*EnvironmentRepo) GetByName

func (r *EnvironmentRepo) GetByName(tenantId consts.TenantId, name string) (env model.Environment, err error)

func (*EnvironmentRepo) GetByProject

func (r *EnvironmentRepo) GetByProject(tenantId consts.TenantId, projectId uint) (env model.Environment, err error)

func (*EnvironmentRepo) GetByProjectAndName

func (r *EnvironmentRepo) GetByProjectAndName(tenantId consts.TenantId, projectId uint, name string) (env model.Environment, err error)

func (*EnvironmentRepo) GetByUserAndProject

func (r *EnvironmentRepo) GetByUserAndProject(tenantId consts.TenantId, userId, projectId uint) (env model.Environment, err error)

func (*EnvironmentRepo) GetDefaultByProject

func (r *EnvironmentRepo) GetDefaultByProject(tenantId consts.TenantId, projectId uint) (envs []model.Environment, err error)

GetDefaultByProject 默认/Mock

func (*EnvironmentRepo) GetEnvironmentById

func (r *EnvironmentRepo) GetEnvironmentById(tenantId consts.TenantId, id uint) (env *model.Environment, err error)

func (*EnvironmentRepo) GetEnvironmentDetail

func (r *EnvironmentRepo) GetEnvironmentDetail(tenantId consts.TenantId, env *model.Environment) (err error)

func (*EnvironmentRepo) GetListByProjectId

func (r *EnvironmentRepo) GetListByProjectId(tenantId consts.TenantId, projectId uint) (environments []model.Environment, err error)

func (*EnvironmentRepo) GetMaxOrder

func (r *EnvironmentRepo) GetMaxOrder(tenantId consts.TenantId, projectId uint) (order uint)

func (*EnvironmentRepo) GetProjectUserServer

func (r *EnvironmentRepo) GetProjectUserServer(tenantId consts.TenantId, projectId, userId uint) (res model.ProjectUserServer, err error)

func (*EnvironmentRepo) GetSameVar

func (r *EnvironmentRepo) GetSameVar(tenantId consts.TenantId, vari model.EnvironmentVar, envId uint) (ret model.EnvironmentVar, err error)

func (*EnvironmentRepo) GetVar

func (r *EnvironmentRepo) GetVar(tenantId consts.TenantId, id uint) (po model.EnvironmentVar, err error)

func (*EnvironmentRepo) GetVarByName

func (r *EnvironmentRepo) GetVarByName(tenantId consts.TenantId, name string, id, environmentId uint) (envVar model.EnvironmentVar, err error)

func (*EnvironmentRepo) GetVars

func (r *EnvironmentRepo) GetVars(tenantId consts.TenantId, envId uint) (vars []model.EnvironmentVar, err error)

func (*EnvironmentRepo) List

func (r *EnvironmentRepo) List(tenantId consts.TenantId, projectId int) (pos []model.Environment, err error)

func (*EnvironmentRepo) ListGlobalVar

func (r *EnvironmentRepo) ListGlobalVar(tenantId consts.TenantId, projectId uint) (vars []model.EnvironmentVar, err error)

func (*EnvironmentRepo) ListParamModel

func (r *EnvironmentRepo) ListParamModel(tenantId consts.TenantId, projectId uint) (ret []model.EnvironmentParam, err error)

func (*EnvironmentRepo) ListParams

func (r *EnvironmentRepo) ListParams(tenantId consts.TenantId, projectId uint) (res map[string]interface{}, err error)

func (*EnvironmentRepo) Save

func (r *EnvironmentRepo) Save(tenantId consts.TenantId, env *model.Environment) (err error)

func (*EnvironmentRepo) SaveEnvironment

func (r *EnvironmentRepo) SaveEnvironment(tenantId consts.TenantId, environment *model.Environment) (err error)

func (*EnvironmentRepo) SaveOrder

func (r *EnvironmentRepo) SaveOrder(tenantId consts.TenantId, ids []uint) (err error)

func (*EnvironmentRepo) SaveParams

func (r *EnvironmentRepo) SaveParams(tenantId consts.TenantId, projectId uint, params []model.EnvironmentParam) (err error)

func (*EnvironmentRepo) SaveVar

func (r *EnvironmentRepo) SaveVar(tenantId consts.TenantId, po *model.EnvironmentVar) (err error)

func (*EnvironmentRepo) SaveVars

func (r *EnvironmentRepo) SaveVars(tenantId consts.TenantId, projectId, environmentId uint, environmentVars []model.EnvironmentVar) (err error)

func (*EnvironmentRepo) SetProjectUserServer

func (r *EnvironmentRepo) SetProjectUserServer(tenantId consts.TenantId, projectId, userId, serverId uint) (err error)

type ExtractorRepo

type ExtractorRepo struct {
	*BaseRepo     `inject:""`
	DB            *gorm.DB       `inject:""`
	ConditionRepo *ConditionRepo `inject:""`
}

func (*ExtractorRepo) CreateDefault

func (r *ExtractorRepo) CreateDefault(tenantId consts.TenantId, conditionId uint) (po model.DebugConditionExtractor)

func (*ExtractorRepo) CreateLog

func (r *ExtractorRepo) CreateLog(tenantId consts.TenantId, extractor domain.ExtractorBase) (
	log model.ExecLogExtractor, err error)

func (*ExtractorRepo) Delete

func (r *ExtractorRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*ExtractorRepo) DeleteByCondition

func (r *ExtractorRepo) DeleteByCondition(tenantId consts.TenantId, conditionId uint) (err error)

func (*ExtractorRepo) Get

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

func (*ExtractorRepo) GetByInterfaceVariable

func (r *ExtractorRepo) GetByInterfaceVariable(tenantId consts.TenantId, variable string, id, debugInterfaceId uint) (extractor model.DebugConditionExtractor, err error)

func (*ExtractorRepo) GetLog

func (r *ExtractorRepo) GetLog(tenantId consts.TenantId, conditionId, invokeId uint) (ret model.ExecLogExtractor, err error)

func (*ExtractorRepo) GetParentIds

func (r *ExtractorRepo) GetParentIds(tenantId consts.TenantId, processorId uint, ids *[]uint)

func (*ExtractorRepo) ListDbOptVariableByConditions

func (r *ExtractorRepo) ListDbOptVariableByConditions(tenantId consts.TenantId, conditionIds []uint) (ret []domain.Variable, err error)

func (*ExtractorRepo) ListExtractorVariableByConditions

func (r *ExtractorRepo) ListExtractorVariableByConditions(tenantId consts.TenantId, conditionIds []uint) (ret []domain.Variable, err error)

func (*ExtractorRepo) ListLogByInvoke

func (r *ExtractorRepo) ListLogByInvoke(tenantId consts.TenantId, invokeId uint) (pos []model.ExecLogExtractor, err error)

func (*ExtractorRepo) Save

func (r *ExtractorRepo) Save(tenantId consts.TenantId, extractor *model.DebugConditionExtractor) (id uint, err error)

func (*ExtractorRepo) Update

func (r *ExtractorRepo) Update(tenantId consts.TenantId, extractor *model.DebugConditionExtractor) (err error)

func (*ExtractorRepo) UpdateDesc

func (r *ExtractorRepo) UpdateDesc(tenantId consts.TenantId, po *model.DebugConditionExtractor) (err error)

func (*ExtractorRepo) UpdateResult

func (r *ExtractorRepo) UpdateResult(tenantId consts.TenantId, extractor domain.ExtractorBase) (err error)

type IRepo

type IRepo interface {
	Save(tenantId consts.TenantId, id uint, entity interface{}) error
	GetCategoryCount(tenantId consts.TenantId, result interface{}, projectId uint) (err error)
	SaveEntity(tenantId consts.TenantId, category *model.Category) (err error)
	GetEntity(tenantId consts.TenantId, id uint) (entity map[string]interface{}, err error)
	MoveEntity(tenantId consts.TenantId, category *model.Category) (err error)
	GetEntities(tenantId consts.TenantId, id uint) (entity map[uint]interface{}, err error)
}

type IntegrationRepo

type IntegrationRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*IntegrationRepo) BatchCreateProjectEngineeringRel

func (r *IntegrationRepo) BatchCreateProjectEngineeringRel(tenantId consts.TenantId, relations []model.ProjectEngineeringRel) (err error)

func (*IntegrationRepo) BatchCreateProjectProductRel

func (r *IntegrationRepo) BatchCreateProjectProductRel(tenantId consts.TenantId, relations []model.ProjectProductRel) (err error)

func (*IntegrationRepo) BatchCreateProjectSpaceRel

func (r *IntegrationRepo) BatchCreateProjectSpaceRel(tenantId consts.TenantId, relations []model.ProjectSpaceRel) (err error)

func (*IntegrationRepo) DeleteBySpaceCode

func (r *IntegrationRepo) DeleteBySpaceCode(tenantId consts.TenantId, spaceCode string) (err error)

func (*IntegrationRepo) DeleteEngineeringByProject

func (r *IntegrationRepo) DeleteEngineeringByProject(tenantId consts.TenantId, projectId uint) (err error)

func (*IntegrationRepo) DeleteProductByProject

func (r *IntegrationRepo) DeleteProductByProject(tenantId consts.TenantId, projectId uint) (err error)

func (*IntegrationRepo) DeleteSpaceByProject

func (r *IntegrationRepo) DeleteSpaceByProject(tenantId consts.TenantId, projectId uint) (err error)

func (*IntegrationRepo) GetAllProductIds

func (r *IntegrationRepo) GetAllProductIds(tenantId consts.TenantId) (res []uint, err error)

func (*IntegrationRepo) GetAllProjectProductRels

func (r *IntegrationRepo) GetAllProjectProductRels(tenantId consts.TenantId) (res []model.ProjectProductRel, err error)

func (*IntegrationRepo) GetEngineeringByProject

func (r *IntegrationRepo) GetEngineeringByProject(tenantId consts.TenantId, projectId uint) (res []string, err error)

func (*IntegrationRepo) GetProductsByProject

func (r *IntegrationRepo) GetProductsByProject(tenantId consts.TenantId, projectId uint) (res []uint, err error)

func (*IntegrationRepo) GetProjectByEngineering

func (r *IntegrationRepo) GetProjectByEngineering(tenantId consts.TenantId, engineering string) (res []uint, err error)

func (*IntegrationRepo) GetProjectListWithRoleBySpace

func (r *IntegrationRepo) GetProjectListWithRoleBySpace(tenantId consts.TenantId, spaceCode string) (res []v1.ProjectListWithRole, err error)

func (*IntegrationRepo) GetSpacesByProject

func (r *IntegrationRepo) GetSpacesByProject(tenantId consts.TenantId, projectId uint) (res []string, err error)

type JslibRepo

type JslibRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*JslibRepo) Delete

func (r *JslibRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*JslibRepo) Disable

func (r *JslibRepo) Disable(tenantId consts.TenantId, id uint) (err error)

func (*JslibRepo) Get

func (r *JslibRepo) Get(tenantId consts.TenantId, id uint) (po model.SysJslib, err error)

func (*JslibRepo) GetByName

func (r *JslibRepo) GetByName(tenantId consts.TenantId, id, projectId uint, name string) (po model.SysJslib, err error)

func (*JslibRepo) List

func (r *JslibRepo) List(tenantId consts.TenantId, keywords string, projectId int, ignoreDisabled bool) (pos []model.SysJslib, err error)

func (*JslibRepo) Save

func (r *JslibRepo) Save(tenantId consts.TenantId, po *model.SysJslib) (err error)

func (*JslibRepo) UpdateName

func (r *JslibRepo) UpdateName(tenantId consts.TenantId, to v1.JslibReq) (err error)

type LogRepo

type LogRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB  `inject:""`
	RoleRepo  *RoleRepo `inject:""`
}

func (*LogRepo) CreateCommonLog

func (r *LogRepo) CreateCommonLog(tenantId consts.TenantId, result agentDomain.ScenarioExecResult, parentId, reportId uint) (id uint, err error)

func (*LogRepo) CreateInterfaceLog

func (r *LogRepo) CreateInterfaceLog(tenantId consts.TenantId, result agentDomain.ScenarioExecResult, parentId, reportId, invokeId uint) (id uint, err error)

func (*LogRepo) CreateLog

func (r *LogRepo) CreateLog(tenantId consts.TenantId, result agentDomain.ScenarioExecResult, parentId, reportId uint, processorToInvokeIdMap map[uint]uint) (
	id uint, err error)

func (*LogRepo) CreateLogs

func (r *LogRepo) CreateLogs(tenantId consts.TenantId, rootResult agentDomain.ScenarioExecResult, report *model.ScenarioReport, processorToInvokeIdMap map[uint]uint) (
	err error)

func (*LogRepo) DeleteById

func (r *LogRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*LogRepo) Get

func (r *LogRepo) Get(tenantId consts.TenantId, id uint) (scenario model.ExecLogProcessor, err error)

func (*LogRepo) ListByReport

func (r *LogRepo) ListByReport(tenantId consts.TenantId, reportId uint) (logs []*model.ExecLogProcessor, err error)

func (*LogRepo) Save

func (r *LogRepo) Save(tenantId consts.TenantId, log *model.ExecLogProcessor) (err error)

type MessageReadRepo

type MessageReadRepo struct {
	DB        *gorm.DB `inject:""`
	*BaseRepo `inject:""`
}

func (*MessageReadRepo) Create

func (r *MessageReadRepo) Create(tenantId consts.TenantId, req v1.MessageReadReq) (id uint, err error)

func (*MessageReadRepo) ListByMessageIds

func (r *MessageReadRepo) ListByMessageIds(tenantId consts.TenantId, messageIds []uint) (messages []model.MessageRead, err error)

type MessageRepo

type MessageRepo struct {
	*BaseRepo       `inject:""`
	DB              *gorm.DB         `inject:""`
	ProjectRepo     *ProjectRepo     `inject:""`
	MessageReadRepo *MessageReadRepo `inject:""`
}

func (*MessageRepo) Create

func (r *MessageRepo) Create(tenantId consts.TenantId, req v1.MessageReq) (id uint, bizErr *_domain.BizErr)

func (*MessageRepo) Get

func (r *MessageRepo) Get(tenantId consts.TenantId, id uint) (message model.Message, err error)

func (*MessageRepo) GetByMcsMessageId

func (r *MessageRepo) GetByMcsMessageId(tenantId consts.TenantId, McsMessageId string) (message model.Message, err error)

func (*MessageRepo) GetCombinedMessage

func (r *MessageRepo) GetCombinedMessage(tenantId consts.TenantId, businessId uint, messageSource consts.MessageSource) (message model.Message, err error)

func (*MessageRepo) GetScope

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

func (*MessageRepo) GetUnreadCount

func (r *MessageRepo) GetUnreadCount(tenantId consts.TenantId, scope v1.MessageScope) (count int64, err error)

func (*MessageRepo) ListMsgNeedAsyncToMcs

func (r *MessageRepo) ListMsgNeedAsyncToMcs(tenantId consts.TenantId) (messages []model.Message, err error)

ListMsgNeedAsyncToMcs 列出需要异步同步给mcs的消息

func (*MessageRepo) Paginate

func (r *MessageRepo) Paginate(tenantId consts.TenantId, req v1.MessageReqPaginate) (data _domain.PageData, err error)

func (*MessageRepo) UpdateCombinedSendStatus

func (r *MessageRepo) UpdateCombinedSendStatus(tenantId consts.TenantId, messageSource consts.MessageSource, businessId uint, sendStatus consts.MessageSendStatus) (err error)

func (*MessageRepo) UpdateSendStatusById

func (r *MessageRepo) UpdateSendStatusById(tenantId consts.TenantId, id uint, sendStatus consts.MessageSendStatus) (err error)

func (*MessageRepo) UpdateSendStatusByMcsMessageId

func (r *MessageRepo) UpdateSendStatusByMcsMessageId(tenantId consts.TenantId, mcsMessageId string, sendStatus consts.MessageSendStatus) (err error)

type MockJsRepo

type MockJsRepo struct {
	*BaseRepo   `inject:""`
	DB          *gorm.DB     `inject:""`
	ProjectRepo *ProjectRepo `inject:""`
	ServeRepo   *ServeRepo   `inject:""`
}

func (*MockJsRepo) BatchCreateExpression

func (r *MockJsRepo) BatchCreateExpression(tenantId consts.TenantId, pos []model.MockJsExpression) (successCount int, failItems []string, err error)

func (*MockJsRepo) CreateExpression

func (r *MockJsRepo) CreateExpression(tenantId consts.TenantId, po model.MockJsExpression) (id uint, err error)

func (*MockJsRepo) FindExpressionByName

func (r *MockJsRepo) FindExpressionByName(tenantId consts.TenantId, name string) (po model.MockJsExpression, err error)

func (*MockJsRepo) ListExpressions

func (r *MockJsRepo) ListExpressions(tenantId consts.TenantId) (tos []serverDomain.MockJsExpression, err error)

type PermRepo

type PermRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB  `inject:""`
	RoleRepo  *RoleRepo `inject:""`
}

func (*PermRepo) CheckNameAndAct

func (r *PermRepo) CheckNameAndAct(tenantId consts.TenantId, req v1.PermReq, ids ...uint) bool

checkNameAndAct

func (*PermRepo) Create

func (r *PermRepo) Create(tenantId consts.TenantId, req v1.PermReq) (uint, error)

Create

func (*PermRepo) CreateIfNotExist

func (r *PermRepo) CreateIfNotExist(tenantId consts.TenantId, perms []model.SysPerm) (count int, err error)

CreateIfNotExist

func (*PermRepo) CreateInBatches

func (r *PermRepo) CreateInBatches(tenantId consts.TenantId, perms []model.SysPerm) error

CreateInBatches

func (*PermRepo) DeleteAll

func (r *PermRepo) DeleteAll(tenantId consts.TenantId) error

DeleteAll, for init

func (*PermRepo) DeleteById

func (r *PermRepo) DeleteById(tenantId consts.TenantId, id uint) error

DeleteById

func (*PermRepo) FindById

func (r *PermRepo) FindById(tenantId consts.TenantId, id uint) (v1.PermResp, error)

FindById

func (*PermRepo) FindByNameAndAct

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

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

func (*PermRepo) GetPermsForRole

func (r *PermRepo) GetPermsForRole(tenantId consts.TenantId) ([][]string, error)

GetPermsForRole

func (*PermRepo) GetPermsForRoles

func (r *PermRepo) GetPermsForRoles(tenantId consts.TenantId) (map[consts.RoleType][][]string, error)

func (*PermRepo) Paginate

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

Paginate

func (*PermRepo) Update

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

Update

type PlanRepo

type PlanRepo struct {
	DB                   *gorm.DB `inject:""`
	*BaseRepo            `inject:""`
	ProjectRepo          *ProjectRepo          `inject:""`
	UserRepo             *UserRepo             `inject:""`
	PlanReportRepo       *PlanReportRepo       `inject:""`
	RelaPlanScenarioRepo *RelaPlanScenarioRepo `inject:""`
}

func (*PlanRepo) AddScenarios

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

func (*PlanRepo) CombinePassRate

func (r *PlanRepo) CombinePassRate(tenantId consts.TenantId, data []*model.Plan)

func (*PlanRepo) CombineUserName

func (r *PlanRepo) CombineUserName(tenantId consts.TenantId, data []*model.Plan)

func (*PlanRepo) Create

func (r *PlanRepo) Create(tenantId consts.TenantId, scenario model.Plan) (ret model.Plan, bizErr *_domain.BizErr)

func (*PlanRepo) DeleteByCategoryIds

func (r *PlanRepo) DeleteByCategoryIds(tenantId consts.TenantId, categoryIds []uint) (err error)

func (*PlanRepo) DeleteById

func (r *PlanRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*PlanRepo) DeleteChildren

func (r *PlanRepo) DeleteChildren(tenantId consts.TenantId, ids []int, tx *gorm.DB) (err error)

func (*PlanRepo) FindByName

func (r *PlanRepo) FindByName(tenantId consts.TenantId, scenarioName string, id uint) (scenario model.Plan, err error)

func (*PlanRepo) Get

func (r *PlanRepo) Get(tenantId consts.TenantId, id uint) (scenario model.Plan, err error)

func (*PlanRepo) GetCategoryCount

func (r *PlanRepo) GetCategoryCount(tenantId consts.TenantId, result interface{}, projectId uint) (err error)

func (*PlanRepo) GetChildrenIds

func (r *PlanRepo) GetChildrenIds(tenantId consts.TenantId, id uint) (ids []int, err error)

func (*PlanRepo) GetScenarioNumByPlan

func (r *PlanRepo) GetScenarioNumByPlan(tenantId consts.TenantId, planId uint) (num int64, err error)

func (*PlanRepo) ListScenario

func (r *PlanRepo) ListScenario(tenantId consts.TenantId, id uint) (pos []model.Scenario, err error)

func (*PlanRepo) ListScenarioRelation

func (r *PlanRepo) ListScenarioRelation(tenantId consts.TenantId, id uint) (pos []model.RelaPlanScenario, err error)

func (*PlanRepo) MoveScenario

func (r *PlanRepo) MoveScenario(tenantId consts.TenantId, req v1.MoveReq) (err error)

func (*PlanRepo) NotRelationScenarioList

func (r *PlanRepo) NotRelationScenarioList(tenantId consts.TenantId, req v1.NotRelationScenarioReqPaginate, projectId int) (data _domain.PageData, err error)

func (*PlanRepo) Paginate

func (r *PlanRepo) Paginate(tenantId consts.TenantId, req v1.PlanReqPaginate, projectId int) (data _domain.PageData, err error)

func (*PlanRepo) PlanScenariosPaginate

func (r *PlanRepo) PlanScenariosPaginate(tenantId consts.TenantId, req v1.PlanScenariosReqPaginate, planId uint) (data _domain.PageData, err error)

func (*PlanRepo) RemoveScenario

func (r *PlanRepo) RemoveScenario(tenantId consts.TenantId, planId int, scenarioId int) (err error)

func (*PlanRepo) RemoveScenarios

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

func (*PlanRepo) StatusDropDownOptions

func (r *PlanRepo) StatusDropDownOptions() map[consts.TestStatus]string

func (*PlanRepo) TestStageDropDownOptions

func (r *PlanRepo) TestStageDropDownOptions() map[consts.TestStage]string

func (*PlanRepo) Update

func (r *PlanRepo) Update(tenantId consts.TenantId, req model.Plan) error

func (*PlanRepo) UpdateCurrEnvId

func (r *PlanRepo) UpdateCurrEnvId(tenantId consts.TenantId, id, currEnvId uint) error

func (*PlanRepo) UpdateSerialNumber

func (r *PlanRepo) UpdateSerialNumber(tenantId consts.TenantId, id, projectId uint) (err error)

type PlanReportRepo

type PlanReportRepo struct {
	*BaseRepo          `inject:""`
	DB                 *gorm.DB            `inject:""`
	LogRepo            *LogRepo            `inject:""`
	UserRepo           *UserRepo           `inject:""`
	ScenarioReportRepo *ScenarioReportRepo `inject:""`
	ProjectRepo        *ProjectRepo        `inject:""`
	ScenarioRepo       *ScenarioRepo       `inject:""`
	PlanRepo           *PlanRepo           `inject:""`
}

func (*PlanReportRepo) ClearLogs

func (r *PlanReportRepo) ClearLogs(tenantId consts.TenantId, resultId uint) (err error)

func (*PlanReportRepo) Create

func (r *PlanReportRepo) Create(tenantId consts.TenantId, result *model.PlanReport) (err error)

func (*PlanReportRepo) DeleteById

func (r *PlanReportRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*PlanReportRepo) FindInProgressResult

func (r *PlanReportRepo) FindInProgressResult(tenantId consts.TenantId, scenarioId uint) (result model.ScenarioReport, err error)

func (*PlanReportRepo) Get

func (r *PlanReportRepo) Get(tenantId consts.TenantId, id uint) (report model.PlanReportDetail, err error)

func (*PlanReportRepo) GetCreateUserName

func (r *PlanReportRepo) GetCreateUserName(tenantId consts.TenantId, report model.PlanReportDetail) (name string, err error)

func (*PlanReportRepo) GetLastByPlanId

func (r *PlanReportRepo) GetLastByPlanId(tenantId consts.TenantId, planId uint) (report model.PlanReport, err error)

func (*PlanReportRepo) GetPlanExecNumber

func (r *PlanReportRepo) GetPlanExecNumber(tenantId consts.TenantId, planId uint) (num int64, err error)

func (*PlanReportRepo) Paginate

func (r *PlanReportRepo) Paginate(tenantId consts.TenantId, req v1.PlanReportReqPaginate, projectId int) (data _domain.PageData, err error)

func (*PlanReportRepo) ResetResult

func (r *PlanReportRepo) ResetResult(tenantId consts.TenantId, result model.ScenarioReport) (err error)

func (*PlanReportRepo) UpdateResult

func (r *PlanReportRepo) UpdateResult(tenantId consts.TenantId, report model.ScenarioReport) (err error)

func (*PlanReportRepo) UpdateSerialNumber

func (r *PlanReportRepo) UpdateSerialNumber(tenantId consts.TenantId, id, projectId uint) (err error)

func (*PlanReportRepo) UpdateStatus

func (r *PlanReportRepo) UpdateStatus(tenantId consts.TenantId, progressStatus consts.ProgressStatus, resultStatus consts.ResultStatus, scenarioId uint) (
	err error)

type ProfileRepo

type ProfileRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB  `inject:""`
	RoleRepo  *RoleRepo `inject:""`
}

func (*ProfileRepo) FindByUserId

func (r *ProfileRepo) FindByUserId(tenantId consts.TenantId, userId uint) (profile model.SysUserProfile, err error)

type ProjectCronRepo

type ProjectCronRepo struct {
	DB           *gorm.DB      `inject:""`
	UserRepo     *UserRepo     `inject:""`
	CategoryRepo *CategoryRepo `inject:""`
	*BaseRepo    `inject:""`
}

func (*ProjectCronRepo) CombineCategory

func (r *ProjectCronRepo) CombineCategory(tenantId consts.TenantId, configs []*model.ProjectCronList)

func (*ProjectCronRepo) CombineUserName

func (r *ProjectCronRepo) CombineUserName(tenantId consts.TenantId, data []*model.ProjectCronList)

func (*ProjectCronRepo) Create

func (r *ProjectCronRepo) Create(tenantId consts.TenantId, config model.ProjectCron) (id uint, err error)

func (*ProjectCronRepo) DeleteById

func (r *ProjectCronRepo) DeleteById(tenantId consts.TenantId, id uint) error

func (*ProjectCronRepo) GetById

func (r *ProjectCronRepo) GetById(tenantId consts.TenantId, id uint) (config model.ProjectCron, err error)

func (*ProjectCronRepo) ListAllCron

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

func (*ProjectCronRepo) Paginate

func (r *ProjectCronRepo) Paginate(tenantId consts.TenantId, req v1.ProjectCronReqPaginate) (data _domain.PageData, err error)

func (*ProjectCronRepo) Save

func (r *ProjectCronRepo) Save(tenantId consts.TenantId, config model.ProjectCron) (ret model.ProjectCron, err error)

func (*ProjectCronRepo) Update

func (r *ProjectCronRepo) Update(tenantId consts.TenantId, config model.ProjectCron) error

func (*ProjectCronRepo) UpdateExecErr

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

func (*ProjectCronRepo) UpdateExecResult

func (r *ProjectCronRepo) UpdateExecResult(tenantId consts.TenantId, configId uint, source consts.CronSource, execStatus consts.CronExecStatus, execErr string) (err error)

func (*ProjectCronRepo) UpdateExecStatus

func (r *ProjectCronRepo) UpdateExecStatus(tenantId consts.TenantId, configId int, source consts.CronSource, execStatus consts.CronExecStatus) (err error)

func (*ProjectCronRepo) UpdateSwitchById

func (r *ProjectCronRepo) UpdateSwitchById(tenantId consts.TenantId, id uint, switchStatus consts.SwitchStatus) error

type ProjectMenuRepo

type ProjectMenuRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*ProjectMenuRepo) BatchCreate

func (r *ProjectMenuRepo) BatchCreate(tenantId consts.TenantId, menus []model.ProjectMenu) (successCount int, failItems []string)

func (*ProjectMenuRepo) BatchInitData

func (r *ProjectMenuRepo) BatchInitData(tenantId consts.TenantId, level string) (successCount int, failItems []string)

func (*ProjectMenuRepo) Create

func (r *ProjectMenuRepo) Create(tenantId consts.TenantId, projectMenu model.ProjectMenu) (id uint, err error)

func (*ProjectMenuRepo) DeleteAllData

func (r *ProjectMenuRepo) DeleteAllData(tenantId consts.TenantId)

func (*ProjectMenuRepo) DeleteById

func (r *ProjectMenuRepo) DeleteById(tenantId consts.TenantId, id uint) error

func (*ProjectMenuRepo) FindByCode

func (r *ProjectMenuRepo) FindByCode(tenantId consts.TenantId, code string) (projectMenu model.ProjectMenu, err error)

func (*ProjectMenuRepo) GetAllMenuCodeIdMap

func (r *ProjectMenuRepo) GetAllMenuCodeIdMap(tenantId consts.TenantId) (data map[string]uint, err error)

func (*ProjectMenuRepo) GetAllMenuList

func (r *ProjectMenuRepo) GetAllMenuList(tenantId consts.TenantId) (menus []model.ProjectMenu, err error)

func (*ProjectMenuRepo) GetConfigData

func (r *ProjectMenuRepo) GetConfigData(tenantId consts.TenantId, level string) (menus []model.ProjectMenu, err error)

func (*ProjectMenuRepo) GetMenuConfig

func (r *ProjectMenuRepo) GetMenuConfig(tenantId consts.TenantId) (menuConfigs []v1.ProjectMenuConfig, err error)

func (*ProjectMenuRepo) GetRoleMenuCodeList

func (r *ProjectMenuRepo) GetRoleMenuCodeList(tenantId consts.TenantId, roleId uint) (roleMenuCodes []string, err error)

func (*ProjectMenuRepo) GetRoleMenuList

func (r *ProjectMenuRepo) GetRoleMenuList(tenantId consts.TenantId, roleId uint) (roleMenus []model.ProjectMenu, err error)

func (*ProjectMenuRepo) Update

func (r *ProjectMenuRepo) Update(tenantId consts.TenantId, req v1.ProjectMenuReq) error

type ProjectPermRepo

type ProjectPermRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*ProjectPermRepo) CreateIfNotExist

func (r *ProjectPermRepo) CreateIfNotExist(tenantId consts.TenantId, perms []model.ProjectPerm) (successCount int, failItems []string)

func (*ProjectPermRepo) GetRecordByNameAndAction

func (r *ProjectPermRepo) GetRecordByNameAndAction(tenantId consts.TenantId, name, action string) (projectPerm model.ProjectPerm, err error)

type ProjectRecentlyVisitedRepo

type ProjectRecentlyVisitedRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*ProjectRecentlyVisitedRepo) Create

func (*ProjectRecentlyVisitedRepo) FindUserLastDistinctProjects

func (r *ProjectRecentlyVisitedRepo) FindUserLastDistinctProjects(tenantId consts.TenantId, userId uint, limit int) (res []model.ProjectRecentlyVisited, err error)

func (*ProjectRecentlyVisitedRepo) FindUserLastRecord

func (r *ProjectRecentlyVisitedRepo) FindUserLastRecord(tenantId consts.TenantId, userId uint) (projectRecentlyVisited model.ProjectRecentlyVisited, err error)

func (*ProjectRecentlyVisitedRepo) FindUserProjectToday

func (r *ProjectRecentlyVisitedRepo) FindUserProjectToday(tenantId consts.TenantId, userId, projectId uint) (projectRecentlyVisited model.ProjectRecentlyVisited, err error)

type ProjectRepo

type ProjectRepo struct {
	DB                         *gorm.DB                    `inject:""`
	RoleRepo                   *RoleRepo                   `inject:""`
	ProjectRoleRepo            *ProjectRoleRepo            `inject:""`
	EnvironmentRepo            *EnvironmentRepo            `inject:""`
	UserRepo                   *UserRepo                   `inject:""`
	ServeRepo                  *ServeRepo                  `inject:""`
	EndpointRepo               *EndpointRepo               `inject:""`
	EndpointInterfaceRepo      *EndpointInterfaceRepo      `inject:""`
	ProjectRecentlyVisitedRepo *ProjectRecentlyVisitedRepo `inject:""`
	ServeServerRepo            *ServeServerRepo            `inject:""`
	ScenarioRepo               *ScenarioRepo               `inject:""`
	ScenarioNodeRepo           *ScenarioNodeRepo           `inject:""`
	ScenarioProcessorRepo      *ScenarioProcessorRepo      `inject:""`
	PlanRepo                   *PlanRepo                   `inject:""`
	EndpointMockExpectRepo     *EndpointMockExpectRepo     `inject:""`
	CategoryRepo               *CategoryRepo               `inject:""`
	ScenarioInterfaceRepo      *ScenarioInterfaceRepo      `inject:""`
	EndpointCaseRepo           *EndpointCaseRepo           `inject:""`
	DebugInterfaceRepo         *DebugInterfaceRepo         `inject:""`
	*BaseRepo                  `inject:""`
}

func (*ProjectRepo) AddMemberIfNotExisted

func (r *ProjectRepo) AddMemberIfNotExisted(tenantId consts.TenantId, projectId, userId uint, role consts.RoleType) (err error)

func (*ProjectRepo) AddProjectDefaultServe

func (r *ProjectRepo) AddProjectDefaultServe(tenantId consts.TenantId, projectId, userId uint) (serve model.Serve, err error)

func (*ProjectRepo) AddProjectMember

func (r *ProjectRepo) AddProjectMember(tenantId consts.TenantId, projectId, userId uint, role consts.RoleType) (err error)

func (*ProjectRepo) AddProjectRootEndpointCategory

func (r *ProjectRepo) AddProjectRootEndpointCategory(tenantId consts.TenantId, projectId uint) (id uint, err error)

func (*ProjectRepo) AddProjectRootPlanCategory

func (r *ProjectRepo) AddProjectRootPlanCategory(tenantId consts.TenantId, projectId uint) (err error)

func (*ProjectRepo) AddProjectRootScenarioCategory

func (r *ProjectRepo) AddProjectRootScenarioCategory(tenantId consts.TenantId, projectId uint) (err error)

func (*ProjectRepo) AddProjectRootSchemaCategory

func (r *ProjectRepo) AddProjectRootSchemaCategory(tenantId consts.TenantId, projectId uint) (err error)

func (*ProjectRepo) AddProjectRootTestCategory

func (r *ProjectRepo) AddProjectRootTestCategory(tenantId consts.TenantId, projectId, serveId uint) (err error)

func (*ProjectRepo) BatchGetByShortNames

func (r *ProjectRepo) BatchGetByShortNames(tenantId consts.TenantId, shortNames []string) (ret []model.Project, err error)

func (*ProjectRepo) ChangeProject

func (r *ProjectRepo) ChangeProject(tenantId consts.TenantId, projectId, userId uint) (err error)

func (*ProjectRepo) CombineRoleForProject

func (r *ProjectRepo) CombineRoleForProject(tenantId consts.TenantId, projects []model.Project, projectRoleMap map[uint]uint) (res []model.ProjectMemberRole, err error)

func (*ProjectRepo) Create

func (r *ProjectRepo) Create(tenantId consts.TenantId, req v1.ProjectReq, userId uint) (id uint, bizErr _domain.BizErr)

func (*ProjectRepo) CreateProjectRes

func (r *ProjectRepo) CreateProjectRes(tenantId consts.TenantId, projectId, userId uint, IncludeExample bool) (err error)

func (*ProjectRepo) CreateSample

func (r *ProjectRepo) CreateSample(tenantId consts.TenantId, projectId, serveId, userId, categoryId uint) (err error)

func (*ProjectRepo) DeleteById

func (r *ProjectRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*ProjectRepo) DeleteChildren

func (r *ProjectRepo) DeleteChildren(ids []int, tx *gorm.DB) (err error)

func (*ProjectRepo) FindRolesByProjectAndUser

func (r *ProjectRepo) FindRolesByProjectAndUser(tenantId consts.TenantId, projectId, userId uint) (projectMember model.ProjectMember, err error)

func (*ProjectRepo) FindRolesByProjectsAndUsername

func (r *ProjectRepo) FindRolesByProjectsAndUsername(tenantId consts.TenantId, username string, projectIds []uint) (members []model.ProjectMember, err error)

func (*ProjectRepo) FindRolesByUser

func (r *ProjectRepo) FindRolesByUser(tenantId consts.TenantId, userId uint) (members []model.ProjectMember, err error)

func (*ProjectRepo) Get

func (r *ProjectRepo) Get(tenantId consts.TenantId, id uint) (project model.Project, err error)

func (*ProjectRepo) GetAudit

func (r *ProjectRepo) GetAudit(tenantId consts.TenantId, id uint) (ret model.ProjectMemberAudit, err error)

func (*ProjectRepo) GetAuditByItem

func (r *ProjectRepo) GetAuditByItem(tenantId consts.TenantId, projectId, ApplyUserId uint, auditStatus []consts.AuditStatus) (ret model.ProjectMemberAudit, err error)

func (*ProjectRepo) GetAuditList

func (r *ProjectRepo) GetAuditList(tenantId consts.TenantId, req v1.AuditProjectPaginate) (data _domain.PageData, err error)

func (*ProjectRepo) GetAuditUsers

func (r *ProjectRepo) GetAuditUsers(tenantId consts.TenantId, projectId uint) (users []model.SysUser, err error)

func (*ProjectRepo) GetByCode

func (r *ProjectRepo) GetByCode(tenantId consts.TenantId, shortName string, id uint) (ret model.Project, err error)

func (*ProjectRepo) GetByName

func (r *ProjectRepo) GetByName(tenantId consts.TenantId, projectName string, id uint) (project model.Project, err error)

func (*ProjectRepo) GetByShortName

func (r *ProjectRepo) GetByShortName(tenantId consts.TenantId, shortName string) (project model.Project, err error)

func (*ProjectRepo) GetBySpec

func (r *ProjectRepo) GetBySpec(tenantId consts.TenantId, spec string) (project model.Project, err error)

func (*ProjectRepo) GetChildrenIds

func (r *ProjectRepo) GetChildrenIds(tenantId consts.TenantId, id uint) (ids []int, err error)

func (*ProjectRepo) GetCurrProjectByUser

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

func (*ProjectRepo) GetCurrProjectMemberRoleByUser

func (r *ProjectRepo) GetCurrProjectMemberRoleByUser(tenantId consts.TenantId, userId uint) (ret model.ProjectMember, err error)

func (*ProjectRepo) GetMembersByProject

func (r *ProjectRepo) GetMembersByProject(tenantId consts.TenantId, projectId uint) (ret []model.ProjectMember, err error)

func (*ProjectRepo) GetProjectIdsByUserIdAndRole

func (r *ProjectRepo) GetProjectIdsByUserIdAndRole(tenantId consts.TenantId, userId uint, roleName consts.RoleType) (projectIds []uint)

func (*ProjectRepo) GetProjectRoleMapByUser

func (r *ProjectRepo) GetProjectRoleMapByUser(tenantId consts.TenantId, userId uint) (res map[uint]uint, err error)

func (*ProjectRepo) GetProjectsAndRolesByUser

func (r *ProjectRepo) GetProjectsAndRolesByUser(tenantId consts.TenantId, userId uint) (projectIds, roleIds []uint)

func (*ProjectRepo) GetProjectsByIds

func (r *ProjectRepo) GetProjectsByIds(tenantId consts.TenantId, ids []uint) (projects []model.Project, err error)

func (*ProjectRepo) GetUserIdsByProjectAnRole

func (r *ProjectRepo) GetUserIdsByProjectAnRole(tenantId consts.TenantId, projectId, roleId uint) (projectMembers []model.ProjectMember, err error)

func (*ProjectRepo) GetUserProjectRoleMap

func (r *ProjectRepo) GetUserProjectRoleMap(tenantId consts.TenantId, username string, projectIds []uint) (res map[uint]consts.RoleType, err error)

func (*ProjectRepo) GetUsernamesByProjectAndRole

func (r *ProjectRepo) GetUsernamesByProjectAndRole(tenantId consts.TenantId, projectId, roleId uint, exceptUserName string) (imAccounts []string, err error)

func (*ProjectRepo) IfProjectMember

func (r *ProjectRepo) IfProjectMember(tenantId consts.TenantId, userId, projectId uint) (res bool, err error)

func (*ProjectRepo) ListAll

func (r *ProjectRepo) ListAll(tenantId consts.TenantId) (res []model.Project, err error)

func (*ProjectRepo) ListByUsername

func (r *ProjectRepo) ListByUsername(tenantId consts.TenantId, username string) (res []model.Project, err error)

func (*ProjectRepo) ListProjectByUser

func (r *ProjectRepo) ListProjectByUser(tenantId consts.TenantId, userId uint) (res []model.ProjectMemberRole, err error)

func (*ProjectRepo) ListProjectsRecentlyVisited

func (r *ProjectRepo) ListProjectsRecentlyVisited(tenantId consts.TenantId, userId uint) (projects []model.Project, err error)

func (*ProjectRepo) Members

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

func (*ProjectRepo) Paginate

func (r *ProjectRepo) Paginate(tenantId consts.TenantId, req v1.ProjectReqPaginate, userId uint) (data _domain.PageData, err error)

func (*ProjectRepo) RemoveMember

func (r *ProjectRepo) RemoveMember(tenantId consts.TenantId, userId, projectId int) (err error)

func (*ProjectRepo) Save

func (r *ProjectRepo) Save(tenantId consts.TenantId, po *model.Project) (err error)

func (*ProjectRepo) SaveAudit

func (r *ProjectRepo) SaveAudit(tenantId consts.TenantId, audit model.ProjectMemberAudit) (auditId uint, err error)

func (*ProjectRepo) Update

func (r *ProjectRepo) Update(tenantId consts.TenantId, req v1.ProjectReq) error

func (*ProjectRepo) UpdateAuditStatus

func (r *ProjectRepo) UpdateAuditStatus(tenantId consts.TenantId, id, auditUserId uint, status consts.AuditStatus) (err error)

func (*ProjectRepo) UpdateDefaultEnvironment

func (r *ProjectRepo) UpdateDefaultEnvironment(tenantId consts.TenantId, projectId, envId uint) (err error)

func (*ProjectRepo) UpdateProjectSource

func (r *ProjectRepo) UpdateProjectSource(tenantId consts.TenantId, projectId uint, source serverConsts.ProjectSource) (err error)

func (*ProjectRepo) UpdateUserRole

func (r *ProjectRepo) UpdateUserRole(tenantId consts.TenantId, req v1.UpdateProjectMemberReq) (err error)

type ProjectRoleMenuRepo

type ProjectRoleMenuRepo struct {
	*BaseRepo       `inject:""`
	DB              *gorm.DB         `inject:""`
	ProjectRoleRepo *ProjectRoleRepo `inject:""`
	ProjectMenuRepo *ProjectMenuRepo `inject:""`
}

func (*ProjectRoleMenuRepo) BatchCreate

func (r *ProjectRoleMenuRepo) BatchCreate(tenantId consts.TenantId, roleMenus []model.ProjectRoleMenu) (successCount int, failItems []string)

func (*ProjectRoleMenuRepo) Create

func (r *ProjectRoleMenuRepo) Create(tenantId consts.TenantId, projectRoleMenu model.ProjectRoleMenu) (err error)

func (*ProjectRoleMenuRepo) DeleteAllData

func (r *ProjectRoleMenuRepo) DeleteAllData(tenantId consts.TenantId)

func (*ProjectRoleMenuRepo) DeleteById

func (r *ProjectRoleMenuRepo) DeleteById(tenantId consts.TenantId, id uint) error

func (*ProjectRoleMenuRepo) FindByRoleAndMenu

func (r *ProjectRoleMenuRepo) FindByRoleAndMenu(tenantId consts.TenantId, roleId, menuId uint) (projectRoleMenu model.ProjectRoleMenu, err error)

func (*ProjectRoleMenuRepo) GetConfigData

func (r *ProjectRoleMenuRepo) GetConfigData(tenantId consts.TenantId) (menus []model.ProjectRoleMenu, err error)

func (*ProjectRoleMenuRepo) GetRoleMenuConfig

func (r *ProjectRoleMenuRepo) GetRoleMenuConfig() (roleMenuConfigs []v1.ProjectRoleMenuConfig, err error)

type ProjectRolePermRepo

type ProjectRolePermRepo struct {
	*BaseRepo       `inject:""`
	DB              *gorm.DB         `inject:""`
	ProjectRepo     *ProjectRepo     `inject:""`
	ProjectRoleRepo *ProjectRoleRepo `inject:""`
}

func (*ProjectRolePermRepo) AddPermForProjectRole

func (r *ProjectRolePermRepo) AddPermForProjectRole(tenantId consts.TenantId, roleName consts.RoleType, perms []uint) (successCount int, failItems []string)

func (*ProjectRolePermRepo) GetByRoleAndPerm

func (r *ProjectRolePermRepo) GetByRoleAndPerm(tenantId consts.TenantId, roleId, permId uint) (ret model.ProjectRolePerm, err error)

func (*ProjectRolePermRepo) GetProjectPermsForRole

func (r *ProjectRolePermRepo) GetProjectPermsForRole(tenantId consts.TenantId) (res map[consts.RoleType][]uint, err error)

GetProjectPermsForRole TODO: 每个角色需要的权限还未确定,需要改动

func (*ProjectRolePermRepo) PaginateRolePerms

func (r *ProjectRolePermRepo) PaginateRolePerms(tenantId consts.TenantId, req v1.ProjectRolePermPaginateReq) (data _domain.PageData, err error)

func (*ProjectRolePermRepo) UserPermList

func (r *ProjectRolePermRepo) UserPermList(tenantId consts.TenantId, req v1.ProjectUserPermsPaginate, userId uint) (data _domain.PageData, err error)

type ProjectRoleRepo

type ProjectRoleRepo struct {
	DB          *gorm.DB     `inject:""`
	ProjectRepo *ProjectRepo `inject:""`
	*BaseRepo   `inject:""`
}

func (*ProjectRoleRepo) AllRoleList

func (r *ProjectRoleRepo) AllRoleList(tenantId consts.TenantId) (projectRoles []model.ProjectRole, err error)

func (*ProjectRoleRepo) BatchCreate

func (r *ProjectRoleRepo) BatchCreate(tenantId consts.TenantId, projectRoles []model.ProjectRole) (err error)

func (*ProjectRoleRepo) Create

func (r *ProjectRoleRepo) Create(tenantId consts.TenantId, projectRole model.ProjectRole) (err error)

func (*ProjectRoleRepo) FindById

func (r *ProjectRoleRepo) FindById(tenantId consts.TenantId, id uint) (projectRole model.ProjectRole, err error)

func (*ProjectRoleRepo) FindByIds

func (r *ProjectRoleRepo) FindByIds(tenantId consts.TenantId, ids []uint) (projectRoles []model.ProjectRole, err error)

func (*ProjectRoleRepo) FindByName

func (r *ProjectRoleRepo) FindByName(tenantId consts.TenantId, name consts.RoleType) (projectRole model.ProjectRole, err error)

func (*ProjectRoleRepo) FindByNames

func (r *ProjectRoleRepo) FindByNames(tenantId consts.TenantId, names []consts.RoleType) (projectRoles []model.ProjectRole, err error)

func (*ProjectRoleRepo) GetAdminRecord

func (r *ProjectRoleRepo) GetAdminRecord(tenantId consts.TenantId) (projectRole model.ProjectRole, err error)

func (*ProjectRoleRepo) GetAllRoleNameIdMap

func (r *ProjectRoleRepo) GetAllRoleNameIdMap(tenantId consts.TenantId) (data map[consts.RoleType]uint, err error)

func (*ProjectRoleRepo) GetRoleByProjectAndUser

func (r *ProjectRoleRepo) GetRoleByProjectAndUser(tenantId consts.TenantId, projectId, userId uint) (projectRole model.ProjectRole, err error)

func (*ProjectRoleRepo) GetRoleIdNameMap

func (r *ProjectRoleRepo) GetRoleIdNameMap(tenantId consts.TenantId, roleIds []uint) (data map[uint]consts.RoleType, err error)

func (*ProjectRoleRepo) GetRoleNamesByNames

func (r *ProjectRoleRepo) GetRoleNamesByNames(tenantId consts.TenantId, names []string) (res []string, err error)

func (*ProjectRoleRepo) GetUserRecord

func (r *ProjectRoleRepo) GetUserRecord(tenantId consts.TenantId) (projectRole model.ProjectRole, err error)

func (*ProjectRoleRepo) ProjectUserRoleList

func (r *ProjectRoleRepo) ProjectUserRoleList(tenantId consts.TenantId, userId, projectId uint) (projectRole model.ProjectRole, err error)

type ProjectSettingsRepo

type ProjectSettingsRepo struct {
	*BaseRepo       `inject:""`
	CategoryRepo    *CategoryRepo    `inject:""`
	EnvironmentRepo *EnvironmentRepo `inject:""`
}

func (*ProjectSettingsRepo) DeleteSwaggerSyncById

func (r *ProjectSettingsRepo) DeleteSwaggerSyncById(tenantId consts.TenantId, id uint) error

func (*ProjectSettingsRepo) GetMock

func (r *ProjectSettingsRepo) GetMock(tenantId consts.TenantId, projectId uint) (po model.ProjectMockSetting, err error)

func (*ProjectSettingsRepo) GetSwaggerSync

func (r *ProjectSettingsRepo) GetSwaggerSync(tenantId consts.TenantId, projectId uint) (sync model.SwaggerSync, err error)

func (*ProjectSettingsRepo) GetSwaggerSyncById

func (r *ProjectSettingsRepo) GetSwaggerSyncById(tenantId consts.TenantId, id uint) (sync model.SwaggerSync, err error)

func (*ProjectSettingsRepo) GetSwaggerSyncList

func (r *ProjectSettingsRepo) GetSwaggerSyncList(tenantId consts.TenantId) (res []model.SwaggerSync, err error)

func (*ProjectSettingsRepo) SaveMock

func (r *ProjectSettingsRepo) SaveMock(tenantId consts.TenantId, po *model.ProjectMockSetting) (err error)

func (*ProjectSettingsRepo) SaveSwaggerSync

func (r *ProjectSettingsRepo) SaveSwaggerSync(tenantId consts.TenantId, sync *model.SwaggerSync) (err error)

func (*ProjectSettingsRepo) UpdateSwaggerSyncExecTimeById

func (r *ProjectSettingsRepo) UpdateSwaggerSyncExecTimeById(tenantId consts.TenantId, id uint) (err error)

type RelaPlanScenarioRepo

type RelaPlanScenarioRepo struct {
	*BaseRepo `inject:""`
}

func (*RelaPlanScenarioRepo) DecreaseOrderBefore

func (r *RelaPlanScenarioRepo) DecreaseOrderBefore(tenantId consts.TenantId, ordr int, planId uint) (err error)

func (*RelaPlanScenarioRepo) Get

func (r *RelaPlanScenarioRepo) Get(tenantId consts.TenantId, id uint) (res model.RelaPlanScenario, err error)

func (*RelaPlanScenarioRepo) GetMaxOrder

func (r *RelaPlanScenarioRepo) GetMaxOrder(tenantId consts.TenantId, planId uint) (order int)

func (*RelaPlanScenarioRepo) IncreaseOrderAfter

func (r *RelaPlanScenarioRepo) IncreaseOrderAfter(tenantId consts.TenantId, ordr int, planId uint) (err error)

func (*RelaPlanScenarioRepo) UpdateOrdrById

func (r *RelaPlanScenarioRepo) UpdateOrdrById(tenantId consts.TenantId, id uint, ordr int) (err error)

type ResponseDefineRepo

type ResponseDefineRepo struct {
	*BaseRepo             `inject:""`
	DB                    *gorm.DB               `inject:""`
	ServeRepo             *ServeRepo             `inject:""`
	EndpointRepo          *EndpointRepo          `inject:""`
	EndpointInterfaceRepo *EndpointInterfaceRepo `inject:""`
}

func (*ResponseDefineRepo) Components

func (r *ResponseDefineRepo) Components(tenantId consts.TenantId, endpointInterfaceId uint) responseDefineHelper.Components

func (*ResponseDefineRepo) CreateLog

func (r *ResponseDefineRepo) CreateLog(tenantId consts.TenantId, responseDefine domain.ResponseDefineBase) (
	log model.ExecLogResponseDefine, err error)

func (*ResponseDefineRepo) Get

func (r *ResponseDefineRepo) Get(tenantId consts.TenantId, id uint) (responseDefine model.DebugConditionResponseDefine, err error)

func (*ResponseDefineRepo) GetLog

func (r *ResponseDefineRepo) GetLog(tenantId consts.TenantId, conditionId, invokeId uint) (ret model.ExecLogResponseDefine, err error)

func (*ResponseDefineRepo) Save

func (r *ResponseDefineRepo) Save(tenantId consts.TenantId, responseDefine *model.DebugConditionResponseDefine) (err error)

func (*ResponseDefineRepo) Update

func (r *ResponseDefineRepo) Update(tenantId consts.TenantId, id uint, data map[string]interface{}) (err error)

func (*ResponseDefineRepo) UpdateResult

func (r *ResponseDefineRepo) UpdateResult(tenantId consts.TenantId, responseDefine domain.ResponseDefineBase) (err error)

type RoleRepo

type RoleRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*RoleRepo) AddPermForRole

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

AddPermForRole

func (*RoleRepo) Create

func (r *RoleRepo) Create(tenantId consts.TenantId, req v1.RoleReq) (roleId uint, err error)

func (*RoleRepo) DeleteById

func (r *RoleRepo) DeleteById(tenantId consts.TenantId, id uint) error

func (*RoleRepo) FindById

func (r *RoleRepo) FindById(tenantId consts.TenantId, id uint) (v1.RoleResp, error)

func (*RoleRepo) FindByName

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

FindByName

func (*RoleRepo) FindFirstAdminUser

func (r *RoleRepo) FindFirstAdminUser(tenantId consts.TenantId) (v1.RoleResp, error)

FindByName

func (*RoleRepo) FindInId

func (r *RoleRepo) FindInId(tenantId consts.TenantId, ids []string) (roles []v1.RoleResp, error error)

func (*RoleRepo) GetAllRoles

func (r *RoleRepo) GetAllRoles(tenantId consts.TenantId) (res []v1.RoleResp, err error)

func (*RoleRepo) GetRoleIds

func (r *RoleRepo) GetRoleIds(tenantId consts.TenantId) ([]uint, error)

func (*RoleRepo) IsAdminRole

func (r *RoleRepo) IsAdminRole(tenantId consts.TenantId, id uint) (bool, error)

func (*RoleRepo) Paginate

func (r *RoleRepo) Paginate(tenantId consts.TenantId, req v1.RoleReqPaginate) (data _domain.PageData, err error)

Paginate

func (*RoleRepo) Update

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

type SaasRepo

type SaasRepo struct {
	*BaseRepo `inject:""`
}

func (*SaasRepo) GetUserList

func (r *SaasRepo) GetUserList(tenantId consts.TenantId) (data []model.SysUser, err error)

type ScenarioInterfaceRepo

type ScenarioInterfaceRepo struct {
	*BaseRepo           `inject:""`
	DB                  *gorm.DB `inject:""`
	*DebugInterfaceRepo `inject:""`
}

func (*ScenarioInterfaceRepo) Get

func (r *ScenarioInterfaceRepo) Get(tenantId consts.TenantId, id uint) (po model.Processor, err error)

func (*ScenarioInterfaceRepo) GetDetail

func (r *ScenarioInterfaceRepo) GetDetail(tenantId consts.TenantId, processorId uint) (debugInterface model.DebugInterface, err error)

func (*ScenarioInterfaceRepo) SaveDebugData

func (r *ScenarioInterfaceRepo) SaveDebugData(tenantId consts.TenantId, interf *model.DebugInterface) (err error)

type ScenarioNodeRepo

type ScenarioNodeRepo struct {
	*BaseRepo             `inject:""`
	ScenarioProcessorRepo *ScenarioProcessorRepo `inject:""`
	ScenarioRepo          *ScenarioRepo          `inject:""`
	DebugInterfaceRepo    *DebugInterfaceRepo    `inject:""`
}

func (*ScenarioNodeRepo) CreateDefault

func (r *ScenarioNodeRepo) CreateDefault(tenantId consts.TenantId, scenarioId, projectId, createUserId uint) (po model.Processor, err error)

func (*ScenarioNodeRepo) DeleteWithChildren

func (r *ScenarioNodeRepo) DeleteWithChildren(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioNodeRepo) DisableWithChildren

func (r *ScenarioNodeRepo) DisableWithChildren(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioNodeRepo) EnableAncestors

func (r *ScenarioNodeRepo) EnableAncestors(tenantId consts.TenantId, nodeId uint) (err error)

func (*ScenarioNodeRepo) Get

func (r *ScenarioNodeRepo) Get(tenantId consts.TenantId, id uint) (processor model.Processor, err error)

func (*ScenarioNodeRepo) GetChildren

func (r *ScenarioNodeRepo) GetChildren(tenantId consts.TenantId, nodeId uint) (children []*model.Processor, err error)

func (*ScenarioNodeRepo) GetMaxOrder

func (r *ScenarioNodeRepo) GetMaxOrder(tenantId consts.TenantId, parentId uint) (order int)

func (*ScenarioNodeRepo) GetNextNode

func (r *ScenarioNodeRepo) GetNextNode(tenantId consts.TenantId, id uint) (processor model.Processor, err error)

func (*ScenarioNodeRepo) GetNumberByScenariosAndEntityCategory

func (r *ScenarioNodeRepo) GetNumberByScenariosAndEntityCategory(tenantId consts.TenantId, scenarioIds []uint, entityCategory consts.ProcessorCategory) (num int64, err error)

func (*ScenarioNodeRepo) GetPreNode

func (r *ScenarioNodeRepo) GetPreNode(tenantId consts.TenantId, id uint) (processor model.Processor, err error)

func (*ScenarioNodeRepo) GetScopeHierarchy

func (r *ScenarioNodeRepo) GetScopeHierarchy(tenantId consts.TenantId, scenarioId uint, scopeHierarchyMap *map[uint]*[]uint)

func (*ScenarioNodeRepo) IsDir

func (r *ScenarioNodeRepo) IsDir(po model.Processor) (ret bool)

func (*ScenarioNodeRepo) ListByScenario

func (r *ScenarioNodeRepo) ListByScenario(tenantId consts.TenantId, scenarioId uint) (pos []*model.Processor, err error)

func (*ScenarioNodeRepo) MakeTree

func (r *ScenarioNodeRepo) MakeTree(tenantId consts.TenantId, findIn []*agentExec.Processor, parent *agentExec.Processor)

func (*ScenarioNodeRepo) MoveMaxOrder

func (r *ScenarioNodeRepo) MoveMaxOrder(tenantId consts.TenantId, parentId, order, step uint) (err error)

func (*ScenarioNodeRepo) Save

func (r *ScenarioNodeRepo) Save(tenantId consts.TenantId, processor *model.Processor) (err error)

func (*ScenarioNodeRepo) UpdateEntityId

func (r *ScenarioNodeRepo) UpdateEntityId(tenantId consts.TenantId, id, entityId uint) error

func (*ScenarioNodeRepo) UpdateName

func (r *ScenarioNodeRepo) UpdateName(tenantId consts.TenantId, id int, name string) (err error)

func (*ScenarioNodeRepo) UpdateOrdAndParent

func (r *ScenarioNodeRepo) UpdateOrdAndParent(tenantId consts.TenantId, node model.Processor) (err error)

func (*ScenarioNodeRepo) UpdateOrder

func (r *ScenarioNodeRepo) UpdateOrder(tenantId consts.TenantId, pos serverConsts.DropPos, targetId uint) (parentId uint, ordr int, disabled bool)

type ScenarioProcessorRepo

type ScenarioProcessorRepo struct {
	DB                 *gorm.DB `inject:""`
	*BaseRepo          `inject:""`
	ScenarioNodeRepo   *ScenarioNodeRepo   `inject:""`
	ExtractorRepo      *ExtractorRepo      `inject:""`
	CheckpointRepo     *CheckpointRepo     `inject:""`
	DebugInterfaceRepo *DebugInterfaceRepo `inject:""`
}

func (*ScenarioProcessorRepo) CopyEntity

func (r *ScenarioProcessorRepo) CopyEntity(tenantId consts.TenantId, srcProcessorId, distProcessorId uint) (err error)

func (*ScenarioProcessorRepo) CopyLogic

func (r *ScenarioProcessorRepo) CopyLogic(tenantId consts.TenantId, srcId uint) (id uint, err error)

func (*ScenarioProcessorRepo) Delete

func (r *ScenarioProcessorRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioProcessorRepo) Get

func (r *ScenarioProcessorRepo) Get(tenantId consts.TenantId, id uint) (processor model.Processor, err error)

func (*ScenarioProcessorRepo) GetAll

func (r *ScenarioProcessorRepo) GetAll(tenantId consts.TenantId, scenarioId uint) (processors []model.Processor, err error)

func (*ScenarioProcessorRepo) GetAssertion

func (r *ScenarioProcessorRepo) GetAssertion(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorAssertion, err error)

func (*ScenarioProcessorRepo) GetAssertionById

func (r *ScenarioProcessorRepo) GetAssertionById(tenantId consts.TenantId, id uint) (ret model.ProcessorAssertion, err error)

func (*ScenarioProcessorRepo) GetCookie

func (r *ScenarioProcessorRepo) GetCookie(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorCookie, err error)

func (*ScenarioProcessorRepo) GetCookieById

func (r *ScenarioProcessorRepo) GetCookieById(tenantId consts.TenantId, id uint) (ret model.ProcessorCookie, err error)

func (*ScenarioProcessorRepo) GetCustomCode

func (r *ScenarioProcessorRepo) GetCustomCode(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorCustomCode, err error)

func (*ScenarioProcessorRepo) GetCustomCodeById

func (r *ScenarioProcessorRepo) GetCustomCodeById(tenantId consts.TenantId, id uint) (ret model.ProcessorCustomCode, err error)

func (*ScenarioProcessorRepo) GetData

func (r *ScenarioProcessorRepo) GetData(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorData, err error)

func (*ScenarioProcessorRepo) GetDataById

func (r *ScenarioProcessorRepo) GetDataById(tenantId consts.TenantId, id uint) (ret model.ProcessorData, err error)

func (*ScenarioProcessorRepo) GetEntity

func (r *ScenarioProcessorRepo) GetEntity(tenantId consts.TenantId, processorId uint) (ret interface{}, err error)

func (*ScenarioProcessorRepo) GetGroup

func (r *ScenarioProcessorRepo) GetGroup(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorGroup, err error)

func (*ScenarioProcessorRepo) GetGroupById

func (r *ScenarioProcessorRepo) GetGroupById(tenantId consts.TenantId, id uint) (ret model.ProcessorGroup, err error)

func (*ScenarioProcessorRepo) GetInterface

func (r *ScenarioProcessorRepo) GetInterface(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorComm, err error)

func (*ScenarioProcessorRepo) GetLogic

func (r *ScenarioProcessorRepo) GetLogic(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorLogic, err error)

func (*ScenarioProcessorRepo) GetLogicById

func (r *ScenarioProcessorRepo) GetLogicById(tenantId consts.TenantId, id uint) (ret model.ProcessorLogic, err error)

func (*ScenarioProcessorRepo) GetLoop

func (r *ScenarioProcessorRepo) GetLoop(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorLoop, err error)

func (*ScenarioProcessorRepo) GetLoopById

func (r *ScenarioProcessorRepo) GetLoopById(tenantId consts.TenantId, id uint) (ret model.ProcessorLoop, err error)

func (*ScenarioProcessorRepo) GetPrint

func (r *ScenarioProcessorRepo) GetPrint(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorPrint, err error)

func (*ScenarioProcessorRepo) GetPrintById

func (r *ScenarioProcessorRepo) GetPrintById(tenantId consts.TenantId, id uint) (ret model.ProcessorPrint, err error)

func (*ScenarioProcessorRepo) GetRoot

func (r *ScenarioProcessorRepo) GetRoot(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorComm, err error)

func (*ScenarioProcessorRepo) GetTimer

func (r *ScenarioProcessorRepo) GetTimer(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorTimer, err error)

func (*ScenarioProcessorRepo) GetTimerById

func (r *ScenarioProcessorRepo) GetTimerById(tenantId consts.TenantId, id uint) (ret model.ProcessorTimer, err error)

func (*ScenarioProcessorRepo) GetVariable

func (r *ScenarioProcessorRepo) GetVariable(tenantId consts.TenantId, processor model.Processor) (ret model.ProcessorVariable, err error)

func (*ScenarioProcessorRepo) GetVariableById

func (r *ScenarioProcessorRepo) GetVariableById(tenantId consts.TenantId, id uint) (ret model.ProcessorVariable, err error)

func (*ScenarioProcessorRepo) SaveAssertion

func (r *ScenarioProcessorRepo) SaveAssertion(tenantId consts.TenantId, po *model.ProcessorAssertion) (err error)

func (*ScenarioProcessorRepo) SaveBasicInfo

func (r *ScenarioProcessorRepo) SaveBasicInfo(tenantId consts.TenantId, req domain.ScenarioProcessorInfo) (err error)

func (*ScenarioProcessorRepo) SaveCookie

func (r *ScenarioProcessorRepo) SaveCookie(tenantId consts.TenantId, po *model.ProcessorCookie) (err error)

func (*ScenarioProcessorRepo) SaveCustomCode

func (r *ScenarioProcessorRepo) SaveCustomCode(tenantId consts.TenantId, po *model.ProcessorCustomCode) (err error)

func (*ScenarioProcessorRepo) SaveData

func (r *ScenarioProcessorRepo) SaveData(tenantId consts.TenantId, po *model.ProcessorData) (err error)

func (*ScenarioProcessorRepo) SaveGroup

func (r *ScenarioProcessorRepo) SaveGroup(tenantId consts.TenantId, po *model.ProcessorGroup) (err error)

func (*ScenarioProcessorRepo) SaveLogic

func (r *ScenarioProcessorRepo) SaveLogic(tenantId consts.TenantId, po *model.ProcessorLogic) (err error)

func (*ScenarioProcessorRepo) SaveLoop

func (r *ScenarioProcessorRepo) SaveLoop(tenantId consts.TenantId, po *model.ProcessorLoop) (err error)

func (*ScenarioProcessorRepo) SavePrint

func (r *ScenarioProcessorRepo) SavePrint(tenantId consts.TenantId, po *model.ProcessorPrint) (err error)

func (*ScenarioProcessorRepo) SaveTimer

func (r *ScenarioProcessorRepo) SaveTimer(tenantId consts.TenantId, po *model.ProcessorTimer) (err error)

func (*ScenarioProcessorRepo) SaveVariable

func (r *ScenarioProcessorRepo) SaveVariable(tenantId consts.TenantId, po *model.ProcessorVariable) (err error)

func (*ScenarioProcessorRepo) UpdateEntityId

func (r *ScenarioProcessorRepo) UpdateEntityId(tenantId consts.TenantId, id, entityId uint) (err error)

func (*ScenarioProcessorRepo) UpdateInterfaceId

func (r *ScenarioProcessorRepo) UpdateInterfaceId(tenantId consts.TenantId, id, debugInterfacceId uint) (err error)

func (*ScenarioProcessorRepo) UpdateMethod

func (r *ScenarioProcessorRepo) UpdateMethod(tenantId consts.TenantId, id uint, method consts.HttpMethod) (err error)

func (*ScenarioProcessorRepo) UpdateName

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

type ScenarioRepo

type ScenarioRepo struct {
	DB                   *gorm.DB `inject:""`
	*BaseRepo            `inject:""`
	ProjectRepo          *ProjectRepo          `inject:""`
	PlanRepo             *PlanRepo             `inject:""`
	RelaPlanScenarioRepo *RelaPlanScenarioRepo `inject:""`
}

func (*ScenarioRepo) AddPlans

func (r *ScenarioRepo) AddPlans(tenantId consts.TenantId, scenarioId uint, planIds []int) (err error)

func (*ScenarioRepo) Create

func (r *ScenarioRepo) Create(tenantId consts.TenantId, scenario model.Scenario) (ret model.Scenario, err error)

func (*ScenarioRepo) DeleteByCategoryIds

func (r *ScenarioRepo) DeleteByCategoryIds(tenantId consts.TenantId, categoryIds []uint) (err error)

func (*ScenarioRepo) DeleteById

func (r *ScenarioRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioRepo) DeleteChildren

func (r *ScenarioRepo) DeleteChildren(tenantId consts.TenantId, ids []int, tx *gorm.DB) (err error)

func (*ScenarioRepo) FindByName

func (r *ScenarioRepo) FindByName(tenantId consts.TenantId, scenarioName string, id uint) (scenario model.Scenario, err error)

func (*ScenarioRepo) Get

func (r *ScenarioRepo) Get(tenantId consts.TenantId, id uint) (scenario model.Scenario, err error)

func (*ScenarioRepo) GetByIds

func (r *ScenarioRepo) GetByIds(tenantId consts.TenantId, ids []uint) (scenarios []model.Scenario, err error)

func (*ScenarioRepo) GetCategoryCount

func (r *ScenarioRepo) GetCategoryCount(tenantId consts.TenantId, result interface{}, projectId uint) (err error)

func (*ScenarioRepo) GetChildrenIds

func (r *ScenarioRepo) GetChildrenIds(tenantId consts.TenantId, id uint) (ids []int, err error)

func (*ScenarioRepo) ListByProject

func (r *ScenarioRepo) ListByProject(tenantId consts.TenantId, projectId int) (pos []model.Scenario, err error)

func (*ScenarioRepo) ListScenarioRelation

func (r *ScenarioRepo) ListScenarioRelation(tenantId consts.TenantId, id uint) (pos []model.RelaPlanScenario, err error)

func (*ScenarioRepo) Paginate

func (r *ScenarioRepo) Paginate(tenantId consts.TenantId, req v1.ScenarioReqPaginate, projectId int) (data _domain.PageData, err error)

func (*ScenarioRepo) PlanList

func (r *ScenarioRepo) PlanList(tenantId consts.TenantId, req v1.ScenarioPlanReqPaginate, scenarioId int) (data _domain.PageData, err error)

func (*ScenarioRepo) RemovePlans

func (r *ScenarioRepo) RemovePlans(tenantId consts.TenantId, scenarioId uint, planIds []int) (err error)

func (*ScenarioRepo) Update

func (r *ScenarioRepo) Update(tenantId consts.TenantId, req model.Scenario) error

func (*ScenarioRepo) UpdateCurrEnvId

func (r *ScenarioRepo) UpdateCurrEnvId(tenantId consts.TenantId, id, currEnvId uint) error

func (*ScenarioRepo) UpdatePriority

func (r *ScenarioRepo) UpdatePriority(tenantId consts.TenantId, id uint, priority string, updateUserId uint, updateUserName string) error

func (*ScenarioRepo) UpdateSerialNumber

func (r *ScenarioRepo) UpdateSerialNumber(tenantId consts.TenantId, id, projectId uint) (err error)

func (*ScenarioRepo) UpdateStatus

func (r *ScenarioRepo) UpdateStatus(tenantId consts.TenantId, id uint, status consts.TestStatus, updateUserId uint, updateUserName string) error

type ScenarioReportRepo

type ScenarioReportRepo struct {
	*BaseRepo       `inject:""`
	DB              *gorm.DB         `inject:""`
	LogRepo         *LogRepo         `inject:""`
	ProjectRepo     *ProjectRepo     `inject:""`
	ScenarioRepo    *ScenarioRepo    `inject:""`
	UserRepo        *UserRepo        `inject:""`
	EnvironmentRepo *EnvironmentRepo `inject:""`
}

func (*ScenarioReportRepo) BatchDelete

func (r *ScenarioReportRepo) BatchDelete(tenantId consts.TenantId, planReportId uint) (err error)

func (*ScenarioReportRepo) BatchUpdatePlanReportId

func (r *ScenarioReportRepo) BatchUpdatePlanReportId(tenantId consts.TenantId, ids []uint, planReportId uint) (err error)

func (*ScenarioReportRepo) ClearLogs

func (r *ScenarioReportRepo) ClearLogs(tenantId consts.TenantId, resultId uint) (err error)

func (*ScenarioReportRepo) CombinePriority

func (r *ScenarioReportRepo) CombinePriority(tenantId consts.TenantId, data []model.ScenarioReportDetail) (res []model.ScenarioReportDetail, err error)

func (*ScenarioReportRepo) CombineUserName

func (r *ScenarioReportRepo) CombineUserName(tenantId consts.TenantId, data []*model.ScenarioReport)

func (*ScenarioReportRepo) Create

func (r *ScenarioReportRepo) Create(tenantId consts.TenantId, result *model.ScenarioReport) (bizErr *_domain.BizErr)

func (*ScenarioReportRepo) DeleteById

func (r *ScenarioReportRepo) DeleteById(tenantId consts.TenantId, id uint) (err error)

func (*ScenarioReportRepo) FindInProgressResult

func (r *ScenarioReportRepo) FindInProgressResult(tenantId consts.TenantId, scenarioId uint) (result model.ScenarioReport, err error)

func (*ScenarioReportRepo) Get

func (r *ScenarioReportRepo) Get(tenantId consts.TenantId, id uint) (report model.ScenarioReport, err error)

func (*ScenarioReportRepo) GetBaseReportsByPlanReportId

func (r *ScenarioReportRepo) GetBaseReportsByPlanReportId(tenantId consts.TenantId, planReportId uint) (reports []model.ScenarioReport, err error)

func (*ScenarioReportRepo) GetReportsByPlanReportId

func (r *ScenarioReportRepo) GetReportsByPlanReportId(tenantId consts.TenantId, planReportId uint) (reports []model.ScenarioReportDetail, err error)

func (*ScenarioReportRepo) Paginate

func (r *ScenarioReportRepo) Paginate(tenantId consts.TenantId, req v1.ReportReqPaginate) (data _domain.PageData, err error)

func (*ScenarioReportRepo) ResetResult

func (r *ScenarioReportRepo) ResetResult(tenantId consts.TenantId, result model.ScenarioReport) (err error)

func (*ScenarioReportRepo) UpdatePlanReportId

func (r *ScenarioReportRepo) UpdatePlanReportId(tenantId consts.TenantId, id, planReportId uint) (err error)

func (*ScenarioReportRepo) UpdateResult

func (r *ScenarioReportRepo) UpdateResult(tenantId consts.TenantId, report model.ScenarioReport) (err error)

func (*ScenarioReportRepo) UpdateSerialNumber

func (r *ScenarioReportRepo) UpdateSerialNumber(tenantId consts.TenantId, id, projectId uint) (err error)

func (*ScenarioReportRepo) UpdateStatus

func (r *ScenarioReportRepo) UpdateStatus(tenantId consts.TenantId, progressStatus consts.ProgressStatus, resultStatus consts.ResultStatus, scenarioId uint) (
	err error)

type ScriptRepo

type ScriptRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*ScriptRepo) CreateDefault

func (r *ScriptRepo) CreateDefault(tenantId consts.TenantId, conditionId uint, src consts.ConditionSrc) (po model.DebugConditionScript)

func (*ScriptRepo) CreateLog

func (r *ScriptRepo) CreateLog(tenantId consts.TenantId, script domain.ScriptBase) (
	log model.ExecLogScript, err error)

func (*ScriptRepo) Delete

func (r *ScriptRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*ScriptRepo) DeleteByCondition

func (r *ScriptRepo) DeleteByCondition(tenantId consts.TenantId, conditionId uint) (err error)

func (*ScriptRepo) Get

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

func (*ScriptRepo) GetByCondition

func (r *ScriptRepo) GetByCondition(tenantId consts.TenantId, conditionId uint) (script model.DebugConditionScript, err error)

func (*ScriptRepo) GetByName

func (r *ScriptRepo) GetByName(tenantId consts.TenantId, name string, interfaceId uint) (script model.DebugConditionScript, err error)

func (*ScriptRepo) GetLog

func (r *ScriptRepo) GetLog(tenantId consts.TenantId, conditionId, invokeId uint) (ret model.ExecLogScript, err error)

func (*ScriptRepo) Save

func (r *ScriptRepo) Save(tenantId consts.TenantId, script *model.DebugConditionScript) (err error)

func (*ScriptRepo) UpdateResult

func (r *ScriptRepo) UpdateResult(tenantId consts.TenantId, script domain.ScriptBase) (err error)

type ServeRepo

type ServeRepo struct {
	*BaseRepo       `inject:""`
	CategoryRepo    *CategoryRepo    `inject:""`
	EnvironmentRepo *EnvironmentRepo `inject:""`
}

func (*ServeRepo) AddDefaultCategory

func (r *ServeRepo) AddDefaultCategory(tenantId consts.TenantId, projectId uint) (err error)

func (*ServeRepo) AddDefaultServer

func (r *ServeRepo) AddDefaultServer(tenantId consts.TenantId, projectId, serveId uint) (err error)

func (*ServeRepo) AddDefaultTestCategory

func (r *ServeRepo) AddDefaultTestCategory(tenantId consts.TenantId, projectId uint) (err error)

func (*ServeRepo) BatchUpdateSchemaProjectByServeId

func (r *ServeRepo) BatchUpdateSchemaProjectByServeId(tenantId consts.TenantId, serveIds []uint, projectId uint) (err error)

func (*ServeRepo) BindEndpoint

func (r *ServeRepo) BindEndpoint(tenantId consts.TenantId, serveId int64, serveVersion string, serveEndpointVersion []model.ServeEndpointVersion) (err error)

func (*ServeRepo) ChangeServe

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

func (*ServeRepo) CopyEndpoints

func (r *ServeRepo) CopyEndpoints(tenantId consts.TenantId, endpoints []model.ServeEndpointVersion, version string) (err error)

func (*ServeRepo) CopyEndpointsVersionRef

func (r *ServeRepo) CopyEndpointsVersionRef(tenantId consts.TenantId, version *model.ServeVersion) (err error)

func (*ServeRepo) CreateSchemas

func (r *ServeRepo) CreateSchemas(tenantId consts.TenantId, schemas []*model.ComponentSchema) (err error)

func (*ServeRepo) CreateServeSample

func (r *ServeRepo) CreateServeSample(tenantId consts.TenantId, projectId uint) (serveId uint, err error)

func (*ServeRepo) DeleteById

func (r *ServeRepo) DeleteById(tenantId consts.TenantId, id uint) error

func (*ServeRepo) DeleteSaveServeEndpointVersions

func (r *ServeRepo) DeleteSaveServeEndpointVersions(tenantId consts.TenantId, serveId int64, version string) error

func (*ServeRepo) DeleteSchemaById

func (r *ServeRepo) DeleteSchemaById(tenantId consts.TenantId, id uint) error

func (*ServeRepo) DeleteSecurityId

func (r *ServeRepo) DeleteSecurityId(tenantId consts.TenantId, id uint) error

func (*ServeRepo) DeleteVersionById

func (r *ServeRepo) DeleteVersionById(tenantId consts.TenantId, id uint) error

func (*ServeRepo) DisableById

func (r *ServeRepo) DisableById(tenantId consts.TenantId, id uint) error

func (*ServeRepo) DisableVersionById

func (r *ServeRepo) DisableVersionById(tenantId consts.TenantId, id uint) error

func (*ServeRepo) Get

func (r *ServeRepo) Get(tenantId consts.TenantId, id uint) (res model.Serve, err error)

func (*ServeRepo) GetBindEndpointIds

func (r *ServeRepo) GetBindEndpointIds(tenantId consts.TenantId, serveId uint, version string) (ids []int64, err error)

func (*ServeRepo) GetBindEndpoints

func (r *ServeRepo) GetBindEndpoints(tenantId consts.TenantId, serveId uint, version string) (endpoints []model.ServeEndpointVersion, err error)

func (*ServeRepo) GetByCode

func (r *ServeRepo) GetByCode(tenantId consts.TenantId, projectId uint, shortName string) (ret model.Serve, err error)

func (*ServeRepo) GetComponentByItem

func (r *ServeRepo) GetComponentByItem(tenantId consts.TenantId, sourceType consts.SourceType, projectId uint, ref string) (res model.ComponentSchema, err error)

func (*ServeRepo) GetCountByProject

func (r *ServeRepo) GetCountByProject(tenantId consts.TenantId, projectId uint) (count int64, err error)

func (*ServeRepo) GetCurrServeByUser

func (r *ServeRepo) GetCurrServeByUser(tenantId consts.TenantId, userId uint) (currServe model.Serve, err error)

func (*ServeRepo) GetCurrServerByUser

func (r *ServeRepo) GetCurrServerByUser(tenantId consts.TenantId, projectId, serveId, userId uint) (currServer model.ServeServer, err error)

func (*ServeRepo) GetDefault

func (r *ServeRepo) GetDefault(tenantId consts.TenantId, projectId uint) (res model.Serve, err error)

func (*ServeRepo) GetDefaultServer

func (r *ServeRepo) GetDefaultServer(tenantId consts.TenantId, serveId uint) (server model.ServeServer, err error)

func (*ServeRepo) GetLatestVersion

func (r *ServeRepo) GetLatestVersion(tenantId consts.TenantId, serveId uint) (res model.ServeVersion, err error)

func (*ServeRepo) GetSchema

func (r *ServeRepo) GetSchema(tenantId consts.TenantId, id uint) (res model.ComponentSchema, err error)

func (*ServeRepo) GetSchemaByRef

func (r *ServeRepo) GetSchemaByRef(tenantId consts.TenantId, projectId uint, ref string) (res model.ComponentSchema, err error)

func (*ServeRepo) GetSchemaRef

func (r *ServeRepo) GetSchemaRef(tenantId consts.TenantId, schemaId uint) (ref string, err error)

func (*ServeRepo) GetSchemas

func (r *ServeRepo) GetSchemas(tenantId consts.TenantId, serveIs []uint) (res []model.ComponentSchema, err error)

func (*ServeRepo) GetSchemasByProjectId

func (r *ServeRepo) GetSchemasByProjectId(tenantId consts.TenantId, projectId uint, options ...[]interface{}) (res []model.ComponentSchema, err error)

func (*ServeRepo) GetSchemasByServeId

func (r *ServeRepo) GetSchemasByServeId(tenantId consts.TenantId, serveId uint) (res []model.ComponentSchema, err error)

func (*ServeRepo) GetSecurities

func (r *ServeRepo) GetSecurities(tenantId consts.TenantId, serveIs []uint) (res []model.ComponentSchemaSecurity, err error)

func (*ServeRepo) GetServerCountByEnvironmentId

func (r *ServeRepo) GetServerCountByEnvironmentId(tenantId consts.TenantId, environmentId uint) (count int64, err error)

func (*ServeRepo) GetServers

func (r *ServeRepo) GetServers(tenantId consts.TenantId, serveIs []uint) (res []model.ServeServer, err error)

func (*ServeRepo) GetServesByIds

func (r *ServeRepo) GetServesByIds(tenantId consts.TenantId, ids []uint) (serves []model.Serve, err error)

func (*ServeRepo) GetSwaggerSync

func (r *ServeRepo) GetSwaggerSync(tenantId consts.TenantId, projectId uint) (sync model.SwaggerSync, err error)

func (*ServeRepo) GetSwaggerSyncById

func (r *ServeRepo) GetSwaggerSyncById(tenantId consts.TenantId, id uint) (sync model.SwaggerSync, err error)

func (*ServeRepo) GetSwaggerSyncList

func (r *ServeRepo) GetSwaggerSyncList(tenantId consts.TenantId) (res []model.SwaggerSync, err error)

func (*ServeRepo) ListAll

func (r *ServeRepo) ListAll(tenantId consts.TenantId) (res []model.Serve, err error)

func (*ServeRepo) ListByProject

func (r *ServeRepo) ListByProject(tenantId consts.TenantId, projectId uint) (pos []model.Serve, err error)

func (*ServeRepo) ListByProjects

func (r *ServeRepo) ListByProjects(tenantId consts.TenantId, projectIds []uint) (pos []model.Serve, err error)

func (*ServeRepo) ListSecurity

func (r *ServeRepo) ListSecurity(tenantId consts.TenantId, serveId uint) (res []model.ComponentSchemaSecurity, err error)

func (*ServeRepo) ListServer

func (r *ServeRepo) ListServer(tenantId consts.TenantId, serveId uint) (servers model.ServeServerArr, err error)

func (*ServeRepo) ListVersion

func (r *ServeRepo) ListVersion(tenantId consts.TenantId, serveId uint) (res []model.ServeVersion, err error)

func (*ServeRepo) Paginate

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

func (*ServeRepo) PaginateSchema

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

func (*ServeRepo) PaginateSecurity

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

func (*ServeRepo) PaginateVersion

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

func (*ServeRepo) SaveSchemas

func (r *ServeRepo) SaveSchemas(tenantId consts.TenantId, schemas []*model.ComponentSchema) (err error)

func (*ServeRepo) SaveServe

func (r *ServeRepo) SaveServe(tenantId consts.TenantId, serve *model.Serve) (err error)

func (*ServeRepo) SaveServeEndpointVersions

func (r *ServeRepo) SaveServeEndpointVersions(tenantId consts.TenantId, versions []model.ServeEndpointVersion) error

func (*ServeRepo) SaveServer

func (r *ServeRepo) SaveServer(tenantId consts.TenantId, environmentId uint, environmentName string, servers []model.ServeServer) (err error)

func (*ServeRepo) SaveServerForServe

func (r *ServeRepo) SaveServerForServe(tenantId consts.TenantId, serveId uint, servers []model.ServeServer) (err error)

func (*ServeRepo) SaveSwaggerSync

func (r *ServeRepo) SaveSwaggerSync(tenantId consts.TenantId, sync *model.SwaggerSync) (err error)

func (*ServeRepo) SaveVersion

func (r *ServeRepo) SaveVersion(tenantId consts.TenantId, id uint, version *model.ServeVersion) (err error)

func (*ServeRepo) SchemaExist

func (r *ServeRepo) SchemaExist(tenantId consts.TenantId, id, serveId uint, name string) (res bool)

func (*ServeRepo) SecurityExist

func (r *ServeRepo) SecurityExist(tenantId consts.TenantId, id, serveId uint, name string) (res bool)

func (*ServeRepo) ServeExist

func (r *ServeRepo) ServeExist(tenantId consts.TenantId, id, projectId uint, name string) (res bool)

func (*ServeRepo) SetCurrServeByUser

func (r *ServeRepo) SetCurrServeByUser(tenantId consts.TenantId, serveId, userId uint) (err error)

func (*ServeRepo) SetCurrServerByUser

func (r *ServeRepo) SetCurrServerByUser(tenantId consts.TenantId, serverId, userId uint) (err error)

func (*ServeRepo) UpdateSwaggerSyncExecTimeById

func (r *ServeRepo) UpdateSwaggerSyncExecTimeById(tenantId consts.TenantId, id uint) (err error)

func (*ServeRepo) VersionExist

func (r *ServeRepo) VersionExist(tenantId consts.TenantId, id, serveId uint, value string) (res bool)

type ServeServerRepo

type ServeServerRepo struct {
	*BaseRepo       `inject:""`
	CategoryRepo    *CategoryRepo    `inject:""`
	EnvironmentRepo *EnvironmentRepo `inject:""`

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

func (*ServeServerRepo) BatchCreate

func (r *ServeServerRepo) BatchCreate(tenantId consts.TenantId, req []model.ServeServer) error

func (*ServeServerRepo) FindByServeAndExecEnv

func (r *ServeServerRepo) FindByServeAndExecEnv(tenantId consts.TenantId, serveId, environmentId uint) (ret model.ServeServer, err error)

func (*ServeServerRepo) Get

func (r *ServeServerRepo) Get(tenantId consts.TenantId, id uint) (res model.ServeServer, err error)

func (*ServeServerRepo) GetByDebugInfo

func (r *ServeServerRepo) GetByDebugInfo(tenantId consts.TenantId, debugInterfaceId, endpointInterfaceId uint) (ret model.ServeServer, err error)

func (*ServeServerRepo) GetByEndpoint

func (r *ServeServerRepo) GetByEndpoint(tenantId consts.TenantId, endpointId uint) (res model.ServeServer, err error)

func (*ServeServerRepo) GetByServeAndUrl

func (r *ServeServerRepo) GetByServeAndUrl(tenantId consts.TenantId, serveId uint, url string) (ret model.ServeServer, err error)

func (*ServeServerRepo) GetDefaultByServe

func (r *ServeServerRepo) GetDefaultByServe(tenantId consts.TenantId, serveId uint) (ret model.ServeServer, err error)

func (*ServeServerRepo) SetUrl

func (r *ServeServerRepo) SetUrl(tenantId consts.TenantId, serveId uint, url string) (err error)

func (*ServeServerRepo) UpdateUrlByServeAndServer

func (r *ServeServerRepo) UpdateUrlByServeAndServer(tenantId consts.TenantId, serveId, serverId uint, url string) error

type ShareVariableRepo

type ShareVariableRepo struct {
	DB        *gorm.DB `inject:""`
	*BaseRepo `inject:""`

	ScenarioProcessorRepo *ScenarioProcessorRepo `inject:""`
}

func (*ShareVariableRepo) Delete

func (r *ShareVariableRepo) Delete(tenantId consts.TenantId, id int) (err error)

func (*ShareVariableRepo) DeleteAllByScenarioId

func (r *ShareVariableRepo) DeleteAllByScenarioId(tenantId consts.TenantId, scenarioId uint) (err error)

func (*ShareVariableRepo) DeleteAllByServeId

func (r *ShareVariableRepo) DeleteAllByServeId(tenantId consts.TenantId, serveId uint) (err error)

func (*ShareVariableRepo) GetExistByInterfaceDebug

func (r *ShareVariableRepo) GetExistByInterfaceDebug(tenantId consts.TenantId, name string, serveId uint, usedBy consts.UsedBy) (id uint, err error)

func (*ShareVariableRepo) GetExistByScenarioDebug

func (r *ShareVariableRepo) GetExistByScenarioDebug(tenantId consts.TenantId, name string, scenarioId uint) (id uint, err error)

func (*ShareVariableRepo) ListForInterfaceDebug

func (r *ShareVariableRepo) ListForInterfaceDebug(tenantId consts.TenantId, serveId uint, usedBy consts.UsedBy) (pos []model.ShareVariable, err error)

func (*ShareVariableRepo) ListForScenarioDebug

func (r *ShareVariableRepo) ListForScenarioDebug(tenantId consts.TenantId, processorId uint) (pos []model.ShareVariable, err error)

func (*ShareVariableRepo) Save

func (r *ShareVariableRepo) Save(tenantId consts.TenantId, po *model.ShareVariable) (err error)

type SnippetRepo

type SnippetRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*SnippetRepo) Get

func (r *SnippetRepo) Get(tenantId consts.TenantId, name string) (po model.Snippet, err error)

type SummaryBugsRepo

type SummaryBugsRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*SummaryBugsRepo) CheckUpdated

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

func (*SummaryBugsRepo) Count

func (r *SummaryBugsRepo) Count(tenantId consts.TenantId) (count int64, err error)

func (*SummaryBugsRepo) CountByProjectId

func (r *SummaryBugsRepo) CountByProjectId(tenantId consts.TenantId, projectId int64) (count int64, err error)

func (*SummaryBugsRepo) Create

func (r *SummaryBugsRepo) Create(tenantId consts.TenantId, bugs model.SummaryBugs) (err error)

func (*SummaryBugsRepo) Existed

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

func (*SummaryBugsRepo) FindByProjectIdGroupByBugSeverity

func (r *SummaryBugsRepo) FindByProjectIdGroupByBugSeverity(tenantId consts.TenantId, projectId int64) (result []model.SummaryBugsSeverity, err error)

func (*SummaryBugsRepo) FindGroupByBugSeverity

func (r *SummaryBugsRepo) FindGroupByBugSeverity(tenantId consts.TenantId) (result []model.SummaryBugsSeverity, err error)

func (*SummaryBugsRepo) FindProjectIds

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

func (*SummaryBugsRepo) UpdateColumnsByDate

func (r *SummaryBugsRepo) UpdateColumnsByDate(tenantId consts.TenantId, bugs model.SummaryBugs, id int64) (err error)

type SummaryDetailsRepo

type SummaryDetailsRepo struct {
	*BaseRepo       `inject:""`
	DB              *gorm.DB         `inject:""`
	IntegrationRepo *IntegrationRepo `inject:""`
}

func (*SummaryDetailsRepo) CheckCardUpdated

func (r *SummaryDetailsRepo) CheckCardUpdated(tenantId consts.TenantId, lastUpdateTime *time.Time) (result bool, err error)

func (*SummaryDetailsRepo) CheckDetailsUpdated

func (r *SummaryDetailsRepo) CheckDetailsUpdated(tenantId consts.TenantId, lastUpdateTime *time.Time) (result bool, err error)

func (*SummaryDetailsRepo) Count

func (r *SummaryDetailsRepo) Count(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsRepo) CountAllEndpointInterfaceTotalProjectId

func (r *SummaryDetailsRepo) CountAllEndpointInterfaceTotalProjectId(tenantId consts.TenantId) (counts []model.ProjectIdAndId, err error)

func (*SummaryDetailsRepo) CountAllEndpointTotal

func (r *SummaryDetailsRepo) CountAllEndpointTotal(tenantId consts.TenantId) (int64, error)

func (*SummaryDetailsRepo) CountAllExecTotal

func (r *SummaryDetailsRepo) CountAllExecTotal(tenantId consts.TenantId) (int64, error)

func (*SummaryDetailsRepo) CountAllExecTotalProjectId

func (r *SummaryDetailsRepo) CountAllExecTotalProjectId(tenantId consts.TenantId) (counts []model.ProjectIdAndId, err error)

func (*SummaryDetailsRepo) CountAllScenarioTotal

func (r *SummaryDetailsRepo) CountAllScenarioTotal(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsRepo) CountAllScenarioTotalProjectId

func (r *SummaryDetailsRepo) CountAllScenarioTotalProjectId(tenantId consts.TenantId) (counts []model.ScenarioProjectIdAndId, err error)

func (*SummaryDetailsRepo) CountBugsGroupByProjectId

func (r *SummaryDetailsRepo) CountBugsGroupByProjectId(tenantId consts.TenantId) (bugsCount []model.ProjectsBugCount, err error)

func (*SummaryDetailsRepo) CountByUserId

func (r *SummaryDetailsRepo) CountByUserId(tenantId consts.TenantId, userId int64) (count int64, err error)

func (*SummaryDetailsRepo) CountEndpointInterfaceTotalProjectId

func (r *SummaryDetailsRepo) CountEndpointInterfaceTotalProjectId(tenantId consts.TenantId, projectId int64) (int64, error)

func (*SummaryDetailsRepo) CountExecTotalProjectId

func (r *SummaryDetailsRepo) CountExecTotalProjectId(tenantId consts.TenantId, projectId int64) (int64, error)

func (*SummaryDetailsRepo) CountProjectUserTotal

func (r *SummaryDetailsRepo) CountProjectUserTotal(tenantId consts.TenantId, projectId int64) (count int64, err error)

func (*SummaryDetailsRepo) CountScenarioTotalProjectId

func (r *SummaryDetailsRepo) CountScenarioTotalProjectId(tenantId consts.TenantId, projectId int64) (int64, error)

func (*SummaryDetailsRepo) CountUserTotal

func (r *SummaryDetailsRepo) CountUserTotal(tenantId consts.TenantId) (count int64, err error)

func (*SummaryDetailsRepo) Create

func (r *SummaryDetailsRepo) Create(tenantId consts.TenantId, summaryDetails model.SummaryDetails) (err error)

func (*SummaryDetailsRepo) Existed

func (r *SummaryDetailsRepo) Existed(tenantId consts.TenantId, startTime string, endTime string, projectId int64) (id int64, err error)

func (*SummaryDetailsRepo) Find

func (r *SummaryDetailsRepo) Find(tenantId consts.TenantId) (summaryDetails []model.SummaryDetails, err error)

func (*SummaryDetailsRepo) FindAdminNameByAdminId

func (r *SummaryDetailsRepo) FindAdminNameByAdminId(tenantId consts.TenantId, adminId int64) (adminName string, err error)

func (*SummaryDetailsRepo) FindAllAssertionCount

func (r *SummaryDetailsRepo) FindAllAssertionCount(tenantId consts.TenantId) (result model.SimplePassRate, err error)

func (*SummaryDetailsRepo) FindAllAssertionCountGroupByProjectId

func (r *SummaryDetailsRepo) FindAllAssertionCountGroupByProjectId(tenantId consts.TenantId) (result []model.SimplePassRateByProjectId, err error)

func (*SummaryDetailsRepo) FindAllEndpointIdsGroupByProjectId

func (r *SummaryDetailsRepo) FindAllEndpointIdsGroupByProjectId(tenantId consts.TenantId) (ids []model.ProjectIdAndId, err error)

func (*SummaryDetailsRepo) FindAllExecLogProcessorInterfaceTotal

func (r *SummaryDetailsRepo) FindAllExecLogProcessorInterfaceTotal(tenantId consts.TenantId) (counts int64, err error)

func (*SummaryDetailsRepo) FindAllExecLogProcessorInterfaceTotalGroupByProjectId

func (r *SummaryDetailsRepo) FindAllExecLogProcessorInterfaceTotalGroupByProjectId(tenantId consts.TenantId) (counts []model.ProjectIdAndId, err error)

func (*SummaryDetailsRepo) FindAllProjectInfo

func (r *SummaryDetailsRepo) FindAllProjectInfo(tenantId consts.TenantId, engineering string) (projectsInfo []model.SummaryProjectInfo, err error)

func (*SummaryDetailsRepo) FindAllUserIdAndNameOfProject

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

func (*SummaryDetailsRepo) FindAssertionCountByProjectId

func (r *SummaryDetailsRepo) FindAssertionCountByProjectId(tenantId consts.TenantId, projectId int64) (result model.SimplePassRate, err error)

func (*SummaryDetailsRepo) FindByProjectId

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

func (*SummaryDetailsRepo) FindByProjectIdAndDate

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

func (*SummaryDetailsRepo) FindByProjectIds

func (r *SummaryDetailsRepo) FindByProjectIds(tenantId consts.TenantId, projectIds []int64) (summaryDetails []model.SummaryDetails, err error)

func (*SummaryDetailsRepo) FindCreateUserNameByProjectId

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

func (*SummaryDetailsRepo) FindEndpointIdsByProjectId

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

func (*SummaryDetailsRepo) FindExecLogProcessorInterfaceTotalGroupByProjectId

func (r *SummaryDetailsRepo) FindExecLogProcessorInterfaceTotalGroupByProjectId(tenantId consts.TenantId, projectId int64) (counts int64, err error)

func (*SummaryDetailsRepo) FindProjectIds

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

func (*SummaryDetailsRepo) FindProjectIdsByUserId

func (r *SummaryDetailsRepo) FindProjectIdsByUserId(tenantId consts.TenantId, userId int64) (projectIds []int64, err error)

func (*SummaryDetailsRepo) FindProjectIdsGroupByUserId

func (r *SummaryDetailsRepo) FindProjectIdsGroupByUserId(tenantId consts.TenantId) (projectIdsGroupByUserId model.ProjectIdsGroupByUserId, err error)

func (*SummaryDetailsRepo) FindUserIdsByProjectId

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

func (*SummaryDetailsRepo) FindUserIdsGroupByProjectId

func (r *SummaryDetailsRepo) FindUserIdsGroupByProjectId(tenantId consts.TenantId) (userIdsGroupByProjectId model.UserIdsGroupByProjectId, err error)

func (*SummaryDetailsRepo) SummaryCard

func (r *SummaryDetailsRepo) SummaryCard(tenantId consts.TenantId) (summaryCardTotal model.SummaryCardTotal, err error)

func (*SummaryDetailsRepo) SummaryCardByDate

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

func (*SummaryDetailsRepo) SummaryCardByDateAndProjectId

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

func (*SummaryDetailsRepo) UpdateColumnsByDate

func (r *SummaryDetailsRepo) UpdateColumnsByDate(tenantId consts.TenantId, id int64, summaryDetails model.SummaryDetails) (err error)

type SummaryProjectUserRankingRepo

type SummaryProjectUserRankingRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func NewSummaryProjectUserRankingRepo

func NewSummaryProjectUserRankingRepo() *SummaryProjectUserRankingRepo

func (*SummaryProjectUserRankingRepo) CheckUpdated

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

func (*SummaryProjectUserRankingRepo) Create

func (r *SummaryProjectUserRankingRepo) Create(tenantId consts.TenantId, summaryProjectUserRanking model.SummaryProjectUserRanking) (err error)

func (*SummaryProjectUserRankingRepo) Existed

func (r *SummaryProjectUserRankingRepo) Existed(tenantId consts.TenantId, startTime string, endTime string, projectId int64, userId int64) (id int64, err error)

func (*SummaryProjectUserRankingRepo) FindAllUserName

func (r *SummaryProjectUserRankingRepo) FindAllUserName(tenantId consts.TenantId) (user []model.RankingUser, err error)

func (*SummaryProjectUserRankingRepo) FindByProjectId

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

func (*SummaryProjectUserRankingRepo) FindCasesTotalByProjectId

func (r *SummaryProjectUserRankingRepo) FindCasesTotalByProjectId(tenantId consts.TenantId, projectId int64) (result []model.UserTotal, err error)

func (*SummaryProjectUserRankingRepo) FindGroupByProjectId

func (r *SummaryProjectUserRankingRepo) FindGroupByProjectId(tenantId consts.TenantId) (summaryProjectUserRanking []model.SummaryProjectUserRanking, err error)

func (*SummaryProjectUserRankingRepo) FindMaxDataByDateAndProjectId

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

func (*SummaryProjectUserRankingRepo) FindMinDataByDateAndProjectId

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

func (*SummaryProjectUserRankingRepo) FindProjectIds

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

func (*SummaryProjectUserRankingRepo) FindProjectUserScenarioTotal

func (r *SummaryProjectUserRankingRepo) FindProjectUserScenarioTotal(tenantId consts.TenantId) (projectUserTotal []model.ProjectUserTotal, err error)

func (*SummaryProjectUserRankingRepo) FindProjectUserTestCasesTotal

func (r *SummaryProjectUserRankingRepo) FindProjectUserTestCasesTotal(tenantId consts.TenantId) (projectUserTotal []model.ProjectUserTotal, err error)

func (*SummaryProjectUserRankingRepo) FindScenariosTotalByProjectId

func (r *SummaryProjectUserRankingRepo) FindScenariosTotalByProjectId(tenantId consts.TenantId, projectId int64) (result []model.UserTotal, err error)

func (*SummaryProjectUserRankingRepo) FindUserByProjectId

func (r *SummaryProjectUserRankingRepo) FindUserByProjectId(tenantId consts.TenantId, projectId int64) (user []model.RankingUser, err error)

func (*SummaryProjectUserRankingRepo) FindUserIdsByProjectId

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

func (*SummaryProjectUserRankingRepo) FindUserLastUpdateTestCasesByProjectId

func (r *SummaryProjectUserRankingRepo) FindUserLastUpdateTestCasesByProjectId(tenantId consts.TenantId, projectId int64) (result []model.UserUpdateTime, err error)

func (*SummaryProjectUserRankingRepo) UpdateColumnsByDate

func (r *SummaryProjectUserRankingRepo) UpdateColumnsByDate(tenantId consts.TenantId, id int64, summaryProjectUserRanking model.SummaryProjectUserRanking) (err error)

type SysAgentRepo

type SysAgentRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*SysAgentRepo) Delete

func (r *SysAgentRepo) Delete(tenantId consts.TenantId, id uint) (err error)

func (*SysAgentRepo) Disable

func (r *SysAgentRepo) Disable(tenantId consts.TenantId, id uint) (err error)

func (*SysAgentRepo) Get

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

func (*SysAgentRepo) List

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

func (*SysAgentRepo) Save

func (r *SysAgentRepo) Save(tenantId consts.TenantId, po *model.SysAgent) (err error)

func (*SysAgentRepo) UpdateName

func (r *SysAgentRepo) UpdateName(tenantId consts.TenantId, to v1.AgentReq) (err error)

type ThirdPartySyncRepo

type ThirdPartySyncRepo struct {
	*BaseRepo `inject:""`
	DB        *gorm.DB `inject:""`
}

func (*ThirdPartySyncRepo) AllData

func (r *ThirdPartySyncRepo) AllData(tenantId consts.TenantId) (data []model.ThirdPartySync, err error)

func (*ThirdPartySyncRepo) GetByProjectAndServe

func (r *ThirdPartySyncRepo) GetByProjectAndServe(tenantId consts.TenantId, projectId, serveId uint) (data model.ThirdPartySync, err error)

func (*ThirdPartySyncRepo) UpdateExecTimeById

func (r *ThirdPartySyncRepo) UpdateExecTimeById(tenantId consts.TenantId, id uint) (err error)

type UserRepo

type UserRepo struct {
	*BaseRepo       `inject:""`
	DB              *gorm.DB         `inject:""`
	ProfileRepo     *ProfileRepo     `inject:""`
	RoleRepo        *RoleRepo        `inject:""`
	ProjectRepo     *ProjectRepo     `inject:""`
	EnvironmentRepo *EnvironmentRepo `inject:""`
	ProjectRoleRepo *ProjectRoleRepo `inject:""`
}

func NewUserRepo

func NewUserRepo(db *gorm.DB) *UserRepo

func (*UserRepo) AddProfileForUser

func (r *UserRepo) AddProfileForUser(tenantId consts.TenantId, user *model.SysUser, projectId uint) (err error)

func (*UserRepo) AddProjectForUser

func (r *UserRepo) AddProjectForUser(tenantId consts.TenantId, user *model.SysUser) (project model.Project, err error)

func (*UserRepo) AddRoleForUser

func (r *UserRepo) AddRoleForUser(tenantId consts.TenantId, user *model.SysUser) error

AddRoleForUser add roles for user

func (*UserRepo) ChangePassword

func (r *UserRepo) ChangePassword(tenantId consts.TenantId, req serverDomain.UpdateUserReq, id uint) (err error)

func (*UserRepo) CleanToken

func (r *UserRepo) CleanToken(authorityType int, userId string) error

CleanToken 清空 token

func (*UserRepo) ClearVcode

func (r *UserRepo) ClearVcode(tenantId consts.TenantId, id uint) (err error)

func (*UserRepo) Create

func (r *UserRepo) Create(tenantId consts.TenantId, req serverDomain.UserReq) (uint, error)

func (*UserRepo) CreateIfNotExisted

func (r *UserRepo) CreateIfNotExisted(tenantId consts.TenantId, req serverDomain.UserReq) (id uint, err error)

func (*UserRepo) DelToken

func (r *UserRepo) DelToken(token string) error

DelToken 删除token

func (*UserRepo) DeleteById

func (r *UserRepo) DeleteById(tenantId consts.TenantId, id uint) error

func (*UserRepo) FindByEmail

func (r *UserRepo) FindByEmail(tenantId consts.TenantId, email string, ids ...uint) (serverDomain.UserResp, error)

func (*UserRepo) FindById

func (r *UserRepo) FindById(tenantId consts.TenantId, id uint) (user serverDomain.UserResp, err error)

func (*UserRepo) FindByIds

func (r *UserRepo) FindByIds(tenantId consts.TenantId, ids []uint) (res []model.SysUser, err error)

func (*UserRepo) FindByUserName

func (r *UserRepo) FindByUserName(tenantId consts.TenantId, username string, ids ...uint) (serverDomain.UserResp, error)

func (*UserRepo) FindByUserNameAndVcode

func (r *UserRepo) FindByUserNameAndVcode(tenantId consts.TenantId, username, vcode string) (user model.SysUser, err error)

func (*UserRepo) FindDetailById

func (r *UserRepo) FindDetailById(tenantId consts.TenantId, id uint) (user serverDomain.UserResp, err error)

func (*UserRepo) FindPasswordByEmail

func (r *UserRepo) FindPasswordByEmail(tenantId consts.TenantId, email string) (serverDomain.LoginResp, error)

func (*UserRepo) FindPasswordByUserName

func (r *UserRepo) FindPasswordByUserName(tenantId consts.TenantId, username string, ids ...uint) (serverDomain.LoginResp, error)

func (*UserRepo) GenAndUpdateVcode

func (r *UserRepo) GenAndUpdateVcode(tenantId consts.TenantId, id uint) (vcode string, err error)

func (*UserRepo) GetByUserId

func (r *UserRepo) GetByUserId(tenantId consts.TenantId, id uint) (user model.SysUser, err error)

func (*UserRepo) GetByUserName

func (r *UserRepo) GetByUserName(tenantId consts.TenantId, userName string) (user model.SysUser, err error)

func (*UserRepo) GetByUsernameOrEmail

func (r *UserRepo) GetByUsernameOrEmail(tenantId consts.TenantId, username, email string, ids ...uint) (user model.SysUser, err error)

func (*UserRepo) GetByUsernameOrPassword

func (r *UserRepo) GetByUsernameOrPassword(tenantId consts.TenantId, usernameOrPassword string) (user model.SysUser, err error)

func (*UserRepo) GetProjectRoles

func (r *UserRepo) GetProjectRoles(tenantId consts.TenantId, users ...*serverDomain.UserResp)

getRoles

func (*UserRepo) GetSysRoles

func (r *UserRepo) GetSysRoles(tenantId consts.TenantId, users ...*serverDomain.UserResp)

GetSysRoles

func (*UserRepo) GetUserIdNameMap

func (r *UserRepo) GetUserIdNameMap(tenantId consts.TenantId, ids []uint) map[uint]string

func (*UserRepo) GetUsersNotExistedInProject

func (r *UserRepo) GetUsersNotExistedInProject(tenantId consts.TenantId, projectId uint) (ret []serverDomain.UserResp, err error)

func (*UserRepo) InviteToProject

func (r *UserRepo) InviteToProject(tenantId consts.TenantId, req serverDomain.InviteUserReq) (user model.SysUser, err error)

func (*UserRepo) IsAdminUser

func (r *UserRepo) IsAdminUser(tenantId consts.TenantId, id uint) (ret bool, err error)

func (*UserRepo) Paginate

func (r *UserRepo) Paginate(tenantId consts.TenantId, req serverDomain.UserReqPaginate) (data _domain.PageData, err error)

func (*UserRepo) Register

func (r *UserRepo) Register(tenantId consts.TenantId, user *model.SysUser) (err error)

func (*UserRepo) Update

func (r *UserRepo) Update(tenantId consts.TenantId, userId, id uint, req serverDomain.UserReq) error

func (*UserRepo) UpdateAvatar

func (r *UserRepo) UpdateAvatar(id uint, avatar string) error

func (*UserRepo) UpdateByLdapInfo

func (r *UserRepo) UpdateByLdapInfo(tenantId consts.TenantId, ldapUserInfo v1.UserBase) (id uint, err error)

func (*UserRepo) UpdateEmail

func (r *UserRepo) UpdateEmail(tenantId consts.TenantId, email string, id uint) (err error)

func (*UserRepo) UpdateName

func (r *UserRepo) UpdateName(tenantId consts.TenantId, username string, id uint) (err error)

func (*UserRepo) UpdatePassword

func (r *UserRepo) UpdatePassword(tenantId consts.TenantId, password string, id uint) (err error)

func (*UserRepo) UpdatePasswordByName

func (r *UserRepo) UpdatePasswordByName(tenantId consts.TenantId, name string, password string) (err error)

func (*UserRepo) UpdateRoleForUser

func (r *UserRepo) UpdateRoleForUser(tenantId consts.TenantId, userId string, roleIds []string) error

Jump to

Keyboard shortcuts

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