serverDomain

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: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEndpointTagReq

type AddEndpointTagReq struct {
	Name string `json:"name"`
}

type AgentReq

type AgentReq struct {
	_domain.Model

	Name string `json:"name"`

	CreateUser string `json:"createUser"`
	UpdateUser string `json:"updateUser"`
}

type ApplyProjectReq

type ApplyProjectReq struct {
	ProjectId       uint            `json:"projectId" validate:"required"`
	ProjectRoleName consts.RoleType `json:"projectRoleName" validate:"required"`
	ApplyUserId     uint            `json:"applyUserId"`
	Description     string          `json:"description"`
}

type AuditProjectPaginate

type AuditProjectPaginate struct {
	_domain.PaginateReq
	AuditUserId uint `json:"auditUserId"`
	ApplyUserId uint `json:"applyUserId"`
	Type        uint `json:"type"`
}

type AuditProjectReq

type AuditProjectReq struct {
	Id     uint               `json:"id" validate:"required"`
	Status consts.AuditStatus `json:"status" validate:"required"`
}

type BatchAddSchemaRootReq

type BatchAddSchemaRootReq struct {
	ProjectIds []uint `json:"projectIds"`
}

type BatchUpdateReq

type BatchUpdateReq struct {
	FieldName   string      `json:"fieldName"`
	Value       interface{} `json:"value"`
	EndpointIds []uint      `json:"endpointIds"`
}

type Category

type Category struct {
	Id         int64       `json:"id"`
	Name       string      `json:"name"`
	Desc       string      `json:"desc"`
	ParentId   int64       `json:"parentId"`
	Children   []*Category `json:"children"`
	Slots      iris.Map    `json:"slots"`
	Count      int64       `json:"count"`
	EntityId   uint        `json:"entityId"`
	EntityData interface{} `json:"entityData"`
}

category

type CategoryCount

type CategoryCount struct {
	Count      int64
	CategoryId int64
}

type CategoryCreateReq

type CategoryCreateReq struct {
	Name      string                             `json:"name"`
	Mode      string                             `json:"mode"`
	Type      serverConsts.CategoryDiscriminator `json:"type"`
	ServeId   uint                               `json:"serveId"`
	ModuleId  string                             `json:"moduleId"`
	TargetId  int                                `json:"targetId"`
	ProjectId uint                               `json:"projectId"`
	EntityId  uint                               `json:"entityId"`
	IsEntity  bool                               `json:"isEntity"`
}

type CategoryEndpointCase

type CategoryEndpointCase struct {
	CaseUniqueId         string `json:"caseUniqueId"`
	EndpointUniqueId     string `json:"endpoint_unique_id"`
	CaseId               uint   `json:"caseId"`
	CaseName             string `json:"caseName"`
	Method               string `json:"method"`
	CaseDesc             string `json:"caseDesc"`
	CaseDebugInterfaceId uint   `json:"caseDebugInterfaceId"`
	ServeId              uint   `json:"serveId"`
	ProjectId            uint   `json:"projectId"`
	EndpointId           uint   `json:"endpointId"`
	EndpointTitle        string `json:"endpointTitle"`
	EndpointDescription  string `json:"endpointDescription"`
	CategoryId           int64  `json:"categoryId"`
}

type CategoryMoveReq

type CategoryMoveReq struct {
	Type    serverConsts.CategoryDiscriminator `json:"type"`
	DragKey int                                `json:"dragKey"`
	DropKey int                                `json:"dropKey"`
	DropPos serverConsts.DropPos               `json:"dropPos"`
}

type CategoryReq

type CategoryReq struct {
	Id     int                                `json:"id"`
	Name   string                             `json:"name"`
	Desc   string                             `json:"desc"`
	Parent uint                               `json:"parent"`
	Type   serverConsts.CategoryDiscriminator `json:"type"`
}

type ChangeServeReq

type ChangeServeReq struct {
	Id uint
}

type ConditionMoveReq

type ConditionMoveReq struct {
	Data               []int `json:"data"`
	IsForBenchmarkCase bool  `json:"isForBenchmarkCase"`

	DebugInterfaceId    uint `json:"debugInterfaceId"`
	EndpointInterfaceId uint `json:"endpointInterfaceId"`
}

type CreateExampleReq

type CreateExampleReq struct {
	EndpointId uint              `json:"endpointId"`
	Method     consts.HttpMethod `json:"method"`
	Code       string            `json:"code"`
}

type DataCache

type DataCache struct {
	Host     string `json:"host"  validate:"required"`
	Port     string `json:"port"  validate:"required"`
	Password string `json:"password"`
	PoolSize int    `json:"poolSize"`
	DB       int    `json:"db"`
}

type DataReq

type DataReq struct {
	ClearData bool    `json:"clearData"`
	Sys       DataSys `json:"sys"`
}

type DataSys

type DataSys struct {
	AdminPassword string `json:"adminPassword"`
}

type DatapoolReq

type DatapoolReq struct {
	_domain.Model

	Name string `json:"name"`
	Desc string `json:"desc"`
	Data string `json:"data"`

	ProjectId uint `json:"projectId"`
}

type DatapoolReqPaginate

type DatapoolReqPaginate struct {
	_domain.PaginateReq
	ProjectId int64  `json:"projectId"`
	Name      string `json:"name"`
}

type DatapoolUploadResp

type DatapoolUploadResp struct {
	Path string          `json:"path"`
	Data [][]interface{} `json:"data"`
}

type DbConnReq

type DbConnReq struct {
	_domain.Model

	Name string `json:"name"`

	CreateUser string `json:"createUser"`
	UpdateUser string `json:"updateUser"`

	ProjectId uint `json:"projectId"`
}

type DiagnoseCurlImportReq

type DiagnoseCurlImportReq struct {
	Content  string `json:"content"`
	TargetId uint   `json:"targetId"`
	CreateBy uint   `json:"createBy"`
}

type DiagnoseCurlLoadReq

type DiagnoseCurlLoadReq struct {
	// from endpoint interface list
	EndpointId      uint              `json:"endpointId"`
	InterfaceMethod consts.HttpMethod `json:"interfaceMethod"`

	// from debug page
	DebugInterfaceId    uint `json:"debugInterfaceId"`
	EndpointInterfaceId uint `json:"endpointInterfaceId"`
	CaseId              uint `json:"caseId"`
	DiagnoseId          uint `json:"diagnoseId"`

	EnvironmentId uint          `json:"environmentId"`
	ProjectId     int           `json:"projectId"`
	UserId        uint          `json:"userId"`
	UsedBy        consts.UsedBy `json:"usedBy"`
	FromDefine    bool          `json:"fromDefine"`
}

type DiagnoseInterface

type DiagnoseInterface struct {
	Id int64 `json:"id"`

	Title string                             `json:"title"`
	Desc  string                             `json:"desc"`
	Type  serverConsts.DiagnoseInterfaceType `json:"type"`
	IsDir bool                               `json:"isDir"`

	DebugInterfaceId uint  `json:"debugInterfaceId"`
	ParentId         int64 `json:"parentId"`
	ProjectId        uint  `json:"projectId"`
	ServeId          uint  `json:"serveId"`
	UseID            uint  `json:"useId"`

	Ordr     int                  `json:"ordr"`
	Children []*DiagnoseInterface `json:"children"`
	Slots    iris.Map             `json:"slots"`
	Count    int                  `json:"count"`
	Method   consts.HttpMethod    `json:"method"`
}

type DiagnoseInterfaceImportReq

type DiagnoseInterfaceImportReq struct {
	InterfaceIds []int `json:"interfaceIds"`
	TargetId     uint  `json:"targetId"`
	CreateBy     uint  `json:"createBy"`
}

