model

package
v0.0.0-...-77e6e3b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Models = []interface{}{}/* 115 elements not displayed */

)

Functions

This section is empty.

Types

type Auth2Token

type Auth2Token struct {
	BaseModel

	Name      string `json:"name"`
	Token     string `json:"token"`
	TokenType string `json:"tokenType"`
	ProjectId int    `json:"projectId"`
}

func (Auth2Token) TableName

func (Auth2Token) TableName() string

type Avatar

type Avatar struct {
	Avatar string `json:"avatar"`
}

type BaseModel

type BaseModel struct {
	ID        uint       `gorm:"primary_key" sql:"type:INT(10) UNSIGNED NOT NULL" json:"id"`
	CreatedAt *time.Time `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	Deleted  bool `json:"-" gorm:"default:false"`
	Disabled bool `json:"disabled,omitempty" gorm:"default:false"`
}

type Casbin

type Casbin struct {
	ID uint `gorm:"primary_key" sql:"type:INT(10) UNSIGNED NOT NULL" json:"id"`
}

func (Casbin) TableName

func (Casbin) TableName() string

type Category

type Category struct {
	BaseModel

	Name  string `json:"name"`
	Desc  string `json:"desc"`
	IsDir bool   `json:"isDir"`

	ParentId  int  `json:"parentId"`
	ProjectId uint `json:"projectId"`
	ServeId   uint `json:"serveId"`
	UseID     uint `json:"useId"`

	Ordr     int          `json:"ordr"`
	Children []*Processor `gorm:"-" json:"children"`
	Slots    iris.Map     `gorm:"-" json:"slots"`

	Type serverConsts.CategoryDiscriminator `gorm:"index:idx_entity_id_type,priority:2" json:"type"`

	SourceType consts.SourceType `json:"sourceType" gorm:"default:0"`
	EntityId   uint              `gorm:"index:idx_entity_id_type,priority:1" json:"entityId"`
}

func (Category) TableName

func (Category) TableName() string

type ComponentSchema

type ComponentSchema struct {
	BaseModel
	Name        string            `json:"name"`
	Type        string            `json:"type"`
	Content     string            `json:"content" gorm:"type:longtext"`
	ServeId     int64             `json:"serveId"`
	Examples    string            `json:"examples" gorm:"type:longtext"`
	Tags        string            `json:"tags"`
	Description string            `gorm:"type:text" json:"description"`
	Ref         string            `json:"ref"`
	SourceType  consts.SourceType `json:"sourceType" gorm:"default:0"`
	ProjectId   uint              `gorm:"index:idx_project_id,default:0" json:"projectId"`
}

func (ComponentSchema) TableName

func (ComponentSchema) TableName() string

type ComponentSchemaSecurity

type ComponentSchemaSecurity struct {
	BaseModel
	Name             string `json:"name"`
	Type             string `json:"type"`
	ProjectId        int64  `json:"project_id"`
	ServeId          int64  `json:"serve_id"`
	Description      string `gorm:"type:text" json:"description"`
	In               string `json:"in"`
	Scheme           string `json:"scheme"`
	BearerFormat     string `json:"bearerFormat"`
	Flows            string `json:"flows,omitempty" gorm:"type:text"`
	OpenIdConnectUrl string `json:"openIdConnectUrl"`
	Key              string `json:"key"`
	Value            string `json:"value"`
	Token            string `json:"token"`
	Username         string `json:"username"`
	Password         string `json:"password"`
	Default          bool   `json:"default"`
}

func (ComponentSchemaSecurity) TableName

func (ComponentSchemaSecurity) TableName() string

type CronConfigLecang

type CronConfigLecang struct {
	BaseModel
	SyncType   consts.DataSyncType `json:"syncType"`
	CategoryId int                 `json:"categoryId"`
	Url        string              `json:"url"`
	Cron       string              `json:"cron"`
	//ProjectId        uint                              `json:"projectId"`
	ServeId          uint                              `json:"serveId"`
	CreateUserId     uint                              `json:"createUserId"`
	Engineering      string                            `json:"engineering"`    //所属工程
	ServiceCodes     string                            `json:"serviceCodes"`   //服务名,逗号分隔
	MessageType      consts.CronLecangMessageType      `json:"messageType"`    //消息类型
	ExtendOverride   consts.CronLecangIsExtendOverride `json:"extendOverride"` //继承父类
	Overridable      string                            `json:"overridable"`    //是否允许重写
	AddServicePrefix bool                              `json:"addServicePrefix"`
}

func (CronConfigLecang) TableName

func (CronConfigLecang) TableName() string

type DatabaseConn

type DatabaseConn struct {
	BaseModel

	Name string              `json:"name"`
	Type consts.DatabaseType `json:"type"`
	Desc string              `gorm:"type:text" json:"desc"`

	Host     string `json:"host"`
	Port     string `json:"port"`
	DbName   string `json:"dbName"`
	Username string `json:"username"`
	Password string `json:"password"`

	EnvironmentId uint `json:"environmentId"`
	ProjectId     uint `json:"projectId"`

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

func (DatabaseConn) TableName

func (DatabaseConn) TableName() string

type Datapool

type Datapool struct {
	BaseModel

	Name string `json:"name"`
	Desc string `gorm:"type:text" json:"desc"`

	Path string `json:"path"`
	Data string `gorm:"type:longtext" json:"data"`

	CreateUser string `json:"createUser"`
	ProjectId  uint   `json:"projectId"`
}

func (Datapool) TableName

func (Datapool) TableName() string

type DebugCondition

type DebugCondition struct {
	BaseModel

	ConditionSrc consts.ConditionSrc `json:"conditionSrc"`

	DebugInterfaceId    uint `gorm:"default:0" json:"debugInterfaceId"`
	EndpointInterfaceId uint `gorm:"default:0" json:"endpointInterfaceId"`

	EntityType consts.ConditionType `json:"entityType"`
	EntityId   uint                 `json:"entityId"`
	UsedBy     consts.UsedBy        `json:"usedBy"`

	IsForBenchmarkCase bool `gorm:"default:0" json:"isForBenchmarkCase"`

	Name string `json:"name"`
	Desc string `gorm:"type:text" json:"desc"`
	Ordr int    `json:"ordr"`
}

func (DebugCondition) TableName

func (DebugCondition) TableName() string

type DebugConditionCheckpoint

type DebugConditionCheckpoint struct {
	BaseModel

	domain.CheckpointBase
}

func (DebugConditionCheckpoint) TableName

func (DebugConditionCheckpoint) TableName() string

type DebugConditionDatabaseOpt

type DebugConditionDatabaseOpt struct {
	BaseModel

	domain.DatabaseOptBase
}

func (DebugConditionDatabaseOpt) TableName

func (DebugConditionDatabaseOpt) TableName() string

type DebugConditionExtractor

type DebugConditionExtractor struct {
	BaseModel

	domain.ExtractorBase
}

func (DebugConditionExtractor) TableName

func (DebugConditionExtractor) TableName() string

type DebugConditionResponseDefine

type DebugConditionResponseDefine struct {
	BaseModel
	domain.ResponseDefineBase
	Disabled bool `json:"disabled,omitempty" gorm:"default:false"`
}

func (DebugConditionResponseDefine) TableName

type DebugConditionScript

type DebugConditionScript struct {
	BaseModel

	domain.ScriptBase
}

func (DebugConditionScript) TableName

func (DebugConditionScript) TableName() string

type DebugInterface

type DebugInterface struct {
	BaseModel
	InterfaceBase

	EndpointInterfaceId uint `gorm:"default:0" json:"endpointInterfaceId"`
	CaseInterfaceId     uint `gorm:"default:0" json:"caseInterfaceId"`
	DiagnoseInterfaceId uint `gorm:"default:0" json:"diagnoseInterfaceId"`

	ScenarioProcessorId   uint                         `gorm:"default:0" json:"scenarioProcessorId"`
	ProcessorInterfaceSrc consts.ProcessorInterfaceSrc `json:"processorInterfaceSrc"`

	ServeId uint `json:"serveId"`
	// used by DiagnoseInterface
	ServerId uint   `json:"serverId"`
	BaseUrl  string `json:"baseUrl"`

	// debug data
	QueryParams []DebugInterfaceParam  `gorm:"-" json:"queryParams"`
	PathParams  []DebugInterfaceParam  `gorm:"-" json:"pathParams"`
	Headers     []DebugInterfaceHeader `gorm:"-" json:"headers"`
	Cookies     []DebugInterfaceCookie `gorm:"-" json:"cookies"`

	BodyFormData       []DebugInterfaceBodyFormDataItem       `gorm:"-" json:"bodyFormData"`
	BodyFormUrlencoded []DebugInterfaceBodyFormUrlEncodedItem `gorm:"-" json:"bodyFormUrlencoded"`

	BasicAuth   DebugInterfaceBasicAuth   `gorm:"-" json:"basicAuth"`
	BearerToken DebugInterfaceBearerToken `gorm:"-" json:"bearerToken"`
	OAuth20     DebugInterfaceOAuth20     `gorm:"-" json:"oauth20"`
	ApiKey      DebugInterfaceApiKey      `gorm:"-" json:"apiKey"`

	InterfaceExtractors  []DebugConditionExtractor  `gorm:"-" json:"interfaceExtractors"`
	InterfaceCheckpoints []DebugConditionCheckpoint `gorm:"-" json:"interfaceCheckpoints"`

	GlobalParams []DebugInterfaceGlobalParam `gorm:"-" json:"globalParams"`
}

func (DebugInterface) TableName

func (DebugInterface) TableName() string

type DebugInterfaceApiKey

type DebugInterfaceApiKey struct {
	BaseModel
	InterfaceApiKeyBase
}

func (DebugInterfaceApiKey) TableName

func (DebugInterfaceApiKey) TableName() string

type DebugInterfaceBasicAuth

type DebugInterfaceBasicAuth struct {
	BaseModel
	InterfaceBasicAuthBase
}

func (DebugInterfaceBasicAuth) TableName

func (DebugInterfaceBasicAuth) TableName() string

type DebugInterfaceBearerToken

type DebugInterfaceBearerToken struct {
	BaseModel
	InterfaceBearerTokenBase
}

func (DebugInterfaceBearerToken) TableName

func (DebugInterfaceBearerToken) TableName() string

type DebugInterfaceBodyFormDataItem

type DebugInterfaceBodyFormDataItem struct {
	BaseModel
	InterfaceBodyFormDataItemBase
}

func (DebugInterfaceBodyFormDataItem) TableName

type DebugInterfaceBodyFormUrlEncodedItem

type DebugInterfaceBodyFormUrlEncodedItem struct {
	BaseModel
	InterfaceBodyFormUrlEncodedItemBase
}

func (DebugInterfaceBodyFormUrlEncodedItem) TableName

type DebugInterfaceCookie

type DebugInterfaceCookie struct {
	BaseModel
	InterfaceCookieBase
}

func (DebugInterfaceCookie) TableName

func (DebugInterfaceCookie) TableName() string

type DebugInterfaceGlobalParam

type DebugInterfaceGlobalParam struct {
	domain.GlobalParam
	//BaseModel
	InterfaceId uint `json:"interfaceId"`
}

func (DebugInterfaceGlobalParam) TableName

func (DebugInterfaceGlobalParam) TableName() string

type DebugInterfaceHeader

type DebugInterfaceHeader struct {
	BaseModel
	InterfaceHeaderBase
}

func (DebugInterfaceHeader) TableName

func (DebugInterfaceHeader) TableName() string

type DebugInterfaceOAuth20

type DebugInterfaceOAuth20 struct {
	BaseModel

	InterfaceOAuth20Base
}

func (DebugInterfaceOAuth20) TableName

func (DebugInterfaceOAuth20) TableName() string

type DebugInterfaceParam

type DebugInterfaceParam struct {
	BaseModel
	InterfaceParamBase
}

func (DebugInterfaceParam) TableName

func (DebugInterfaceParam) TableName() string

type DebugInvoke

type DebugInvoke struct {
	BaseModel
	InvocationBase

	ServeId uint `json:"serveId"`

	ScenarioProcessorId uint `gorm:"default:0" json:"scenarioProcessorId"`
	ScenarioId          uint `gorm:"default:0" json:"scenarioId"`
}

func (DebugInvoke) TableName

func (DebugInvoke) TableName() string

type DiagnoseInterface

type DiagnoseInterface struct {
	BaseModel
	CreatedBy uint                               `json:"createdBy"`
	UpdatedBy uint                               `json:"updatedBy"`
	Name      string                             `json:"name"`
	Title     string                             `json:"title"`
	Desc      string                             `json:"desc"`
	IsLeaf    bool                               `json:"isLeaf"`
	Type      serverConsts.DiagnoseInterfaceType `json:"type"`
	IsDir     bool                               `json:"IsDir"`
	ParentId  uint                               `json:"parentId"`
	ServeId   uint                               `json:"serveId"`
	ProjectId uint                               `json:"projectId"`
	UseID     uint                               `json:"useId"`

	Ordr     int                  `json:"ordr"`
	Children []*DiagnoseInterface `gorm:"-" json:"children"`
	Slots    iris.Map             `gorm:"-" json:"slots"`

	DebugInterfaceId uint              `gorm:"default:0" json:"debugInterfaceId"`
	DebugData        *DebugInterface   `gorm:"-" json:"debugData"`
	Method           consts.HttpMethod `json:"method"`
}

func (DiagnoseInterface) TableName

func (DiagnoseInterface) TableName() string

type Endpoint

type Endpoint struct {
	BaseModel
	Title        string              `json:"title"`
	ProjectId    uint                `json:"projectId" gorm:"index:idx_projectId_serveId"`
	ServeId      uint                `json:"serveId" gorm:"index:idx_projectId_serveId"`
	ServerId     uint                `json:"serverId"`
	Path         string              `json:"path"`
	Version      string              `json:"version"`
	CreateUser   string              `json:"createUser"`
	UpdateUser   string              `json:"updateUser"`
	Status       int64               `json:"status"`
	CategoryId   int64               `json:"categoryId"`
	PathParams   []EndpointPathParam `gorm:"-" json:"pathParams"`
	Interfaces   []EndpointInterface `gorm:"-" json:"interfaces"`
	Versions     []EndpointVersion   `gorm:"-" json:"versions"`
	Tags         []string            `gorm:"-" json:"tags"`
	ServeName    string              `gorm:"-" json:"serveName"`
	Description  string              `gorm:"type:text" json:"description"`
	SerialNumber string              `json:"serialNumber"`
	Curl         string              `gorm:"-" json:"curl"`
	SourceType   consts.SourceType   `json:"sourceType"`
	Maintainer   string              `gorm:"-" json:"maintainer"`
	Methods      []consts.HttpMethod `gorm:"-" json:"methods"`

	AdvancedMockDisabled bool `json:"advancedMockDisabled"`
	ScriptMockDisabled   bool `json:"scriptMockDisabled"`

	GlobalParams  []EnvironmentParam   `gorm:"-" json:"globalParams"`
	Snapshot      string               `gorm:"type:longtext" json:"snapshot"`
	ChangedTime   *time.Time           `json:"changedTime,omitempty"`
	ChangedStatus consts.ChangedStatus `gorm:"default:1" json:"changedStatus,omitempty"`
}

func (Endpoint) TableName

func (Endpoint) TableName() string

type EndpointCase

type EndpointCase struct {
	BaseModel

	Name   string            `json:"name"`
	Desc   string            `json:"desc"`
	Method consts.HttpMethod `json:"method"`

	EndpointId uint `json:"endpointId"`
	ServeId    uint `json:"serveId"`
	ProjectId  uint `json:"projectId"`

	DebugInterfaceId uint            `gorm:"default:0" json:"debugInterfaceId"`
	DebugData        *DebugInterface `gorm:"-" json:"debugData"`

	CaseType consts.CaseType `gorm:"default:'default'" json:"caseType"`
	BaseCase uint            `gorm:"default:0" json:"baseCase"`

	SrcId uint `json:"srcId"`

	SerialNumber   string         `json:"serialNumber"`
	CreateUserId   uint           `json:"createUserId"`
	CreateUserName string         `json:"createUserName"`
	Children       []EndpointCase `gorm:"-" json:"children"`
}

func (EndpointCase) TableName

func (EndpointCase) TableName() string

type EndpointCaseAlternative

type EndpointCaseAlternative struct {
	BaseModel

	BaseId uint `json:"baseId"`

	Type consts.AlternativeCaseType `json:"type"`
	Path string                     `json:"path"`
}

func (EndpointCaseAlternative) TableName

func (EndpointCaseAlternative) TableName() string

type EndpointCaseAlternativeFactor

type EndpointCaseAlternativeFactor struct {
	BaseModel

	CaseId uint `json:"caseId"`

	Value string `json:"value"`
	Path  string `json:"path"`
}

func (EndpointCaseAlternativeFactor) TableName

type EndpointDocument

type EndpointDocument struct {
	BaseModel
	Name      string `json:"name"`
	Version   string `gorm:"index:version_project_index,unique;not null;type:varchar(200)" json:"version"`
	ProjectId uint   `gorm:"index:version_project_index,unique;not null;type:varchar(200)" json:"projectId"`
}

func (EndpointDocument) TableName

func (EndpointDocument) TableName() string

type EndpointInterface

type EndpointInterface struct {
	BaseModel
	InterfaceBase
	EndpointId uint `json:"endpointId" gorm:"index"`

	Params         []EndpointInterfaceParam        `gorm:"-" json:"params"`
	Headers        []EndpointInterfaceHeader       `gorm:"-" json:"headers"`
	Cookies        []EndpointInterfaceCookie       `gorm:"-" json:"cookies"`
	RequestBody    EndpointInterfaceRequestBody    `gorm:"-" json:"requestBody"`
	ResponseBodies []EndpointInterfaceResponseBody `gorm:"-" json:"responseBodies"`
	ResponseCodes  string                          `json:"responseCodes"`
	Tags           []string                        `gorm:"-" json:"tags"`
	PathParams     []EndpointPathParam             `gorm:"-" json:"pathParams"`

	DebugInterfaceId uint                           `gorm:"default:0" json:"debugInterfaceId"`
	SourceType       consts.SourceType              `json:"sourceType" gorm:"default:0"`
	Creator          string                         `gorm:"-" json:"creator"`
	GlobalParams     []EndpointInterfaceGlobalParam `gorm:"-" json:"globalParams"`
}

func (EndpointInterface) TableName

func (EndpointInterface) TableName() string

type EndpointInterfaceCookie

type EndpointInterfaceCookie EndpointInterfaceParam

func (EndpointInterfaceCookie) TableName

func (EndpointInterfaceCookie) TableName() string

type EndpointInterfaceGlobalParam

type EndpointInterfaceGlobalParam struct {
	domain.GlobalParam
	InterfaceId uint `json:"EndpointId"`
}

func (EndpointInterfaceGlobalParam) TableName

type EndpointInterfaceHeader

type EndpointInterfaceHeader EndpointInterfaceParam

func (EndpointInterfaceHeader) TableName

func (EndpointInterfaceHeader) TableName() string

type EndpointInterfaceParam

type EndpointInterfaceParam struct {
	BaseModel
	SchemaParam
}

func (EndpointInterfaceParam) TableName

func (EndpointInterfaceParam) TableName() string

type EndpointInterfaceRequestBody

type EndpointInterfaceRequestBody struct {
	BaseModel
	InterfaceRequestBodyBase

	SchemaItem EndpointInterfaceRequestBodyItem `gorm:"-" json:"schemaItem"`
}

func (EndpointInterfaceRequestBody) TableName

type EndpointInterfaceRequestBodyItem

type EndpointInterfaceRequestBodyItem struct {
	BaseModel
	InterfaceRequestBodyItemBase
}

func (EndpointInterfaceRequestBodyItem) TableName

type EndpointInterfaceResponseBody

type EndpointInterfaceResponseBody struct {
	BaseModel
	InterfaceResponseBodyBase
	SchemaItem EndpointInterfaceResponseBodyItem     `gorm:"-" json:"schemaItem"`
	Headers    []EndpointInterfaceResponseBodyHeader `gorm:"-" json:"headers"`
}

func (EndpointInterfaceResponseBody) TableName

type EndpointInterfaceResponseBodyHeader

type EndpointInterfaceResponseBodyHeader struct {
	BaseModel
	SchemaParam
	ResponseBodyId uint `json:"responseBodyId"`
}

func (EndpointInterfaceResponseBodyHeader) TableName

type EndpointInterfaceResponseBodyItem

type EndpointInterfaceResponseBodyItem struct {
	BaseModel
	InterfaceResponseBodyItemBase
}

func (EndpointInterfaceResponseBodyItem) TableName

type EndpointMockExpect

type EndpointMockExpect struct {
	BaseModel
	Disabled            bool                               `json:"disabled" gorm:"default:false"`
	Name                string                             `json:"name"`
	EndpointId          uint                               `json:"endpointId"`
	EndpointInterfaceId uint                               `json:"endpointInterfaceId"`
	Method              consts.HttpMethod                  `json:"method"`
	Ordr                int                                `json:"ordr"`
	CreateUser          string                             `json:"createUser"`
	UpdateUser          string                             `json:"updateUser"`
	RequestHeaders      []EndpointMockExpectRequest        `gorm:"-" json:"requestHeaders"`
	RequestBodies       []EndpointMockExpectRequest        `gorm:"-" json:"requestBodies"`
	RequestQueryParams  []EndpointMockExpectRequest        `gorm:"-" json:"requestQueryParams"`
	RequestPathParams   []EndpointMockExpectRequest        `gorm:"-" json:"requestPathParams"`
	ResponseBody        EndpointMockExpectResponse         `gorm:"-" json:"responseBody"`
	ResponseHeaders     []EndpointMockExpectResponseHeader `gorm:"-" json:"responseHeaders"`
}

func (EndpointMockExpect) TableName

func (EndpointMockExpect) TableName() string

type EndpointMockExpectRequest

type EndpointMockExpectRequest struct {
	BaseModel
	EndpointMockExpectId uint                           `json:"endpointMockExpectId"`
	CompareWay           consts.ComparisonOperator      `json:"compareWay"`
	Name                 string                         `json:"name"`
	Value                string                         `json:"value"`
	Source               consts.ParamIn                 `json:"source"`
	SelectType           consts.ExpectRequestSelectType `json:"selectType"`
}

func (EndpointMockExpectRequest) TableName

func (EndpointMockExpectRequest) TableName() string

type EndpointMockExpectResponse

type EndpointMockExpectResponse struct {
	BaseModel
	EndpointMockExpectId uint   `json:"endpointMockExpectId"`
	Code                 string `json:"code"`
	DelayTime            uint   `json:"delayTime"`
	Value                string `gorm:"type:text" json:"value"`
}

func (EndpointMockExpectResponse) TableName

func (EndpointMockExpectResponse) TableName() string

type EndpointMockExpectResponseHeader

type EndpointMockExpectResponseHeader struct {
	BaseModel
	EndpointMockExpectId uint   `json:"endpointMockExpectId"`
	Name                 string `json:"name"`
	Value                string `json:"value"`
}

func (EndpointMockExpectResponseHeader) TableName

type EndpointMockScript

type EndpointMockScript struct {
	BaseModel
	Content    string `json:"content" gorm:"type:longtext"`
	EndpointId uint   `json:"endpointId"`
	//EndpointInterfaceId uint              `json:"endpointInterfaceId"`
	Method     consts.HttpMethod `json:"method"`
	CreateUser string            `json:"createUser"`
	UpdateUser string            `json:"updateUser"`
}

func (EndpointMockScript) TableName

func (EndpointMockScript) TableName() string

type EndpointPathParam

type EndpointPathParam struct {
	EndpointInterfaceParam
	EndpointId uint `json:"endpointId"`
}

func (EndpointPathParam) TableName

func (EndpointPathParam) TableName() string

type EndpointSnapshot

type EndpointSnapshot struct {
	BaseModel
	EndpointId uint   `json:"endpointId"`
	DocumentId uint   `gorm:"index:document_id_index;not null" json:"documentId"`
	Content    string `gorm:"type:longtext" json:"content"`
}

func (EndpointSnapshot) TableName

func (EndpointSnapshot) TableName() string

type EndpointTag

type EndpointTag struct {
	BaseModel
	Name      string `gorm:"index:name_project_index,unique;not null;type:varchar(200)" json:"name"`
	ProjectId uint   `gorm:"index:name_project_index,unique;not null;type:varchar(200)" json:"projectId"`
}

func (EndpointTag) TableName

func (EndpointTag) TableName() string

type EndpointTagRel

type EndpointTagRel struct {
	BaseModel
	EndpointId uint   `gorm:"index:endpoint_tag_project_index,unique;not null;type:varchar(200)" json:"endpointId"`
	TagId      uint   `json:"tagId"`
	TagName    string `gorm:"index:endpoint_tag_project_index,unique;not null;type:varchar(200)" json:"tagName"`
	ProjectId  uint   `gorm:"index:endpoint_tag_project_index,unique;not null;type:varchar(200)" json:"projectId"`
}

func (EndpointTagRel) TableName

func (EndpointTagRel) TableName() string

type EndpointVersion

type EndpointVersion struct {
	BaseModel
	Version    string `json:"version"`
	EndpointId uint   `json:"endpointId"`
}

func (EndpointVersion) TableName

func (EndpointVersion) TableName() string

type Environment

type Environment struct {
	BaseModel
	ProjectId    uint             `json:"projectId"`
	Name         string           `json:"name"`
	Vars         []EnvironmentVar `gorm:"-" json:"vars"`
	ServeServers []ServeServer    `gorm:"-" json:"serveServers"`
	Sort         uint             `json:"sort"`
}

func (Environment) TableName

func (Environment) TableName() string

type EnvironmentParam

type EnvironmentParam struct {
	BaseModel
	domain.GlobalParam
	Disabled    bool   `json:"disabled"`
	Description string `json:"description"`
	ProjectId   uint   `json:"projectId"`
}

func (EnvironmentParam) TableName

func (EnvironmentParam) TableName() string

type EnvironmentVar

type EnvironmentVar struct {
	BaseModel
	domain.GlobalVar

	EnvironmentId uint `json:"environmentId"`
	ProjectId     uint `json:"projectId"`
}

func (EnvironmentVar) TableName

func (EnvironmentVar) TableName() string

type ExecLogCheckpoint

type ExecLogCheckpoint struct {
	DebugConditionCheckpoint
	InvokeId uint `json:"invokeId"`
}

func (ExecLogCheckpoint) TableName

func (ExecLogCheckpoint) TableName() string

type ExecLogDatabaseOpt

type ExecLogDatabaseOpt struct {
	DebugConditionDatabaseOpt
	InvokeId uint `json:"invokeId"`
}

func (ExecLogDatabaseOpt) TableName

func (ExecLogDatabaseOpt) TableName() string

type ExecLogExtractor

type ExecLogExtractor struct {
	DebugConditionExtractor
	InvokeId uint `json:"invokeId"`
}

func (ExecLogExtractor) TableName

func (ExecLogExtractor) TableName() string

type ExecLogProcessor

type ExecLogProcessor struct {
	BaseModel

	Name           string                `json:"name"`
	Desc           string                `json:"desc"`
	ProgressStatus consts.ProgressStatus `json:"progressStatus"`
	ResultStatus   consts.ResultStatus   `json:"resultStatus" gorm:"default:pass"`
	StartTime      *time.Time            `json:"startTime"`
	EndTime        *time.Time            `json:"endTime"`

	ParentId uint `json:"parentId"`
	InvokeId uint `json:"invokeId"`
	ReportId uint `json:"reportId"`
	UseID    uint `json:"useId"`

	// type
	ProcessorCategory consts.ProcessorCategory `json:"processorCategory" yaml:"processorCategory"`

	// for interface
	EndpointInterfaceId   uint                `json:"endpointInterfaceId"`
	DebugInterfaceId      uint                `json:"debugInterfaceId"`
	ReqContent            string              `json:"reqContent,omitempty" gorm:"type:longtext"`
	RespContent           string              `json:"respContent,omitempty" gorm:"type:longtext"`
	HttpRespStatusCode    consts.HttpRespCode `json:"httpStatusCode"`
	HttpRespStatusContent string              `json:"httpStatusContent"`

	InterfaceExtractorsResult  []ExecLogExtractor  `gorm:"-" json:"interfaceExtractorsResult,omitempty"`
	InterfaceCheckpointsResult []ExecLogCheckpoint `gorm:"-" json:"interfaceCheckpointsResult,omitempty"`

	// for processor
	ProcessorType       consts.ProcessorType `json:"processorType" yaml:"processorType"`
	ScenarioProcessorId uint                 `gorm:"default:0" json:"scenarioProcessorId,omitempty"`
	ScenarioId          uint                 `gorm:"default:0" json:"scenarioId,omitempty"`

	Summary string `json:"summary,omitempty"`
	Detail  string `gorm:"type:text" json:"detail,omitempty"`
	Output  string `json:"output,omitempty"`

	Logs []*ExecLogProcessor `gorm:"-" json:"logs"`

	Round string `gorm:"type:text" json:"round,omitempty"`
}

func (ExecLogProcessor) TableName

func (ExecLogProcessor) TableName() string

type ExecLogResponseDefine

type ExecLogResponseDefine struct {
	DebugConditionResponseDefine
	InvokeId uint `json:"invokeId"`
}

func (ExecLogResponseDefine) TableName

func (ExecLogResponseDefine) TableName() string

type ExecLogScript

type ExecLogScript struct {
	DebugConditionScript
	InvokeId uint `json:"invokeId"`
}

func (ExecLogScript) TableName

func (ExecLogScript) TableName() string

type InterfaceApiKeyBase

type InterfaceApiKeyBase struct {
	Key          string `json:"key"`
	Value        string `json:"value"`
	TransferMode string `json:"transferMode"`

	InterfaceId uint `json:"interfaceId"`
}

type InterfaceBase

type InterfaceBase struct {
	Name        string `json:"name"`
	OperationId string `json:"operationId"`
	Description string `json:"description"`
	Desc        string `json:"desc"`
	Security    string `json:"security"`
	//IsDir       bool   `json:"isDir"`
	ParentId  uint `json:"parentId"`
	ProjectId uint `json:"projectId"`
	UseID     uint `json:"useId"`

	Ordr int `json:"ordr"`

	Slots iris.Map `gorm:"-" json:"slots"`

	InterfaceConfigBase
}

type InterfaceBasicAuthBase

type InterfaceBasicAuthBase struct {
	Username string `json:"username"`
	Password string `json:"password"`

	InterfaceId uint `json:"interfaceId"`
}

type InterfaceBearerTokenBase

type InterfaceBearerTokenBase struct {
	Token       string `json:"token"`
	InterfaceId uint   `json:"interfaceId"`
}

type InterfaceBodyFormDataItemBase

type InterfaceBodyFormDataItemBase struct {
	Name        string              `json:"name"`
	Value       string              `json:"value"`
	Type        consts.FormDataType `json:"type"`
	Desc        string              `json:"desc"`
	InterfaceId uint                `json:"interfaceId"`
}

type InterfaceBodyFormUrlEncodedItemBase

type InterfaceBodyFormUrlEncodedItemBase struct {
	Name        string `json:"name"`
	Value       string `json:"value"`
	Desc        string `json:"desc"`
	InterfaceId uint   `json:"interfaceId"`
}

type InterfaceConfigBase

type InterfaceConfigBase struct {
	Url      string                 `gorm:"default:''" json:"url"`
	Method   consts.HttpMethod      `gorm:"default:GET" json:"method"`
	Body     string                 `gorm:"type:text" json:"body"`
	BodyType consts.HttpContentType `gorm:"default:'application/json'" json:"bodyType"`

	AuthorizationType string `gorm:"default:''" json:"authorizationType"`
	PreRequestScript  string `gorm:"default:''" json:"preRequestScript"`
	ValidationScript  string `gorm:"default:''" json:"validationScript"`
	Version           string `gorm:"default:''" json:"Version"`
}

type InterfaceCookieBase

type InterfaceCookieBase struct {
	Name        string `json:"name"`
	Desc        string `json:"desc"`
	Value       string `json:"value" gorm:"type:text"`
	Type        string `json:"type"`
	InterfaceId uint   `json:"interfaceId"`
}

type InterfaceHeaderBase

type InterfaceHeaderBase struct {
	Name        string `json:"name"`
	Desc        string `json:"desc"`
	Value       string `gorm:"type:text" json:"value"`
	Type        string `json:"type"`
	InterfaceId uint   `json:"interfaceId"`
}

type InterfaceOAuth20Base

type InterfaceOAuth20Base struct {
	AccessToken  string `json:"accessToken"`
	HeaderPrefix string `json:"headerPrefix" gorm:"default:Bearer"`

	Name           string           `json:"name"`
	GrantType      consts.GrantType `json:"grantType" gorm:"default:authorizationCode"`
	CallbackUrl    string           `json:"callbackUrl"`
	AuthURL        string           `json:"authURL"`
	AccessTokenURL string           `json:"accessTokenURL"`
	ClientID       string           `json:"clientID"`
	ClientSecret   string           `json:"clientSecret"`
	Scope          string           `json:"scope"`
	State          string           `json:"state"`

	ClientAuthentication consts.ClientAuthenticationWay `json:"clientAuthentication" gorm:"default:sendAsBasicAuthHeader"`

	InterfaceId uint `json:"interfaceId"`
}

type InterfaceParamBase

type InterfaceParamBase struct {
	Name        string         `json:"name"`
	Value       string         `json:"value" gorm:"type:text"`
	Type        string         `json:"type"`
	ParamIn     consts.ParamIn `json:"paramIn"`
	Desc        string         `json:"desc"`
	InterfaceId uint           `json:"interfaceId"`
}

type InterfaceRequestBodyBase

type InterfaceRequestBodyBase struct {
	InterfaceId uint   `json:"interfaceId" gorm:"index"`
	MediaType   string `json:"mediaType"`
	Description string `json:"description"`
	SchemaRefId int64  `json:"schemaRefId"`
	Examples    string `gorm:"type:longtext" json:"examples"`
}

type InterfaceRequestBodyItemBase

type InterfaceRequestBodyItemBase struct {
	Name          string `json:"name"`
	Type          string `json:"type"`
	Content       string `gorm:"type:longtext" json:"content"`
	RequestBodyId uint   `json:"requestBodyId" gorm:"index"`
}

type InterfaceResponseBodyBase

type InterfaceResponseBodyBase struct {
	Code        string `json:"code"`
	InterfaceId uint   `json:"interfaceId" gorm:"index"`
	MediaType   string `json:"mediaType"`
	Description string `json:"description"`
	SchemaRefId int64  `json:"schemaRefId"`
	Examples    string `gorm:"type:longtext" json:"examples"`
}

type InterfaceResponseBodyHeaderBase

type InterfaceResponseBodyHeaderBase struct {
	Name           string `json:"name"`
	Desc           string `json:"desc"`
	Value          string `json:"value"`
	ResponseBodyId uint   `json:"responseBodyId" gorm:"index"`
}

type InterfaceResponseBodyItemBase

type InterfaceResponseBodyItemBase struct {
	Name           string `json:"name"`
	Type           string `json:"type"`
	Content        string `gorm:"type:longtext" json:"content"`
	ResponseBodyId uint   `json:"ResponseBodyId" gorm:"index"`
}

type InvocationBase

type InvocationBase struct {
	Name string `json:"name"`
	Desc string `json:"desc,omitempty" gorm:"type:text"`

	ReqContent  string `json:"reqContent,omitempty" gorm:"type:longtext"`
	RespContent string `json:"respContent,omitempty" gorm:"type:longtext"`

	PreConditionsContent  string `json:"preConditionsContent,omitempty" gorm:"type:longtext"`
	PostConditionsContent string `json:"postConditionsContent,omitempty" gorm:"type:longtext"`

	HttpRespStatusCode    consts.HttpRespCode `json:"httpStatusCode"`
	HttpRespStatusContent string              `json:"httpStatusContent"`

	ResultStatus     consts.ResultStatus `json:"resultStatus" gorm:"default:pass"`
	CheckpointStatus consts.ResultStatus `json:"checkpointStatus"`

	EndpointInterfaceId uint `gorm:"index:,default:0" json:"endpointInterfaceId,omitempty"`
	DebugInterfaceId    uint `gorm:"index:,default:0" json:"debugInterfaceId,omitempty"`

	ProjectId uint `json:"projectId,omitempty"`
}

type JSON

type JSON json.RawMessage

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

实现 driver.Valuer 接口,Sample 返回 json value

type Message

type Message struct {
	BaseModel
	serverDomain.MessageBase
}

func (Message) TableName

func (Message) TableName() string

type MessageRead

type MessageRead struct {
	BaseModel
	serverDomain.MessageReadBase
}

func (MessageRead) TableName

func (MessageRead) TableName() string

type MockInvocation

type MockInvocation struct {
	BaseModel
	InvocationBase
}

func (MockInvocation) TableName

func (MockInvocation) TableName() string

type MockJsExpression

type MockJsExpression struct {
	BaseModel

	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"`
}