type DiagnoseInterfaceLoadReq

type DiagnoseInterfaceLoadReq struct {
	ServeId   int `json:"serveId"`
	ProjectId int `json:"projectId"`
}

type DiagnoseInterfaceMoveReq

type DiagnoseInterfaceMoveReq struct {
	DragKey int                  `json:"dragKey"`
	DropKey int                  `json:"dropKey"`
	DropPos serverConsts.DropPos `json:"dropPos"`
}

type DiagnoseInterfaceReq

type DiagnoseInterfaceReq struct {
	Id     int    `json:"id"`
	Title  string `json:"title"`
	Desc   string `json:"desc"`
	Parent uint
}

type DiagnoseInterfaceSaveReq

type DiagnoseInterfaceSaveReq struct {
	ID        uint   `json:"id"`
	Title     string `json:"title"`
	Mode      string `json:"mode"`
	ParentId  uint   `json:"parentId"`
	ServeId   uint   `json:"serveId"`
	ProjectId uint   `json:"projectId"`
	CreatedBy uint   `json:"createdBy"`
	UpdatedBy uint   `json:"updatedBy"`

	Type serverConsts.DiagnoseInterfaceType `json:"type"`
}

type DocumentRep

type DocumentRep struct {
	ProjectReq
	Environment  []EnvironmentReq       `json:"environment"`
	Serves       []DocumentServe        `json:"serves"`
	GlobalParams map[string]interface{} `json:"globalParams"`
	GlobalVars   []EnvironmentParam     `json:"globalVars"`
	Version      string                 `json:"version"`
	DocumentId   uint                   `json:"documentId"`
	Mock         []interface{}          `json:"mock"`
	Components   []ServeSchemaReq       `json:"components"`
}

type DocumentReq

type DocumentReq struct {
	EndpointIds []uint `json:"endpointIds"`
	ServeIds    []uint `json:"serveIds"`
	ProjectId   uint   `json:"projectId"`
	DocumentId  uint   `json:"documentId"`
	NeedDetail  bool   `json:"needDetail"`
}

type DocumentServe

type DocumentServe struct {
	ServeReq
	Servers    []ServeServer      `json:"servers"`
	Component  []ServeSchemaReq   `json:"component"`
	Endpoints  []EndpointReq      `json:"endpoints"`
	Securities []ServeSecurityReq `json:"securities"`
}

type DocumentShareReq

type DocumentShareReq struct {
	ProjectId  uint `json:"projectId"`
	DocumentId uint `json:"documentId"`
	EndpointId uint `json:"endpointId"`
	NeedDetail bool `json:"needDetail"`
}

type DocumentVersionListReq

type DocumentVersionListReq struct {
	NeedLatest bool `json:"needLatest"` //需要展示实时版本这条假数据
}

type DocumentVersionReq

type DocumentVersionReq struct {
	EndpointIds []uint `json:"endpointIds"`
	Name        string `json:"name"`
	Version     string `json:"version" validate:"required"`
}

type EndpointCase

type EndpointCase struct {
	Id int64 `json:"id"`

	Name string `json:"name"`
	Desc string `json:"desc"`

	DebugInterfaceId uint  `json:"debugInterfaceId"`
	ParentId         int64 `json:"parentId"`
	ProjectId        uint  `json:"projectId"`
	ServeId          uint  `json:"serveId"`
	UseID            uint  `json:"useId"`
}

type EndpointCaseAlternativeSaveReq

type EndpointCaseAlternativeSaveReq struct {
	Type   string                      `json:"type"`
	BaseId int                         `json:"baseId"`
	Values casesHelper.AlternativeCase `json:"values"`

	CreateUserId   uint   `json:"createUserId"`
	CreateUserName string `json:"createUserName"`
}

type EndpointCaseBenchmarkCreateReq

type EndpointCaseBenchmarkCreateReq struct {
	Type string `json:"type"`
	Name string `json:"name"`

	EndpointInterfaceId uint `json:"endpointInterfaceId"` // from a endpointInterface
	BaseCaseId          int  `json:"baseCaseId"`          // from a exist case

	CreateUserId   uint   `json:"createUserId"`
	CreateUserName string `json:"createUserName"`
}

type EndpointCaseDetail

type EndpointCaseDetail struct {
	EndpointCase

	DebugData domain.DebugData `json:"debugData"`
}

type EndpointCaseFactorSaveReq

type EndpointCaseFactorSaveReq struct {
	Path   string `json:"path"`
	Value  string `json:"value"`
	CaseId int    `json:"caseId"`
}

type EndpointCaseReqPaginate

type EndpointCaseReqPaginate struct {
	_domain.PaginateReq

	EndpointId int `json:"endpointId"`

	Keywords string `json:"keywords"`
	Enabled  string `json:"enabled"`
}

type EndpointCaseSaveReq

type EndpointCaseSaveReq struct {
	ID         uint              `json:"id"`
	Name       string            `json:"name"`
	Method     consts.HttpMethod `json:"method"`
	Desc       string            `json:"desc"`
	EndpointId uint              `json:"endpointId"`
	ServeId    uint              `json:"serveId"`
	ProjectId  uint              `json:"projectId"`

	CreateUserId   uint   `json:"createUserId"`
	CreateUserName string `json:"createUserName"`

	DebugInterfaceId    int    `json:"debugInterfaceId"`
	EndpointInterfaceId int    `json:"endpointInterfaceId"`
	UsedBy              string `json:"usedBy"`

	DebugData domain.DebugData `json:"debugData"`
	CaseType  consts.CaseType  `json:"caseType"`
	BaseCase  uint             `json:"baseCase"`
}

type EndpointCaseTree

type EndpointCaseTree struct {
	Key int64  `json:"key"`
	Id  string `json:"id"`

	Name   string                            `json:"name"`
	Method string                            `json:"method"`
	Desc   string                            `json:"desc"`
	Type   serverConsts.EndpointCaseTreeType `json:"type"`
	IsDir  bool                              `json:"isDir"`

	CategoryId       int64  `json:"categoryId"`
	EndpointId       uint   `json:"endpointId"`
	DebugInterfaceId uint   `json:"debugInterfaceId"`
	CaseInterfaceId  uint   `json:"caseInterfaceId"`
	ParentId         string `json:"parentId"`
	ProjectId        uint   `json:"projectId"`
	ServeId          uint   `json:"serveId"`
	UseID            uint   `json:"useId"`

	Children []*EndpointCaseTree `json:"children"`
	Slots    iris.Map            `json:"slots"`
	Count    int64               `json:"count"`
	Ordr     int                 `json:"ordr"`
}

type EndpointCodeReq

type EndpointCodeReq struct {
	ProjectId uint              `json:"projectId"`
	Data      string            `json:"data"`
	LangType  template.LangType `json:"langType"`
	NameRule  template.NameRule `json:"nameRule"`
}

type EndpointCount

type EndpointCount struct {
	Count      int64
	EndpointId int64
}

type EndpointDiffReq

type EndpointDiffReq struct {
	EndpointId uint `json:"endpointId"`
	IsChanged  bool `json:"isChanged"`
}

type EndpointDiffRes

type EndpointDiffRes struct {
	Current       string               `json:"current"`
	Latest        string               `json:"latest"`
	CurrentDesc   string               `json:"currentDesc"`
	LatestDesc    string               `json:"latestDesc"`
	ChangedStatus consts.ChangedStatus `json:"changedStatus"`
}

type EndpointInterfaceReqPaginate