func (MockJsExpression) TableName

func (MockJsExpression) TableName() string

type Oplog

type Oplog struct {
	gorm.Model
	Ip           string        `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`
	Method       string        `json:"method" form:"method" gorm:"column:method;comment:请求方法" validate:"required"`
	Path         string        `json:"path" form:"path" gorm:"column:path;comment:请求路径" validate:"required"`
	Status       int           `json:"status" form:"status" gorm:"column:status;comment:请求状态" validate:"required"`
	Latency      time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟"`
	Agent        string        `json:"agent" form:"agent" gorm:"column:agent;comment:代理"`
	ErrorMessage string        `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"`
	Body         string        `json:"body" form:"body" gorm:"type:longtext;column:body;comment:请求Body"`
	Resp         string        `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"`
	UserID       uint          `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"`
}

Oplog 中间件 modelRef

func (Oplog) TableName

func (Oplog) TableName() string

type Org

type Org struct {
	BaseModel

	Name string `json:"name"`
	Desc string `json:"desc" gorm:"column:descr;type:text"`
}

func (Org) TableName

func (Org) TableName() string

type Plan

type Plan struct {
	BaseModel

	Version float64 `json:"version" yaml:"version"`
	Name    string  `json:"name" yaml:"name"`
	Desc    string  `json:"desc" yaml:"desc"`

	CategoryId     int               `json:"categoryId"`
	ProjectId      uint              `json:"projectId"`
	SerialNumber   string            `json:"serialNumber"`
	AdminId        uint              `json:"adminId"` //负责人ID
	CreateUserId   uint              `json:"createUserId"`
	UpdateUserId   uint              `json:"updateUserId"`
	Status         consts.TestStatus `json:"status"`
	TestStage      consts.TestStage  `json:"testStage"`
	Scenarios      []Scenario        `gorm:"-" json:"scenarios"`
	Reports        []PlanReport      `gorm:"-" json:"reports"`
	TestPassRate   string            `gorm:"-" json:"testPassRate"`
	AdminName      string            `gorm:"-" json:"adminName"`      //负责人姓名
	UpdateUserName string            `gorm:"-" json:"updateUserName"` //最近更新人姓名
	CurrEnvId      uint              `json:"currEnvId"`
	CreateUserName string            `gorm:"-" json:"createUserName"` //创建人姓名
	ExecTimes      int64             `gorm:"-" json:"execTimes"`      //执行次数
	ExecutorName   string            `gorm:"-" json:"executorName"`   //执行人姓名
	ExecTime       *time.Time        `gorm:"-" json:"execTime"`       //执行时间
	ExecEnv        string            `gorm:"-" json:"execEnv"`        //执行环境

}

func (Plan) TableName

func (Plan) TableName() string

type PlanReport

type PlanReport struct {
	BaseModel

	Name string `json:"name"`
	Desc string `gorm:"type:text" json:"desc"`

	ProgressStatus consts.ProgressStatus `json:"progressStatus"`
	ResultStatus   consts.ResultStatus   `json:"resultStatus" gorm:"default:pass"`

	StartTime *time.Time `json:"startTime"`
	EndTime   *time.Time `json:"endTime"`
	Duration  int64      `json:"duration"` // sec

	TotalScenarioNum int `json:"totalScenarioNum"`
	PassScenarioNum  int `json:"passScenarioNum"`
	FailScenarioNum  int `json:"failScenarioNum" yaml:"failScenarioNum"`

	TotalInterfaceNum int `json:"totalInterfaceNum"`
	PassInterfaceNum  int `json:"passInterfaceNum"`
	FailInterfaceNum  int `json:"failInterfaceNum" yaml:"failInterfaceNum"`

	TotalRequestNum int `json:"totalRequestNum"`
	PassRequestNum  int `json:"passRequestNum"`
	FailRequestNum  int `json:"failRequestNum"`

	TotalAssertionNum int `json:"totalAssertionNum"`
	PassAssertionNum  int `json:"passAssertionNum"`
	FailAssertionNum  int `json:"failAssertionNum"`

	TotalProcessorNum  int `json:"totalProcessorNum"`
	FinishProcessorNum int `json:"finishProcessorNum"`

	InterfaceStatusMap map[uint]map[consts.ResultStatus]int `gorm:"-"`

	Payload string `json:"payload"`

	PlanId    uint `json:"planId"`
	ProjectId uint `json:"projectId"`

	CreateUserId uint   `json:"createUserId"`
	SerialNumber string `json:"serialNumber"`
	ExecEnvId    uint   `json:"execEnvId"` //执行环境Id

	StatRaw string `json:"stat"`
}