type EndpointInterfaceReqPaginate struct {
	_domain.PaginateReq

	ServeIds   consts.Integers `json:"serveIds"`
	Keywords   string          `json:"Keywords"`
	CategoryId int64           `json:"categoryId"`
	ProjectId  uint            `json:"projectId"`
}

type EndpointReq

type EndpointReq struct {
	ID           int64                `json:"id"`
	ProjectId    uint                 `json:"projectId" validate:"required"`
	ServeId      uint                 `json:"serveId" validate:"required"`
	ServerId     uint                 `json:"serverId"`
	Status       int64                `json:"status"`
	Title        string               `json:"title" validate:"required"`
	Path         string               `json:"path"`
	Version      string               `json:"version"`
	CreateUser   string               `json:"CreateUser"`
	UpdateUser   string               `json:"updateUser"`
	CategoryId   int64                `json:"categoryId"`
	PathParams   []OpenApiParam       `gorm:"-" json:"pathParams"`
	Interfaces   []InterfaceResp      `gorm:"-" json:"interfaces"`
	GlobalParams []domain.GlobalParam `gorm:"-" json:"globalParams"`
	Description  string               `json:"description"`
	Curl         string               `json:"curl"`
}

type EndpointReqPaginate

type EndpointReqPaginate struct {
	_domain.PaginateReq
	ProjectId    int64    `json:"projectId"`
	CategoryId   int64    `json:"categoryId"`
	Status       []int64  `json:"status"`
	CreateUser   []string `json:"createUser"`
	Title        string   `json:"title"`
	ServeId      uint     `json:"serveId"`
	ServeVersion string   `json:"serveVersion"`
	TagNames     []string `json:"tagNames"`
	ServeIds     []uint   `json:"serveIds"`
	IsFavorite   bool     `json:"isFavorite"`
	UserId       uint     `json:"UserId"`
}

type EndpointRes

type EndpointRes struct {
	ProjectId  int64           `json:"project_id"`
	Status     int64           `json:"status"`
	Title      string          `json:"title"`
	Version    string          `json:"version"`
	PathParams []OpenApiParam  `json:"pathParams"`
	Interfaces []InterfaceResp `json:"interfaces"`
}

type EndpointTagReq

type EndpointTagReq struct {
	Id       uint     `json:"id"`
	TagNames []string `json:"tagNames"`
}

type EndpointVersionReq

type EndpointVersionReq struct {
	EndpointId int64  `json:"endpointId"`
	Version    string `json:"version"`
}

type EndpointVersions

type EndpointVersions struct {
	EndpointId int64  `json:"endpointId"`
	Version    string `json:"version"`
}

type Endpoints

type Endpoints struct {
	// contains filtered or unexported fields
}

type EnvironmentIdsReq

type EnvironmentIdsReq []uint

type EnvironmentParam

type EnvironmentParam struct {
	Name         string `json:"name" validate:"required"`
	Type         string `json:"type"`
	Required     bool   `json:"required"`
	DefaultValue string `json:"defaultValue"`
	Description  string `json:"description"`
}

type EnvironmentParamsReq

type EnvironmentParamsReq struct {
	ProjectId uint               `json:"projectId"`
	Header    []EnvironmentParam `json:"header"`
	Cookie    []EnvironmentParam `json:"cookie"`
	Query     []EnvironmentParam `json:"query"`
	Body      []EnvironmentParam `json:"body"`
	Path      []EnvironmentParam `json:"path"`
}

type EnvironmentReq

type EnvironmentReq struct {
	ID           uint
	ProjectId    uint                  `json:"projectId" validate:"required"`
	Name         string                `json:"name" validate:"required"`
	ServeServers []ServeServer         `json:"serveServers"`
	Vars         []EnvironmentVariable `json:"vars"`
}

type EnvironmentVariable

type EnvironmentVariable struct {
	Name        string `json:"name" validate:"required"`
	LocalValue  string `json:"localValue" validate:"required"`
	RemoteValue string `json:"remoteValue" validate:"required"`
	Description string `json:"description"`
}

type ExtractorConditionQuickCreateReq

type ExtractorConditionQuickCreateReq struct {
	Src          consts.ExtractorSrc `json:"src"`
	ConditionSrc consts.ConditionSrc `json:"conditionSrc"`

	Config domain.ExtractorBase `json:"conf"`
	Info   domain.DebugInfo     `json:"info"`
}

type FavoriteReq

type FavoriteReq struct {
	Id        uint `json:"id"`
	ProjectId uint
}

type GenerateFromRequestReq

type GenerateFromRequestReq struct {
	ContentType string `json:"contentType"`
	Description string `json:"description"`
	InterfaceId uint   `json:"interfaceId"`
	Data        string `json:"data"`
}

type GenerateFromResponseReq

type GenerateFromResponseReq struct {
	Code        string `json:"code"`
	ContentType string `json:"contentType"`
	Description string `json:"description"`
	InterfaceId uint   `json:"interfaceId"`
	Data        string `json:"data"`
}

type HistoryServeAddServesReq

type HistoryServeAddServesReq struct {
	ServerName string `json:"serverName"`
	Url        string `json:"url"`
}

type ImportEndpointDataReq

type ImportEndpointDataReq struct {
	ServeId          uint                `json:"serveId" validate:"required"`    //服务ID
	DriverType       convert.DriverType  `json:"driverType" validate:"required"` //接口数据来源
	CategoryId       int64               `json:"categoryId"`                     //所属分类
	DataSyncType     consts.DataSyncType `json:"dataSyncType"`                   //数据同步方式
	OpenUrlImport    bool                `json:"openUrlImport"`                  //开启url导入
	FilePath         string              `json:"filePath" validate:"required"`
	ProjectId        uint                `json:"projectId"`
	UserId           uint                `json:"userId"`
	SourceType       consts.SourceType   `json:"sourceType"`
	ClassCode        string              `json:"classCode"`     //模型类名
	FunctionCodes    []string            `json:"functionCodes"` //要导入的方法
	AddServicePrefix bool                `json:"addServicePrefix"`
}

type ImportThirdPartyEndpointReq

type ImportThirdPartyEndpointReq struct {
	CategoryId    int64               `json:"categoryId"`                   //所属分类
	DataSyncType  consts.DataSyncType `json:"dataSyncType"`                 //数据合并策略
	FilePath      string              `json:"filePath" validate:"required"` //数据源的环境url
	ClassCode     string              `json:"classCode"`                    //模型类名
	FunctionCodes []string            `json:"functionCodes"`                //要导入的方法
	ProjectId     uint                `json:"projectId"`
	ServeId       uint                `json:"serveId"`
	UserId        uint                `json:"userId"`
}

type InterfaceCase

type InterfaceCase struct {
	ID               uint   `json:"ID"`
	Name             string `json:"name"`
	Method           string `json:"method"`
	Desc             string `json:"desc"`
	EndpointId       uint   `json:"endpointId"`
	ServeId          uint   `json:"serveId"`
	ProjectId        uint   `json:"projectId"`
	DebugInterfaceId uint   `json:"debugInterfaceId"`
}

type InterfaceImportReq

type InterfaceImportReq struct {
	Src  string `json:"src"`
	Type string `json:"type"`
	File string `json:"file"`
}

type InterfaceMoveReq

type InterfaceMoveReq struct {
	DragKey int                  `json:"dragKey"`
	DropKey int                  `json:"dropKey"`
	DropPos serverConsts.DropPos `json:"dropPos"`
}

type InterfaceReq

type InterfaceReq struct {
	Mode      serverConsts.NodeCreateMode `json:"mode"`
	Type      serverConsts.NodeCreateType `json:"type"`
	Target    int                         `json:"target"`
	Name      string                      `json:"name"`
	Id        int                         `json:"id"`
	ProjectId int                         `json:"projectId"`
}