func (PlanReport) TableName

func (PlanReport) TableName() string

type PlanReportDetail

type PlanReportDetail struct {
	PlanReport
	CreateUserName  string                 `json:"createUserName"`
	ExecUserName    string                 `json:"execUserName"`
	ExecEnv         string                 `json:"execEnv"` //执行环境
	ScenarioReports []ScenarioReportDetail `json:"scenarioReports"`
}

type Processor

type Processor struct {
	BaseModel
	CreatedBy uint `json:"createdBy"`

	Name     string            `json:"name" yaml:"name"`
	Comments string            `json:"comments" yaml:"comments"`
	Method   consts.HttpMethod `json:"method" yaml:"method"`

	ParentId   uint `json:"parentId"`
	ScenarioId uint `json:"scenarioId"`
	ProjectId  uint `json:"projectId"`

	EntityCategory consts.ProcessorCategory `json:"entityCategory"`
	EntityType     consts.ProcessorType     `json:"entityType"`

	EntityId              uint                         `json:"entityId"` // Debug Interface Id for ProcessorInterface type
	EndpointInterfaceId   uint                         `json:"endpointInterfaceId"`
	ProcessorInterfaceSrc consts.ProcessorInterfaceSrc `json:"processorInterfaceSrc"`

	Ordr     int          `json:"ordr"`
	Children []*Processor `gorm:"-" json:"children"`
	Slots    iris.Map     `gorm:"-" json:"slots"`
}

func (Processor) TableName

func (Processor) TableName() string

type ProcessorAssertion

type ProcessorAssertion struct {
	BaseModel
	agentExec.ProcessorEntityBase

	Expression string `json:"expression" yaml:"expression"`
}

func (ProcessorAssertion) TableName

func (ProcessorAssertion) TableName() string

type ProcessorComm

type ProcessorComm struct {
	Id uint `json:"id" yaml:"id"`
	agentExec.ProcessorEntityBase

	EntityId            uint              `json:"entityId"`
	EndpointInterfaceId uint              `json:"endpointInterfaceId"`
	Method              consts.HttpMethod `json:"method"`
	SrcName             string            `json:"srcName"`

	ProcessorInterfaceSrc consts.ProcessorInterfaceSrc `json:"processorInterfaceSrc"`
}

type ProcessorCookie

type ProcessorCookie struct {
	BaseModel
	agentExec.ProcessorEntityBase

	CookieName   string     `json:"cookieName" yaml:"cookieName"`
	VariableName string     `json:"variableName" yaml:"variableName"`
	RightValue   string     `json:"rightValue" yaml:"rightValue"`
	Domain       string     `json:"domain" yaml:"domain"`
	ExpireTime   *time.Time `json:"expireTime" yaml:"expireTime"`
}

func (ProcessorCookie) TableName

func (ProcessorCookie) TableName() string

type ProcessorCustomCode