type InterfaceResp

type InterfaceResp struct {
	ID             int64                 `json:"id"`
	Url            string                `json:"url"`
	Name           string                `json:"name"`
	OperationId    string                `json:"operationId"`
	Description    string                `json:"description"`
	Security       string                `json:"security"`
	Method         string                `gorm:"default:GET" json:"method"`
	Params         []OpenApiParam        `gorm:"-" json:"params"`
	Headers        []OpenApiHeader       `gorm:"-" json:"headers"`
	Cookies        []OpenApiCookie       `gorm:"-" json:"cookies"`
	RequestBody    domain.RequestBody    `gorm:"default:{}" json:"requestBody"`
	ResponseBodies []domain.ResponseBody `gorm:"default:{}" json:"responseBodies"`
	Body           string                `gorm:"default:{}" json:"body"`
	BodyType       string                `gorm:"default:''" json:"bodyType"`
	ResponseCodes  string                `json:"responseCodes"`
	Mock           []interface{}         `gorm:"-" json:"mock"`

	//BasicAuth   domain.BasicAuth   `gorm:"-" json:"basicAuth"`
	//BearerToken domain.BearerToken `gorm:"-" json:"bearerToken"`
	//OAuth20     domain.OAuth20     `gorm:"-" json:"oAuth20"`
	//ApiKey      domain.ApiKey      `gorm:"-" json:"apiKey"`
	ProjectId    uint                 `json:"projectId"`
	GlobalParams []domain.GlobalParam `json:"globalParams"`
}

type InterfaceSimple

type InterfaceSimple struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	ParentId  int    `json:"parentId"`
	ProjectId int    `json:"projectId"`
	IsDir     bool   `json:"isDir"`

	Ordr     int               `json:"ordr"`
	Children []InterfaceSimple `json:"children"`
}

type InterfaceYapiReq

type InterfaceYapiReq struct {
	Target    int    `json:"target"`
	YapiHost  string `json:"yapiHost"`
	Token     string `json:"token"`
	ProjectId int    `json:"projectId"`
}

type InviteUserReq

type InviteUserReq struct {
	UserId    uint
	Email     string
	ProjectId int
	RoleName  consts.RoleType
}

type JslibReq

type JslibReq struct {
	_domain.Model

	Name       string `json:"name"`
	ScriptFile string `json:"scriptFile"`
	TypesFile  string `json:"typesFile"`

	CreateUser string `json:"createUser"`
	UpdateUser string `json:"updateUser"`

	ProjectId uint `json:"projectId"`
}

type JsonContent

type JsonContent struct {
	ProjectId uint   `json:"projectId"`
	Data      string `json:"data"`
}

type LecangCronReq

type LecangCronReq struct {
	Token            string              `json:"token"`
	SyncType         consts.DataSyncType `json:"syncType"`
	ProjectId        uint                `json:"projectId"`
	CategoryId       int                 `json:"categoryId"`
	Url              string              `json:"url"`
	ServeId          uint                `json:"serveId"`
	CreateUserId     uint                `json:"createUserId"`
	ServiceCode      string              `json:"serviceCode"` //乐仓服务名
	AddServicePrefix bool                `json:"addServicePrefix"`
	LecangFuncLimit
}

type LecangFuncLimit

type LecangFuncLimit struct {
	MessageType    consts.CronLecangMessageType      `json:"messageType"`    //消息类型
	ExtendOverride consts.CronLecangIsExtendOverride `json:"extendOverride"` //继承父类
	Overridable    consts.IntegrationFuncOverridable `json:"overridable"`    //是否允许重写
}

type LoginReq

type LoginReq struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

LoginReq 登录请求字段

type LoginResp

type LoginResp struct {
	_domain.ReqId
	Password string `json:"password"`
	Token    string `json:"token"`
}

type McsApprovalRes

type McsApprovalRes struct {
	Data string `json:"data"`
}

type McsApprovalResData

type McsApprovalResData struct {
	InstanceId  string   `json:"instanceId"`  //审批id
	Status      int      `json:"status"`      //审批状态 1拒绝 2同意 3终止 4取消 5进行中(企微审批创建成功会立即返回此状态)
	ApplyTime   int      `json:"applyTime"`   //发起时间:时间戳
	Comments    string   `json:"comments"`    //审批备注
	ProcessTime string   `json:"processTime"` //处理时间
	ApproveUser []string `json:"approveUser"` //审批人第三方账号
}

type MemberResp

type MemberResp struct {
	Id            uint            `json:"id"`
	Username      string          `json:"username"`
	Name          string          `json:"name"`
	Email         string          `json:"email"`
	RoleName      consts.RoleType `json:"roleName"`
	ProjectRoleId uint            `json:"roleId"`
}

type MessageBase

type MessageBase struct {
	MessageSource consts.MessageSource      `json:"message_source"` //业务模块
	Content       string                    `gorm:"type:text" json:"content"`
	ReceiverRange uint                      `json:"receiver_range"` // 接收者范围 1:全部 2:个人 3:某角色 4:某项目
	SenderId      uint                      `json:"sender_id"`      //消息发送者
	ReceiverId    uint                      `json:"receiver_id"`
	ReadStatus    uint                      `gorm:"-" json:"read_status"` // 已读状态 1:未读 2:已读
	SendStatus    consts.MessageSendStatus  `json:"send_status"`
	ServiceType   consts.MessageServiceType `json:"service_type"`
	McsMessageId  string                    `json:"mcs_message_id"`
	BusinessId    uint                      `json:"business_id"` // 业务ID
}

type MessageReadBase

type MessageReadBase struct {
	MessageId uint `json:"message_id"`
	UserId    uint `json:"user_id"`
}

type MessageReadReq

type MessageReadReq struct {
	_domain.Model
	MessageReadBase
}

type MessageReq

type MessageReq struct {
	_domain.Model
	MessageBase
}

type MessageReqPaginate

type MessageReqPaginate struct {
	_domain.PaginateReq

	ReadStatus uint `json:"read_status"` // 已读状态 0:全部 1:未读 2:已读
	MessageScope
}

type MessageResp

type MessageResp struct {
	_domain.PaginateReq
	MessageBase
}

type MessageScope

type MessageScope struct {
	Scope map[int][]string `json:"scope"` //消息范围 key:接收者范围(receiver_range) value:接收者id(receiver_id)
}

type MockExpectIdsReq

type MockExpectIdsReq []uint

type MockExpectRequestOption

type MockExpectRequestOption struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type MockExpectRequestOptions

type MockExpectRequestOptions map[consts.ParamIn][]MockExpectRequestOption

type MockJsExpression

type MockJsExpression struct {
	ID uint `json:"id"`

	Name       string `json:"name"`
	Expression string `json:"expression"`
	Format     string `json:"format"`
	Desc       string `json:"desc"`
	Ordr       int    `json:"ordr"`
	Type       string `json:"type"`

	Result interface{} `gorm:"-" json:"result"`
}

type MockReq

type MockReq struct {
	ID        uint                `json:"id"`
	Priority  consts.MockPriority `json:"priority"`
	ProjectId uint                `json:"projectId"`
}

type MockReqJson

type MockReqJson struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

type MoveReq

type MoveReq struct {
	PlanId        uint `json:"planId"`
	SourceId      uint `json:"sourceId"`
	DestinationId uint `json:"destinationId"`
}

type NotRelationScenarioReqPaginate