type ProcessorCustomCode struct {
	BaseModel
	agentExec.ProcessorEntityBase

	Content string `gorm:"type:longtext;" json:"content" yaml:"content"`
	Desc    string `json:"desc" yaml:"desc"`
}

func (ProcessorCustomCode) TableName

func (ProcessorCustomCode) TableName() string

type ProcessorData

type ProcessorData struct {
	BaseModel
	agentExec.ProcessorEntityBase

	Src  consts.DataItSrc  `json:"src" yaml:"src"`
	Type consts.DataItType `json:"type,omitempty" yaml:"type,omitempty"`

	Url        string `json:"url,omitempty" yaml:"url,omitempty"`
	DatapoolId uint   `json:"datapoolId,omitempty" yaml:"datapoolId,omitempty"`

	Separator string `json:"separator,omitempty" yaml:"separator,omitempty"`

	RepeatTimes int  `json:"repeatTimes,omitempty" yaml:"repeatTimes,omitempty"`
	IsRand      bool `json:"isRand,omitempty" yaml:"isRand,omitempty"`

	VariableName string `json:"variableName,omitempty" yaml:"variableName,omitempty"`
}

func (ProcessorData) TableName

func (ProcessorData) TableName() string

type ProcessorExtractor

type ProcessorExtractor struct {
	BaseModel
	agentExec.ProcessorEntityBase

	Src  consts.ExtractorSrc  `json:"src"`
	Type consts.ExtractorType `json:"type"`
	Key  string               `json:"key"` // form header

	Expression string `json:"expression"`

	BoundaryStart    string `json:"boundaryStart"`
	BoundaryEnd      string `json:"boundaryEnd"`
	BoundaryIndex    int    `json:"boundaryIndex"`
	BoundaryIncluded bool   `json:"boundaryIncluded"`

	Variable string `json:"variable"`

	Result      string `json:"result"`
	InterfaceId uint   `json:"interfaceId"`
}

func (ProcessorExtractor) TableName

func (ProcessorExtractor) TableName() string

type ProcessorGroup

type ProcessorGroup struct {
	BaseModel
	agentExec.ProcessorEntityBase
}

func (ProcessorGroup) TableName

func (ProcessorGroup) TableName() string

type ProcessorLogic

type ProcessorLogic struct {
	BaseModel
	agentExec.ProcessorEntityBase

	Expression string `json:"expression" yaml:"expression"`
}

func (ProcessorLogic) TableName

func (ProcessorLogic) TableName() string

type ProcessorLoop

type ProcessorLoop struct {
	BaseModel
	agentExec.ProcessorEntityBase

	Times int    `json:"times" yaml:"times"` // time
	Range string `json:"range" yaml:"range"` // range

	InType   string `json:"inType" yaml:"inType"`     // in
	Variable string `json:"variable" yaml:"variable"` // variable
	List     string `json:"list" yaml:"list"`         // list
	Step     string `json:"step" yaml:"step"`

	IsRand       bool   `json:"isRand" yaml:"isRand"`
	VariableName string `json:"variableName" yaml:"variableName"`

	UntilExpression   string `json:"untilExpression" yaml:"untilExpression"` // until
	BreakIfExpression string `json:"breakIfExpression" yaml:"breakIfExpression"`
}

func (ProcessorLoop) TableName

func (ProcessorLoop) TableName() string

type ProcessorPrint

type ProcessorPrint struct {
	BaseModel
	agentExec.ProcessorEntityBase

	RightValue string `json:"rightValue" yaml:"rightValue"`
}

func (ProcessorPrint) TableName

func (ProcessorPrint) TableName() string

type ProcessorTimer

type ProcessorTimer struct {
	BaseModel
	agentExec.ProcessorEntityBase

	SleepTime int `json:"sleepTime" yaml:"sleepTime"`

	Unit string `json:"unit" yaml:"unit"`
}

func (ProcessorTimer) TableName

func (ProcessorTimer) TableName() string

type ProcessorVariable

type ProcessorVariable struct {
	BaseModel
	agentExec.ProcessorEntityBase

	VariableName string `json:"variableName" yaml:"variableName"`
	Expression   string `json:"expression" yaml:"expression"`
}

func (ProcessorVariable) TableName

func (ProcessorVariable) TableName() string

type Project

type Project struct {
	BaseModel
	serverDomain.ProjectBase

	Spec          string `json:"spec"`
	Spec2         string `json:"spec2"`
	EnvironmentId uint   `json:"environmentId"`
}

func (Project) TableName

func (Project) TableName() string

type ProjectCron

type ProjectCron struct {
	BaseModel
	Name          string                `json:"name"`
	Switch        consts.SwitchStatus   `json:"switch"`
	Cron          string                `json:"cron"`
	Source        consts.CronSource     `json:"source"`
	ConfigId      uint                  `json:"configId"`
	ProjectId     uint                  `json:"projectId"`
	ExecTime      *time.Time            `json:"execTime"`
	ExecStatus    consts.CronExecStatus `json:"execStatus"`
	ExecErr       string                `json:"execErr"`
	CreateUserId  uint                  `json:"createUserId"`
	UpdateUserId  uint                  `json:"updateUserId"`
	SwaggerConfig SwaggerSync           `gorm:"-" json:"swaggerReq"`
	LecangConfig  CronConfigLecang      `gorm:"-" json:"lecangReq"`
}

func (ProjectCron) TableName

func (ProjectCron) TableName() string

type ProjectCronList

type ProjectCronList struct {
	ProjectCron
	CategoryId     int    `json:"categoryId"`
	CategoryName   string `json:"categoryName"`
	CreateUserName string `json:"createUserName"`
}

type ProjectIdAndFloat

type ProjectIdAndFloat struct {
	ProjectId int64   `json:"projectId"`
	Coverage  float64 `json:"coverage"`
}

type ProjectIdAndId

type ProjectIdAndId struct {
	ProjectId int64 `json:"projectId"`
	Id        int64 `json:"id"`
}

type ProjectIdsGroupByUserId

type ProjectIdsGroupByUserId struct {
	UserId     int64  `gorm:"-" json:"userId"`
	ProjectIds string `gorm:"-" json:"projectIds"`
}

type ProjectMember

type ProjectMember struct {
	BaseModel

	ProjectId     uint `json:"projectId"`
	ProjectRoleId uint `json:"projectRoleId"`
	UserId        uint `json:"userId"`

	ProjectRoleName consts.RoleType `json:"projectRoleName"`
}

func (ProjectMember) TableName

func (ProjectMember) TableName() string

type ProjectMemberAudit

type ProjectMemberAudit struct {
	BaseModel
	ProjectId       uint               `json:"projectId"`
	ProjectRoleName consts.RoleType    `json:"projectRoleName"`
	AuditUserId     uint               `json:"auditUserId"`
	ApplyUserId     uint               `json:"applyUserId"`
	Status          consts.AuditStatus `gorm:"default:0" json:"status"`
	Description     string             `json:"description" gorm:"type:text"`
	AuditUserName   string             `gorm:"-" json:"auditUserName"`
	ApplyUserName   string             `gorm:"-" json:"applyUserName"`
	ProjectName     string             `gorm:"-" json:"projectName"`
}

func (ProjectMemberAudit) TableName

func (ProjectMemberAudit) TableName() string

type ProjectMemberRole

type ProjectMemberRole struct {
	Project
	RoleId   uint            `json:"roleId"`
	RoleName consts.RoleType `json:"roleName"`
}

type ProjectMenu

type ProjectMenu struct {
	BaseModel
	serverDomain.ProjectMenuBase
}

func (ProjectMenu) TableName

func (ProjectMenu) TableName() string

type ProjectMockSetting

type ProjectMockSetting struct {
	BaseModel

	Priority    consts.MockPriority      `json:"priority"`
	UseExamples mockData.UseExamplesEnum `gorm:"-" json:"useExamplesEnum"`

	ProjectId uint `json:"projectId"`
}

func (ProjectMockSetting) TableName

func (ProjectMockSetting) TableName() string

type ProjectPerm

type ProjectPerm struct {
	BaseModel
	serverDomain.ProjectPermBase
}

func (ProjectPerm) TableName

func (ProjectPerm) TableName() string

type ProjectProductRel

type ProjectProductRel struct {
	BaseModel

	ProjectId uint `json:"projectId"`
	ProductId uint `json:"productId"`
}

func (ProjectProductRel) TableName

func (ProjectProductRel) TableName() string

type ProjectRanking

type ProjectRanking struct {
	Interfaces []UserTotal `json:"-"`
	Scenarios  []UserTotal `json:"-"`
}

type ProjectRecentlyVisited

type ProjectRecentlyVisited struct {
	BaseModel
	serverDomain.ProjectRecentlyVisitedBase
}

func (ProjectRecentlyVisited) TableName

func (ProjectRecentlyVisited) TableName() string

type ProjectRole

type ProjectRole struct {
	BaseModel

	Name        consts.RoleType   `gorm:"uniqueIndex;not null; type:varchar(256)" json:"name"`
	DisplayName string            `gorm:"type:varchar(256)" json:"displayName" comment:"显示名称"`
	Description string            `gorm:"type:varchar(256)" json:"description" comment:"描述"`
	Source      consts.RoleSource `json:"source" comment:"来源"`
}

func (ProjectRole) TableName

func (ProjectRole) TableName() string

type ProjectRoleMenu

type ProjectRoleMenu struct {
	BaseModel
	RoleId uint `gorm:"index:index_role_menu_id,unique;not null" json:"role_id"`
	MenuId uint `gorm:"index:index_role_menu_id,unique;not null" json:"menu_id"`
}

func (ProjectRoleMenu) TableName

func (ProjectRoleMenu) TableName() string

type ProjectRolePerm

type ProjectRolePerm struct {
	BaseModel
	serverDomain.ProjectRolePermBase
}

func (ProjectRolePerm) TableName

func (ProjectRolePerm) TableName() string

type ProjectSpaceRel

type ProjectSpaceRel struct {
	BaseModel

	ProjectId uint   `json:"projectId"`
	SpaceCode string `json:"spaceCode"`
}

func (ProjectSpaceRel) TableName

func (ProjectSpaceRel) TableName() string

type ProjectUserServer

type ProjectUserServer struct {
	BaseModel
	ProjectId uint `json:"projectId"`
	UserId    uint `json:"userId"`
	ServerId  uint `json:"serverId"`
}

func (ProjectUserServer) TableName

func (ProjectUserServer) TableName() string

type ProjectUserTotal

type ProjectUserTotal struct {
	UserTotal
	ProjectId int64 `json:"projectId"`
}

type ProjectsBugCount

type ProjectsBugCount struct {
	ProjectId int64 `json:"projectId"`
	Count     int64 `json:"count"`
}

type RankingUser

type RankingUser struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type RelaPlanScenario

type RelaPlanScenario struct {
	BaseModel

	PlanId     uint `json:"planId"`
	ScenarioId uint `json:"scenarioId"`

	ServiceId uint `json:"serviceId"`
	ProjectId uint `json:"projectId"`
	Ordr      int  `gorm:"default:0" json:"ordr"`
}

func (RelaPlanScenario) TableName

func (RelaPlanScenario) TableName() string

type Scenario

type Scenario struct {
	BaseModel

	Version float64 `json:"version" yaml:"version"`
	Name    string  `json:"name" yaml:"name"`
	Desc    string  `json:"desc" yaml:"desc"`

	Processor      Processor         `json:"processor" yaml:"processor" gorm:"-"`
	CategoryId     int64             `json:"categoryId"`
	ServeId        uint              `json:"serveId"`
	ProjectId      uint              `json:"projectId"`
	SerialNumber   string            `json:"serialNumber"`
	Status         consts.TestStatus `json:"status"`
	CreateUserId   uint              `json:"createUserId"`
	CreatorName    string            `gorm:"-" json:"creatorName"`
	CreateUserName string            `json:"createUserName"` //用户登录名
	UpdateUserId   uint              `json:"updateUserId"`
	UpdateUserName string            `json:"updateUserName"`
	Priority       string            `json:"priority"`
	Type           consts.TestType   `json:"type"`
	CurrEnvId      uint              `json:"currEnvId"`
}

func (Scenario) TableName

func (Scenario) TableName() string

type ScenarioDetail

type ScenarioDetail struct {
	Scenario
	CategoryName string `json:"categoryName"`
	RefId        uint   `json:"refId"`
}

type ScenarioProjectIdAndId

type ScenarioProjectIdAndId struct {
	ProjectId uint  `json:"projectId"`
	Id        int64 `json:"id"`
}

type ScenarioReport

type ScenarioReport struct {
	BaseModel

	Name string `json:"name"`
	Desc string `gorm:"type:text" json:"desc"`

	ProgressStatus consts.ProgressStatus `json:"progressStatus"`
	ResultStatus   consts.ResultStatus   `json:"resultStatus" gorm:"default:pass"`

	StartTime *time.Time `json:"startTime"`
	EndTime   *time.Time `json:"endTime"`
	Duration  int64      `json:"duration"` // sec

	TotalInterfaceNum int `json:"totalInterfaceNum"`
	PassInterfaceNum  int `json:"passInterfaceNum"`
	FailInterfaceNum  int `json:"failInterfaceNum" yaml:"failInterfaceNum"`

	TotalRequestNum int `json:"totalRequestNum"`
	PassRequestNum  int `json:"passRequestNum"`
	FailRequestNum  int `json:"failRequestNum"`

	TotalAssertionNum int `json:"totalAssertionNum"`
	PassAssertionNum  int `json:"passAssertionNum"`
	FailAssertionNum  int `json:"failAssertionNum"`

	TotalProcessorNum  int `json:"totalProcessorNum"`
	FinishProcessorNum int `json:"finishProcessorNum"`

	InterfaceStatusMap map[uint]map[consts.ResultStatus]int `gorm:"-"`

	Payload string `json:"payload"`

	ScenarioId   uint `json:"scenarioId"`
	ProjectId    uint `json:"projectId"`
	PlanReportId uint `json:"planReportId"`

	CreateUserId   uint                `json:"createUserId"`
	CreateUserName string              `gorm:"-" json:"createUserName"`
	ExecUserName   string              `gorm:"-" json:"execUserName"`
	SerialNumber   string              `json:"serialNumber"`
	Logs           []*ExecLogProcessor `gorm:"-" json:"logs"`

	ExecEnv   string `gorm:"-" json:"execEnv"`
	ExecEnvId int    `json:"execEnvId"`
	Priority  string `gorm:"-" json:"priority"`

	StatRaw string `json:"stat"`
}

func (ScenarioReport) TableName

func (ScenarioReport) TableName() string

type ScenarioReportDetail

type ScenarioReportDetail struct {
	ScenarioReport
	Priority string `json:"priority"`
}

type SchemaParam

type SchemaParam struct {
	Name        string         `json:"name"`
	Value       string         `gorm:"type:text" json:"value"`
	Type        string         `json:"type"`
	Desc        string         `json:"desc"`
	InterfaceId uint           `json:"interfaceId" gorm:"index"`
	Format      string         `json:"format"`
	Example     string         `gorm:"type:text" json:"example"`
	Pattern     string         `json:"pattern"`
	MinLength   uint64         `json:"minLength"`
	MaxLength   uint64         `json:"maxLength"`
	Default     string         `gorm:"type:text" json:"default"`
	Required    bool           `json:"required"`
	MultipleOf  float64        `json:"multipleOf"`
	MinItems    uint64         `json:"minItems"`
	MaxItems    uint64         `json:"maxItems"`
	UniqueItems bool           `json:"uniqueItems"`
	Ref         string         `json:"ref"`
	Description string         `gorm:"type:text" json:"description"`
	Minimum     float64        `json:"minimum"`
	Maximum     float64        `json:"maximum"`
	IsGlobal    bool           `gorm:"-" json:"isGlobal"`
	Enum        pq.StringArray `gorm:"type:text" json:"enum"`
}

type Serve

type Serve struct {
	BaseModel
	Name         string                    `json:"name"`
	ProjectId    uint                      `json:"projectId"`
	CreateUser   string                    `json:"createUser"`
	Status       int64                     `json:"status"`
	Description  string                    `json:"description"`
	Components   []ComponentSchema         `gorm:"-" json:"component"`
	Servers      []ServeServer             `gorm:"-" json:"servers"`
	Securities   []ComponentSchemaSecurity `gorm:"-" json:"securities"`
	GlobalParams []EnvironmentParam        `gorm:"-" json:"globalParams"`
}

func (Serve) TableName

func (Serve) TableName() string

type ServeEndpointVersion

type ServeEndpointVersion struct {
	BaseModel
	EndpointId      int64  `json:"EndpointId"`
	EndpointVersion string `json:"endpointVersion"`
	ServeVersion    string `json:"ServeVersion"`
	ServeId         int64  `json:"serveId"`
}

func (ServeEndpointVersion) TableName

func (ServeEndpointVersion) TableName() string

type ServeServer

type ServeServer struct {
	BaseModel

	ServeId       uint `json:"serveId" gorm:"uniqueIndex:idx_environment_id_serve_id"`
	EnvironmentId uint `json:"environmentId" gorm:"uniqueIndex:idx_environment_id_serve_id"`

	Url             string `json:"url"`
	Description     string `json:"description"`
	ServeName       string `gorm:"-" json:"serveName"`
	EnvironmentName string `gorm:"-" json:"environmentName"`
	Sort            uint   `gorm:"-" json:"-"`
}

func (ServeServer) TableName

func (ServeServer) TableName() string

type ServeServerArr

type ServeServerArr []ServeServer

func (ServeServerArr) Len

func (a ServeServerArr) Len() int

func (ServeServerArr) Less

func (a ServeServerArr) Less(i, j int) bool

func (ServeServerArr) Swap

func (a ServeServerArr) Swap(i, j int)

type ServeVersion

type ServeVersion struct {
	BaseModel
	Description string `json:"description"`
	CreateUser  string `json:"createUser"`
	Value       string `json:"value"`
	ServeId     int64  `json:"serveId"`
}