type NotRelationScenarioReqPaginate struct {
	_domain.PaginateReq

	PlanId       uint   `json:"planId"`
	Keywords     string `json:"keywords"`
	Enabled      string `json:"enabled"`
	Status       string `json:"status"`
	Priority     string `json:"priority"`
	Type         string `json:"type"`
	CreateUserId uint   `json:"createUserId"`
}

type OpenApiCookie

type OpenApiCookie OpenApiParam

type OpenApiHeader

type OpenApiHeader OpenApiParam

type OpenApiParam

type OpenApiParam struct {
	domain.Param
	Format      string         `json:"format"`
	Example     string         `json:"example"`
	Pattern     string         `json:"pattern"`
	MinLength   int64          `json:"minLength"`
	MaxLength   int64          `json:"maxLength"`
	Default     string         `json:"default"`
	MultipleOf  int64          `json:"multipleOf"`
	MinItems    int64          `json:"minItems"`
	MaxItems    int64          `json:"maxItems"`
	UniqueItems bool           `json:"uniqueItems"`
	Ref         string         `json:"ref"`
	Required    bool           `json:"required"`
	Type        string         `json:"type"`
	Description string         `json:"description"`
	Minimum     float64        `json:"minimum"`
	Maximum     float64        `json:"maximum"`
	Enum        pq.StringArray `json:"enum"`
}

type ParserRequest

type ParserRequest struct {
	DocContent    string `json:"docContent" validate:"required"`
	SelectContent string `json:"selectContent" validate:"required"`
	StartLine     int    `json:"startLine"`
	EndLine       int    `json:"endLine"`
	StartColumn   int    `json:"startColumn"`
	EndColumn     int    `json:"endColumn"`
}

type ParserResponse

type ParserResponse struct {
	SelectionType consts.NodeType `json:"selectionType"`
	Expr          string          `json:"expr"`
	ExprType      string          `json:"exprType"`
}

type PermBase

type PermBase struct {
	Name        string `gorm:"index:perm_index,unique;not null ;type:varchar(200)" json:"name" validate:"required,gte=4,lte=50"`
	DisplayName string `gorm:"type:varchar(256)" json:"displayName"`
	Description string `gorm:"type:text" json:"description"`
	Act         string `gorm:"index:perm_index;type:varchar(50)" json:"act" validate:"required"`
}

type PermReq

type PermReq struct {
	_domain.Model
	PermBase
}

type PermReqPaginate

type PermReqPaginate struct {
	_domain.PaginateReq
	Name string `json:"name"`
}

type PermResp

type PermResp struct {
	_domain.Model
	PermReq
}

type PermStruct

type PermStruct struct {
	Name string `json:"name"`
	Act  string `json:"act"`
}

type PlanAddScenariosReq

type PlanAddScenariosReq struct {
	ScenarioIds []uint `json:"scenarioIds"`
}

type PlanAndReportDetail

type PlanAndReportDetail struct {
	Id             uint              `json:"id"`        //计划ID
	AdminName      string            `json:"adminName"` //负责人姓名
	CreatedAt      *time.Time        `json:"createdAt,omitempty"`
	UpdatedAt      *time.Time        `json:"updatedAt,omitempty"`
	UpdateUserName string            `json:"updateUserName"` //最近更新人姓名
	CreateUserName string            `json:"createUserName"` //创建人姓名
	Status         consts.TestStatus `json:"status"`         //状态
	TestPassRate   string            `json:"testPassRate"`   //执行通过率
	ExecTimes      int64             `json:"execTimes"`      //执行次数
	ExecutorName   string            `json:"executorName"`   //执行人姓名
	ExecTime       *time.Time        `json:"execTime"`       //执行时间
	ExecEnv        string            `json:"execEnv"`        //执行环境
	CurrEnvId      uint              `json:"currEnvId"`
}

type PlanReportReqPaginate

type PlanReportReqPaginate struct {
	_domain.PaginateReq
	ExecuteStartTime int64  `json:"executeStartTime"`
	ExecuteEndTime   int64  `json:"executeEndTime"`
	CreateUserId     string `json:"createUserId"`
	Keywords         string `json:"keywords"`
	PlanId           uint   `json:"planId"`
}

type PlanReqPaginate

type PlanReqPaginate struct {
	_domain.PaginateReq

	ProjectId  uint   `json:"projectId"`
	CategoryId int64  `json:"categoryId"`
	Status     string `json:"status"`
	AdminId    string `json:"adminId"`
	Keywords   string `json:"keywords"`
	Enabled    string `json:"enabled"`
}

type PlanScenariosReqPaginate

type PlanScenariosReqPaginate struct {
	_domain.PaginateReq

	CreateUserId uint   `json:"createUserId"`
	Priority     string `json:"priority"`
	Keywords     string `json:"keywords"`
	Enabled      string `json:"enabled"`
}

type ProcessorDataUploadReq

type ProcessorDataUploadReq struct {
	_domain.Model

	Name string `json:"name"`
	Desc string `json:"desc"`
	Data string `json:"data"`

	ProjectId uint `json:"projectId"`
}

type ProcessorDataUploadResp

type ProcessorDataUploadResp struct {
	Path string `json:"path"`
	Data string `json:"data"`
}

type ProjectBase

type ProjectBase struct {
	Name string                   `json:"name"`
	Desc string                   `json:"desc" gorm:"column:descr;type:text"`
	Type serverConsts.ProjectType `json:"type"`

	SchemaId       uint                       `json:"schemaId"`
	OrgId          uint                       `json:"orgId"`
	ShortName      string                     `json:"shortName"`
	IncludeExample bool                       `json:"includeExample"`
	AdminId        uint                       `json:"adminId"`
	AdminName      string                     `gorm:"-" json:"adminName"`
	Source         serverConsts.ProjectSource `json:"source"`
}

type ProjectCronReq

type ProjectCronReq struct {
	Id           uint                `json:"id"`
	Name         string              `json:"name"`
	Cron         string              `json:"cron"`
	ProjectId    uint                `json:"projectId"`
	Source       consts.CronSource   `json:"source"`
	Switch       consts.SwitchStatus `json:"switch"`
	ConfigId     uint                `json:"configId"`
	CreateUserId uint                `json:"createUserId"`
	UpdateUserId uint                `json:"updateUserId"`
}

type ProjectCronReqPaginate

type ProjectCronReqPaginate struct {
	_domain.PaginateReq

	ProjectId uint                `json:"projectId"`
	Name      string              `json:"name"`
	Source    consts.CronSource   `json:"source"`
	Switch    consts.SwitchStatus `json:"switch"`
}

type ProjectListWithRole

type ProjectListWithRole struct {
	ID        uint            `json:"id"`
	Name      string          `json:"name"`
	ShortName string          `json:"shortName"`
	RoleName  consts.RoleType `json:"roleName"`
}

type ProjectMemberRemoveReq

type ProjectMemberRemoveReq struct {
	UserId    int `json:"userId"`
	ProjectId int `json:"projectId"`
}

type ProjectMenuBase

type ProjectMenuBase struct {
	Code     string `gorm:"index:code_index,unique;not null;type:varchar(256)" json:"code"`
	Title    string `gorm:"type:varchar(256)" json:"title"`
	Path     string `gorm:"type:varchar(256)" json:"path"`
	Type     string `gorm:"type:varchar(100)" json:"type"`
	ParentId uint   `json:"parentId"`
}

type ProjectMenuConfig

type ProjectMenuConfig struct {
	Code   string `json:"code"`
	Title  string `json:"title"`
	Path   string `json:"path"`
	Type   string `json:"type"`
	Parent string `json:"parent"`
}

type ProjectMenuReq

type ProjectMenuReq struct {
	_domain.Model
	ProjectMenuBase
}