func (ServeVersion) TableName

func (ServeVersion) TableName() string

type ShareVariable

type ShareVariable struct {
	BaseModel

	Name      string                     `json:"name"`
	Value     string                     `gorm:"type:text" json:"value"`
	ValueType consts.ExtractorResultType `json:"valueType"`

	InvokeId            uint `gorm:"default:0" json:"invokeId"`
	DebugInterfaceId    uint `gorm:"default:0" json:"debugInterfaceId"`
	CaseInterfaceId     uint `gorm:"default:0" json:"caseInterfaceId"`
	EndpointInterfaceId uint `json:"endpointInterfaceId"`
	ServeId             uint `json:"serveId"` // for interface debug

	ScenarioProcessorId uint `gorm:"default:0" json:"scenarioProcessorId"` // for scenario
	ScenarioId          uint `gorm:"default:0" json:"scenarioId"`          // for scenario

	Scope  consts.ExtractorScope `json:"scope" gorm:"default:private"` // debug
	UsedBy consts.UsedBy         `json:"usedBy"`
}

func (ShareVariable) TableName

func (ShareVariable) TableName() string

type SimplePassRate

type SimplePassRate struct {
	TotalAssertionNum int64 `gorm:"column:totalAssertionNum"`
	PassAssertionNum  int64 `gorm:"column:passAssertionNum"`
	CheckpointPass    int64 `gorm:"column:checkpointPass"`
	CheckpointFail    int64 `gorm:"column:checkpointFail"`
}

type SimplePassRateByProjectId

type SimplePassRateByProjectId struct {
	ProjectId int64 `json:"projectId"`
	SimplePassRate
}

type Snippet

type Snippet struct {
	BaseModel

	Name   string `json:"name"`
	Desc   string `json:"desc"`
	Script string `json:"script" gorm:"type:text"`
}

func (Snippet) TableName

func (Snippet) TableName() string

type SummaryBugs

type SummaryBugs struct {
	BaseModel
	ProjectId    int64  `json:"projectId"`
	BugId        int64  `gorm:"type:varchar(128)" json:"bugId"`
	Source       string `gorm:"type:varchar(128)" json:"source"`
	BugSeverity  string `gorm:"type:varchar(50)" json:"bugSeverity"`
	BugCreatedAt string `gorm:"type:varchar(90)" json:"bugCreatedAt"`
	BugClassify  string `gorm:"type:varchar(90)" json:"bugClassify"`
	BugState     string `gorm:"type:varchar(50)" json:"bugState"`
}

func (SummaryBugs) TableName

func (SummaryBugs) TableName() string

type SummaryBugsSeverity

type SummaryBugsSeverity struct {
	Count       int64  `gorm:"column:count" json:"count"`
	BugSeverity string `gorm:"column:severity" json:"severity"`
}

type SummaryCard

type SummaryCard struct {
	SummaryCardTotal
	ProjectTotal int64   `json:"projectTotal"`
	InterfaceHB  float64 `json:"interfaceHb"`
	ScenarioHB   float64 `json:"scenarioHb"`
	CoverageHB   float64 `json:"coverageHb"`
}

type SummaryCardTotal

type SummaryCardTotal struct {
	ScenarioTotal  int64   `gorm:"type:bigint" json:"scenarioTotal"`
	InterfaceTotal int64   `gorm:"type:bigint" json:"interfaceTotal"`
	ExecTotal      int64   `gorm:"type:bigint" json:"execTotal"`
	PassRate       float64 `gorm:"type:double" json:"passRate"`
	Coverage       float64 `gorm:"type:double" json:"coverage"`
}

type SummaryDetails

type SummaryDetails struct {
	BaseModel

	ProjectId      int64   `json:"projectId"`
	ScenarioTotal  int64   `json:"scenarioTotal"`
	InterfaceTotal int64   `json:"interfaceTotal"`
	ExecTotal      int64   `json:"execTotal"`
	PassRate       float64 `json:"passRate"`
	Coverage       float64 `json:"coverage"`
}

func (SummaryDetails) TableName

func (SummaryDetails) TableName() string

type SummaryProjectInfo

type SummaryProjectInfo struct {
	BaseModel
	Name           string `json:"name"`
	Descr          string `json:"descr"`
	ShortName      string `json:"shortName"`
	IncludeExample bool   `json:"includeExample"`
	AdminId        uint   `json:"adminId"`
	AdminName      string `json:"adminName"`
}

type SummaryProjectUserRanking

type SummaryProjectUserRanking struct {
	BaseModel

	Sort          int64 `json:"sort"`
	ProjectId     int64 `json:"projectId"`
	UserId        int64 `json:"userId"`
	ScenarioTotal int64 `json:"scenarioTotal"`
	TestCaseTotal int64 `json:"testCaseTotal"`
}

func (SummaryProjectUserRanking) TableName

func (SummaryProjectUserRanking) TableName() string

type SummaryUserList

type SummaryUserList struct {
	UserName string `json:"user_name"`
	UserId   int64  `json:"user_id"`
}

func (*SummaryUserList) Scan

func (summaryUserList *SummaryUserList) Scan(val interface{}) error

Scan 解码json字符串

func (*SummaryUserList) Value

func (summaryUserList *SummaryUserList) Value() (value driver.Value, err error)

Value 编码json

type SwaggerSync

type SwaggerSync struct {
	BaseModel
	//Switch     consts.SwitchStatus `json:"switch"`
	SyncType   consts.DataSyncType `json:"syncType"`
	CategoryId int                 `json:"categoryId"`
	Url        string              `json:"url"`
	//Cron       string              `json:"cron"`
	//ProjectId  int                 `json:"projectId" gorm:"unique"`
	ServeId int `json:"serveId"`
}

func (SwaggerSync) TableName

func (SwaggerSync) TableName() string

type SysAgent

type SysAgent struct {
	BaseModel

	Name string `json:"name" validate:"required"`
	Url  string `json:"url" validate:"required"`
	Desc string `json:"desc"`

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

func (SysAgent) TableName

func (SysAgent) TableName() string

type SysConfig

type SysConfig struct {
	Key   string `gorm:"column:k;index:key_index,unique;not null" json:"key"`
	Value string `gorm:"column:v;type:text" json:"value"`
}

func (SysConfig) TableName

func (SysConfig) TableName() string

type SysJslib

type SysJslib struct {
	BaseModel

	Name string `json:"name"`

	ScriptFile string `json:"scriptFile" gorm:"type:text" validate:"required"`

	TypesFile string `json:"typesFile" gorm:"type:text"`

	ProjectId uint `json:"projectId"`

	CreateUser string `json:"createUser"`
	UpdateUser string `json:"updateUser"`
	// contains filtered or unexported fields
}

func (SysJslib) TableName

func (SysJslib) TableName() string

type SysPerm

type SysPerm struct {
	BaseModel
	serverDomain.PermBase
}

func (SysPerm) TableName

func (SysPerm) TableName() string

type SysRole

type SysRole struct {
	BaseModel
	serverDomain.RoleBase
}

func (SysRole) TableName

func (SysRole) TableName() string

type SysUser

type SysUser struct {
	BaseModel

	serverDomain.UserBase

	Password string         `gorm:"type:varchar(250)" json:"password" validate:"required"`
	Vcode    string         `json:"vcode"`
	Profile  SysUserProfile `gorm:"foreignKey:user_id"`

	RoleIds []uint `gorm:"-" json:"role_ids"`
}

func (SysUser) TableName

func (SysUser) TableName() string

type SysUserProfile

type SysUserProfile struct {
	BaseModel

	Phone       string `json:"phone"`
	CurrServeId uint   `json:"currServeId"`
	//CurrServerId  uint   `json:"currServerId"`
	CurrProjectId uint `json:"currProjectId"`

	UserId uint `json:"userId"`
}

func (SysUserProfile) TableName

func (SysUserProfile) TableName() string

type ThirdPartySync

type ThirdPartySync struct {
	BaseModel
	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"`
	ServeId      uint                `json:"serveId"`
	ServiceCode  string              `json:"serviceCode"`
	ExecTime     *time.Time          `json:"execTime"`
	CreateUserId uint                `json:"createUserId"`
}

func (ThirdPartySync) TableName

func (ThirdPartySync) TableName() string

type UserIdAndName

type UserIdAndName struct {
	ProjectId int64  `json:"projectId"`
	UserId    int64  `json:"userId"`
	UserName  string `json:"userName"`
}

type UserIdsGroupByProjectId

type UserIdsGroupByProjectId struct {
	ProjectIds int64  `gorm:"-" json:"projectIds"`
	UserId     string `gorm:"-" json:"userId"`
}

type UserTotal

type UserTotal struct {
	Count        int64 `json:"count"`
	CreateUserId int64 `json:"createUserId"`
}

type UserUpdateTime

type UserUpdateTime struct {
	UpdatedAt *time.Time `json:"updatedAt"`
	CreatedBy int64      `json:"createdBy"`
}

Jump to

Keyboard shortcuts

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