type ProjectPermBase

type ProjectPermBase struct {
	Name        string `gorm:"index:perm_index,unique;not null ;type:varchar(200)" json:"name" validate:"required,gte=4,lte=50"`
	DisplayName string `gorm:"type:varchar(256)" json:"displayName"`
	Description string `gorm:"type:text" json:"description"`
	Act         string `gorm:"index:perm_index;type:varchar(50)" json:"act" validate:"required"`
}

type ProjectRecentlyVisitedBase

type ProjectRecentlyVisitedBase struct {
	UserId    uint `gorm:"index:user_id_index;not null" json:"userId"`
	ProjectId uint `gorm:"index:project_id_index;not null" json:"projectId"`
}

type ProjectRecentlyVisitedReq

type ProjectRecentlyVisitedReq struct {
	_domain.Model
	ProjectRecentlyVisitedBase
}

type ProjectReq

type ProjectReq struct {
	_domain.Model
	ProjectBase
	integrationDomain.ProjectReq
}

type ProjectReqPaginate

type ProjectReqPaginate struct {
	_domain.PaginateReq
	Keywords string `json:"keywords"`
	Enabled  string `json:"enabled"`
}

type ProjectResp

type ProjectResp struct {
	_domain.PaginateReq
	ProjectBase
}

type ProjectRoleMenuConfig

type ProjectRoleMenuConfig struct {
	RoleName consts.RoleType `json:"role_name"`
	Menus    []string        `json:"menus"`
}

type ProjectRolePermBase

type ProjectRolePermBase struct {
	ProjectRoleId uint `gorm:"index:index_project_role,unique;not null" json:"project_role_id"`
	ProjectPermId uint `gorm:"index:index_project_role,unique;not null" json:"project_perm_id"`
}

type ProjectRolePermPaginateReq

type ProjectRolePermPaginateReq struct {
	_domain.PaginateReq
	RoleId uint `json:"role_id"`
}

type ProjectUserPermsPaginate

type ProjectUserPermsPaginate struct {
	_domain.PaginateReq
}

type RecordItem

type RecordItem struct {
	Request  RecordRequest  `json:"request"`
	Response RecordResponse `json:"response"`
}

type RecordReq

type RecordReq struct {
	TargetId uint         `json:"targetId"`
	ServeId  uint         `json:"serveId"`
	UserId   uint         `json:"userId"`
	Items    []RecordItem `json:"items"`
}

type RecordRequest

type RecordRequest struct {
	HasPostData      bool                              `json:"hasPostData"`
	Headers          map[string]string                 `json:"headers"`
	Cookies          map[string]map[string]interface{} `json:"cookies"`
	InitialPriority  string                            `json:"initialPriority"`
	IsSameSite       bool                              `json:"isSameSite"`
	Method           string                            `json:"method"`
	MixedContentType string                            `json:"mixedContentType"`
	PostData         string                            `json:"postData"`
	Body             string                            `json:"body"`
	ReferrerPolicy   string                            `json:"referrerPolicy"`
	Url              string                            `json:"url"`
}

type RecordResponse

type RecordResponse struct {
	Body       string `json:"body"`
	Status     int    `json:"status"`
	StatusText string `json:"statusText"`
}

type RegisterReq

type RegisterReq struct {
	Username string `json:"username" validate:"required"`
	Email    string `json:"email" validate:"required"`
	Password string `json:"password" validate:"required"`
	Confirm  string `json:"confirm" validate:"required"`
}

type ReportReqPaginate

type ReportReqPaginate struct {
	_domain.PaginateReq
	ExecuteStartTime string `json:"executeStartTime"`
	ExecuteEndTime   string `json:"executeEndTime"`
	CreateUserId     uint   `json:"createUserId"`
	Keywords         string `json:"keywords"`
	ScenarioId       int    `json:"scenarioId"`
}

type ReqFavorite

type ReqFavorite struct {
	Id uint `json:"id"`
}

type ReqProjectId

type ReqProjectId struct {
	ProjectId int64 `json:"projectId" param:"projectId"`
}

type ReqSummaryBugs

type ReqSummaryBugs struct {
	ProjectId     int64  `json:"projectId"`
	BugId         string `gorm:"type:text" json:"bugId"`
	Source        string `gorm:"type:text" json:"source"`
	BugSeverity   string `gorm:"type:text" json:"bugSeverity"`
	BugCreateDate string `gorm:"type:text" json:"bugCreatedAt"`
	BugClassify   string `gorm:"type:text" json:"bugClassify"`
	BugState      string `gorm:"type:text" json:"bugState"`
}

type ResProjectId

type ResProjectId struct {
	ProjectId int64 `json:"projectId" param:"projectId"`
}

type ResRankingList

type ResRankingList struct {
	UserRankingList []ResUserRanking `json:"userRankingList"`
}

type ResSummaryBugs

type ResSummaryBugs struct {
	Total    int64   `gorm:"default:0" json:"total"`
	Critical float64 `gorm:"default:0" json:"critical"`
	Blocker  float64 `gorm:"default:0" json:"blocker"`
	Deadly   float64 `gorm:"default:0" json:"deadly"`
	Major    float64 `gorm:"default:0" json:"major"`
	Minor    float64 `gorm:"default:0" json:"minor"`
}

type ResSummaryCard

type ResSummaryCard struct {
	ProjectTotal   int64   `gorm:"default:0" json:"projectTotal"`
	InterfaceTotal int64   `gorm:"default:0" json:"interfaceTotal"`
	ScenarioTotal  int64   `gorm:"default:0" json:"scenarioTotal"`
	ExecTotal      int64   `gorm:"default:0" json:"execTotal"`
	UserTotal      int64   `gorm:"default:0" json:"userTotal"`
	PassRate       float64 `gorm:"default:0" json:"passRate"`
	Coverage       float64 `gorm:"default:0" json:"coverage"`
	InterfaceHb    float64 `gorm:"default:0" json:"interfaceHb"`
	ScenarioHb     float64 `gorm:"default:0" json:"scenarioHb"`
	CoverageHb     float64 `gorm:"default:0" json:"coverageHb"`
}

type ResSummaryDetail

type ResSummaryDetail struct {
	UserProjectTotal int64               `gorm:"default:0" json:"userProjectTotal"`
	ProjectTotal     int64               `gorm:"default:0" json:"projectTotal"`
	UserProjectList  []ResSummaryDetails `json:"userProjectList"`
	ProjectList      []ResSummaryDetails `json:"projectList"`
}

type ResSummaryDetails

type ResSummaryDetails struct {
	Id               uint               `gorm:"default:0" json:"id"`
	ProjectId        int64              `gorm:"default:0" json:"projectId"`
	ProjectName      string             `gorm:"default:" json:"projectName"`
	ProjectDescr     string             `gorm:"default:" json:"projectDescr"`
	ProjectShortName string             `gorm:"default:" json:"projectShortName"`
	ScenarioTotal    int64              `gorm:"default:0" json:"scenarioTotal"`
	InterfaceTotal   int64              `gorm:"default:0" json:"interfaceTotal"`
	ExecTotal        int64              `gorm:"default:0" json:"execTotal"`
	PassRate         float64            `gorm:"default:0" json:"passRate"`
	Coverage         float64            `gorm:"default:0" json:"coverage"`
	Disabled         bool               `gorm:"default:false" json:"disabled"`
	AdminId          int64              `gorm:"default:0" json:"adminId"`
	AdminName        string             `gorm:"default:" json:"adminName"`
	CreatedAt        string             `gorm:"default:" json:"createdAt"`
	BugTotal         int64              `gorm:"default:0" json:"bugTotal"`
	UserList         []ResUserIdAndName `json:"userList"`
	Accessible       int                `json:"accessible"`
	Products         []uint             `json:"products"`
	Spaces           []string           `json:"spaces"`
}

type ResUserIdAndName

type ResUserIdAndName struct {
	UserId   int64  `json:"userId"`
	UserName string `json:"userName"`
}

type ResUserRanking

type ResUserRanking struct {
	Sort          int64  `gorm:"default:0" json:"sort"`
	UserId        int64  `gorm:"default:0" json:"userId"`
	UserName      string `json:"userName"`
	ScenarioTotal int64  `gorm:"default:0" json:"scenarioTotal"`
	TestCaseTotal int64  `gorm:"default:0" json:"testCaseTotal"`
	Hb            int64  `gorm:"default:0" json:"hb"`
	UpdatedAt     string `json:"updatedAt"`
}

type ResetPasswordReq

type ResetPasswordReq struct {
	Username string `json:"username" validate:"required"`
	Vcode    string `json:"vcode" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type RoleBase

type RoleBase struct {
	Name        string `gorm:"uniqueIndex;not null; type:varchar(256)" json:"name" validate:"required,gte=4,lte=50" comment:"名称"`
	DisplayName string `gorm:"type:varchar(256)" json:"displayName" comment:"显示名称"`
	Description string `gorm:"type:text" json:"description" comment:"描述"`

	Perms [][]string `gorm:"-" json:"perms"`
}

type RoleMenuConfig

type RoleMenuConfig struct {
	RoleName string   `json:"role_name"`
	Menus    []string `json:"menus"`
}

type RoleReq

type RoleReq struct {
	_domain.Model
	RoleBase
}

type RoleReqPaginate

type RoleReqPaginate struct {
	_domain.PaginateReq
	Name string `json:"name"`
}

type RoleResp

type RoleResp struct {
	_domain.Model
	RoleBase
}

type RpcResult

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

func (*RpcResult) Fail

func (result *RpcResult) Fail(msg string)

func (*RpcResult) IsSuccess

func (result *RpcResult) IsSuccess() bool

func (*RpcResult) Pass

func (result *RpcResult) Pass(msg string)

type SaveLcEndpointReq

type SaveLcEndpointReq struct {
	Title         string              `json:"title"`
	ProjectId     uint                `json:"projectId"`
	ServeId       uint                `json:"serveId"`
	UserId        uint                `json:"userId"`
	OldEndpointId uint                `json:"oldEndpointId"`
	Path          string              `json:"path"`
	Snapshot      string              `json:"snapshot"`
	DataSyncType  consts.DataSyncType `json:"dataSyncType"`
	CategoryId    int64               `json:"categoryId"`
}

type SaveSchemaRes

type SaveSchemaRes struct {
	EntityId   uint `json:"entityId"`
	CategoryId uint `json:"categoryId"`
}

type SaveSpaceRelatedProjectsReq

type SaveSpaceRelatedProjectsReq struct {
	SpaceCode         string   `json:"spaceCode"`
	ProjectShortNames []string `json:"projectShortNames"`
}

type ScenarioAddCasesFromTreeReq

type ScenarioAddCasesFromTreeReq struct {
	SelectedNodes []EndpointCaseTree `json:"selectedNodes"`
	TargetId      uint               `json:"targetId"`
	CreateBy      uint               `json:"createBy"`
}

type ScenarioAddInterfacesFromTreeReq

type ScenarioAddInterfacesFromTreeReq struct {
	SelectedNodes []DiagnoseInterface `json:"selectedNodes"`
	TargetId      uint                `json:"targetId"`
	CreateBy      uint                `json:"createBy"`
}

type ScenarioAddInterfacesReq

type ScenarioAddInterfacesReq struct {
	InterfaceIds []int `json:"interfaceIds"`
	TargetId     uint  `json:"targetId"`
	CreateBy     uint  `json:"createBy"`
}

type ScenarioAddScenarioReq

type ScenarioAddScenarioReq struct {
	Name                  string                       `json:"name"`
	Mode                  string                       `json:"mode"`
	ProcessorCategory     consts.ProcessorCategory     `json:"processorCategory"`
	ProcessorType         consts.ProcessorType         `json:"processorType"`
	ProcessorInterfaceSrc consts.ProcessorInterfaceSrc `json:"processorInterfaceSrc"`

	TargetProcessorCategory consts.ProcessorCategory `json:"targetProcessorCategory"`
	TargetProcessorType     consts.ProcessorType     `json:"targetProcessorType"`
	TargetProcessorId       int                      `json:"targetProcessorId"`
	ProjectId               uint                     `json:"projectId"`
	CreateBy                uint                     `json:"createBy"`
	Comments                string                   `json:"comments"`
	Method                  consts.HttpMethod        `json:"method"`
	SrcProcessorId          uint                     `json:"srcProcessorId"`
}

type ScenarioCategory

type ScenarioCategory struct {
	Id       uint                `json:"id"`
	Name     string              `json:"name"`
	Desc     string              `json:"desc"`
	ParentId uint                `json:"parentId"`
	Children []*ScenarioCategory `json:"children"`
	Slots    iris.Map            `json:"slots"`
}

category

type ScenarioCategoryCreateReq

type ScenarioCategoryCreateReq struct {
	Name      string `json:"name"`
	Mode      string `json:"mode"`
	ServeId   uint   `json:"serveId"`
	ModuleId  string `json:"moduleId"`
	TargetId  uint   `json:"targetId"`
	ProjectId uint   `json:"projectId"`
}

type ScenarioCategoryMoveReq

type ScenarioCategoryMoveReq struct {
	DragKey int                  `json:"dragKey"`
	DropKey int                  `json:"dropKey"`
	DropPos serverConsts.DropPos `json:"dropPos"`
}

type ScenarioCategoryReq

type ScenarioCategoryReq struct {
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Desc   string `json:"desc"`
	Parent uint
}

type ScenarioCurlImportReq

type ScenarioCurlImportReq struct {
	Content  string `json:"content"`
	TargetId uint   `json:"targetId"`
	CreateBy uint   `json:"createBy"`
}

type ScenarioNodeMoveReq

type ScenarioNodeMoveReq struct {
	DragKey int                  `json:"dragKey"`
	DropKey int                  `json:"dropKey"`
	DropPos serverConsts.DropPos `json:"dropPos"`
}

type ScenarioNodeReq

type ScenarioNodeReq struct {
	Mode      serverConsts.NodeCreateMode `json:"mode"`
	Type      serverConsts.NodeCreateType `json:"type"`
	Target    int                         `json:"target"`
	Name      string                      `json:"name"`
	Id        int                         `json:"id"`
	ProjectId int                         `json:"projectId"`
}

type ScenarioPlanReqPaginate

type ScenarioPlanReqPaginate struct {
	_domain.PaginateReq
	ProjectId  uint              `json:"projectId"`
	CategoryId int64             `json:"categoryId"`
	Status     consts.TestStatus `json:"status"`
	AdminId    uint              `json:"adminId"`
	Ref        bool              `json:"ref"`
	Keywords   string            `json:"keywords"`
}

type ScenarioProcessorInfo

type ScenarioProcessorInfo struct {
	Id       uint   `json:"id"`
	Name     string `json:"name"`
	Comments string `json:"comments"`
}

type ScenarioProcessorReq

type ScenarioProcessorReq struct {
	ProcessorCategory consts.ProcessorCategory `json:"processorCategory"`
	ProcessorType     consts.ProcessorType     `json:"processorType"`
	ProcessorId       uint                     `json:"processorId"`
	InterfaceId       uint                     `json:"interfaceId"`

	Id   int    `json:"id"`
	Name string `json:"name"`
}

type ScenarioReqPaginate

type ScenarioReqPaginate struct {
	_domain.PaginateReq

	CategoryId int64  `json:"categoryId"`
	Keywords   string `json:"keywords"`
	Enabled    string `json:"enabled"`
	Status     string `json:"status"`
	Priority   string `json:"priority"`
	Type       string `json:"type"`
}

type ScenarioSimple

type ScenarioSimple struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	ParentId  int    `json:"parentId"`
	ProjectId int    `json:"projectId"`
	IsDir     bool   `json:"isDir"`

	Ordr     int              `json:"ordr"`
	Children []ScenarioSimple `json:"children"`
}

type SchemaContent

type SchemaContent struct {
	Data string
}

type SchemaReq

type SchemaReq struct {
	Id      int64  `json:"id"`
	Name    string `json:"name"`
	Type    string `json:"type"`
	Content string `json:"content"`
}

type SecuritySchemaReq

type SecuritySchemaReq struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
	Key  string `json:"key"`

	Title string `json:"title"`
	// contains filtered or unexported fields
}

type ServeReq

type ServeReq struct {
	ProjectId   uint   `json:"projectId" validate:"required"`
	Name        string `json:"name" validate:"required"`
	Status      int64  `json:"status"`
	ID          int64  `json:"id"`
	CreateUser  string `json:"createUser"`
	Description string `json:"description"`
}

type ServeReqPaginate

type ServeReqPaginate struct {
	_domain.PaginateReq
	ProjectId int64  `json:"projectId"`
	Name      string `json:"name"`
}

type ServeSchemaPaginate

type ServeSchemaPaginate struct {
	_domain.PaginateReq
	ProjectId int64  `json:"projectId"`
	Tag       string `json:"tag"`
	Type      string `json:"type"`
	Name      string `json:"name"`
}

type ServeSchemaRefReq

type ServeSchemaRefReq struct {
	ServeId int64  `json:"serveId" validate:"required"`
	Ref     string `json:"ref" validate:"required"`
}

type ServeSchemaReq

type ServeSchemaReq struct {
	ID          uint   `json:"id"`
	ServeId     int64  `json:"serveId"`
	Name        string `json:"name" validate:"required"`
	Tag         string `json:"tag"`
	Content     string `json:"content"`
	Examples    string `json:"examples"`
	Type        string `json:"type"`
	Tags        string `json:"tags"`
	Description string `json:"description"`
	Ref         string `json:"ref"`
	ProjectId   uint   `json:"projectId"`
	TargetId    int    `json:"targetId"`
}

type ServeSecurityPaginate

type ServeSecurityPaginate struct {
	_domain.PaginateReq
	ServeId int64  `json:"serveId"`
	Name    string `json:"name"`
}

type ServeSecurityReq

type ServeSecurityReq struct {
	ID          uint                  `json:"id"`
	Name        string                `json:"name" validate:"required"`
	Type        serverConsts.AuthType `json:"type" validate:"required"`
	ProjectId   int64                 `json:"projectId" validate:"required"`
	ServeId     int64                 `json:"serveId" validate:"required"`
	Description string                `json:"description"`
	In          string                `json:"in"`
	Key         string                `json:"key"`
	Value       string                `json:"value"`
	Token       string                `json:"token"`
	Username    string                `json:"username"`
	Password    string                `json:"password"`
	Default     bool                  `json:"default"`
}

type ServeServer

type ServeServer struct {
	ID              uint   `json:"id"`
	ServeId         uint   `json:"serveId"`
	ServerId        uint   `json:"serverId"` // load by server id in scenario design page
	Url             string `json:"url"`
	EnvironmentName string `json:"environmentName"`
}

type ServeVersionBindEndpointReq

type ServeVersionBindEndpointReq struct {
	ServeId          int64              `json:"serveId"`
	ServeVersion     string             `json:"serveVersion"`
	EndpointVersions []EndpointVersions `json:"endpointVersions"`
}

type ServeVersionPaginate

type ServeVersionPaginate struct {
	_domain.PaginateReq
	ServeId    int64  `json:"serveId"`
	Version    string `json:"version"`
	CreateUser string `json:"createUser"`
}

type ServeVersionReq

type ServeVersionReq struct {
	ServeId     int64  `json:"serveId"`
	Value       string `json:"value"`
	ID          uint   `json:"id"`
	CreateUser  string `json:"createUser"`
	Description string `json:"description"`
}

type SummaryReqPaginate

type SummaryReqPaginate struct {
	_domain.PaginateReq
	ProjectId int64  `json:"projectId"`
	Name      string `json:"name"`
}

type SwaggerSyncReq

type SwaggerSyncReq struct {
	ID         int                 `json:"id"`
	Switch     consts.SwitchStatus `json:"switch"`
	SyncType   consts.DataSyncType `json:"syncType"`
	CategoryId int                 `json:"categoryId"`
	Url        string              `json:"url"`
	Cron       string              `json:"cron"`
	ProjectId  uint                `json:"projectId"`
}

type TestExprRequest

type TestExprRequest struct {
	Expr     string                  `json:"expr" validate:"required"`
	ExprType string                  `json:"exprType" validate:"required"`
	Content  string                  `json:"content" validate:"required"`
	Type     consts.HttpRespLangType `json:"type" validate:"required"`
}

type TestExprResponse

type TestExprResponse struct {
	Result     string                     `json:"result"`
	ResultType consts.ExtractorResultType `json:"resultType"`
}

type UpdateDocumentVersionReq

type UpdateDocumentVersionReq struct {
	Id      uint   `json:"id"`
	Name    string `json:"name"`
	Version string `json:"version"`
}

type UpdateNameReq

type UpdateNameReq struct {
	Id   uint   `json:"id"`
	Name string `json:"name"`
}

type UpdateProjectMemberReq

type UpdateProjectMemberReq struct {
	ProjectId     uint `json:"projectId"`
	ProjectRoleId uint `json:"projectRoleId"`
	UserId        uint `json:"userId"`
}

type UpdateUserReq

type UpdateUserReq struct {
	Username    string
	Email       string
	Password    string
	NewPassword string
}

type UpdateUserRoleReq

type UpdateUserRoleReq struct {
	UserId  uint   `json:"userId" validate:"required"`
	RoleIds []uint `json:"roleIds"`
}

type UserBase

type UserBase struct {
	Username  string `gorm:"uniqueIndex;not null;type:varchar(60)" json:"username" validate:"required"`
	Name      string `gorm:"index;not null; type:varchar(60)" json:"name"`
	Email     string `gorm:"index;not null; type:varchar(60)" json:"email"`
	Intro     string `gorm:"not null; type:varchar(512)" json:"intro"`
	Avatar    string `gorm:"type:varchar(1024)" json:"avatar"`
	ImAccount string `json:"imAccount"`
	Password  string `json:"password"`
	RoleIds   []uint `gorm:"-" json:"role_ids"`
	Type      bool   `json:"type"`
}

type UserReq

type UserReq struct {
	_domain.Model
	UserBase
}

type UserReqPaginate

type UserReqPaginate struct {
	_domain.PaginateReq
	Name     string `json:"name"`
	UserName string `json:"userName"`
}

type UserResp

type UserResp struct {
	_domain.Model
	UserBase

	SysRoles     []string                 `gorm:"-" json:"sysRoles"`
	ProjectRoles map[uint]consts.RoleType `gorm:"-" json:"projectRoles"`
}

func (*UserResp) ToString

func (res *UserResp) ToString()

Jump to

Keyboard shortcuts

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