Documentation ¶
Index ¶
- Variables
- func BatchDeleteIterationApi(ias []*IterationApis) error
- func BatchInsertIterationApi(ias []*IterationApis) error
- func BatchUpdateByProjectID(ProjectID uint, c map[string]any) error
- func CollectionExport(project *Projects, collection *Collections) *spec.Spec
- func CollectionToTagIds(collectionID uint) []uint
- func CollectionsExport(projectID uint) []*spec.CollectItem
- func DBConnStatus() (status uint, err error)
- func DefinitionIdToName(content string, idToNameMap IdToNameMap) string
- func DefinitionParametersExport(projectID uint) spec.Schemas
- func DefinitionParametersImport(projectID uint, parameters spec.Schemas) virtualIDToIDMap
- func DefinitionResponsesExport(projectID uint) spec.HTTPResponseDefines
- func DefinitionResponsesImport(projectID uint, responses spec.HTTPResponseDefines) virtualIDToIDMap
- func DefinitionSchemasExport(projectID uint) spec.Schemas
- func DefinitionSchemasImport(projectID uint, schemas spec.Schemas, uid uint) virtualIDToIDMap
- func DefinitionsResponseDelRef(dr *DefinitionResponses, uid uint) error
- func DefinitionsResponseUnRef(dr *DefinitionResponses, uid uint) error
- func DefinitionsSchemaUnRefByCollections(d *DefinitionSchemas, isUnRef int, uid uint) error
- func DefinitionsSchemaUnRefByDefinitionsResponse(d *DefinitionSchemas, isUnRef int) error
- func DefinitionsSchemaUnRefByDefinitionsSchema(d *DefinitionSchemas, isUnRef int, uid uint) error
- func DeleteAllMembersByProjectID(projectID uint) error
- func DeleteIterationApisByCollectionID(cIDs ...uint) error
- func Deletes(id uint, db *gorm.DB, deletedBy uint) error
- func GetProjectGroupCountByName(userID uint, name string) (int64, error)
- func GetProjectGroupCountExcludeTheID(userID uint, name string, id uint) (int64, error)
- func GetProjectGroupDisplayOrder(userID uint) (int, error)
- func GlobalParametersExport(projectID uint) spec.HTTPParameters
- func GlobalParametersImport(projectID uint, parameters *spec.HTTPParameters) map[int64]uint
- func Init()
- func IterationApiCount(IterationID uint, cType string) (int64, error)
- func IterationsCount(pIDs ...uint) (int64, error)
- func ReplaceGlobalParametersVirtualIDToID(content string, virtualIDToIDMap virtualIDToIDMap) string
- func ServersExport(projectID uint) []*spec.Server
- func ServersImport(projectID uint, servers []*spec.Server)
- func TagsExport(collectionID uint) []string
- func TagsImport(projectID uint, collectionID uint, tags []string)
- type CollectionHistories
- type Collections
- func (c *Collections) Create() error
- func (c *Collections) CreateCategory() error
- func (c *Collections) CreateDoc() error
- func (c *Collections) Creator() string
- func (c *Collections) Deleter() string
- func (c *Collections) GetByPublicId() error
- func (c *Collections) GetSubCollectionsContainsSelf() ([]*Collections, error)
- func (c *Collections) GetUnscopedCollections() error
- func (c *Collections) List() ([]*Collections, error)
- func (c *Collections) Restore() error
- func (c *Collections) TrashList() ([]*Collections, error)
- func (c *Collections) Update() error
- func (c *Collections) UpdateContent(must bool, title string, content string, updatedBy uint) error
- func (c *Collections) Updater() string
- type DefinitionParameters
- type DefinitionResponses
- func (dr *DefinitionResponses) Create() error
- func (dr *DefinitionResponses) Delete() error
- func (dr *DefinitionResponses) GetCountByName() (int64, error)
- func (dr *DefinitionResponses) GetCountExcludeTheID() (int64, error)
- func (dr *DefinitionResponses) List() ([]*DefinitionResponses, error)
- func (dr *DefinitionResponses) Update() error
- type DefinitionSchemaHistories
- type DefinitionSchemas
- func (d *DefinitionSchemas) Create() error
- func (d *DefinitionSchemas) Creator() string
- func (d *DefinitionSchemas) Delete() error
- func (d *DefinitionSchemas) Deleter() string
- func (d *DefinitionSchemas) Get() error
- func (d *DefinitionSchemas) List() ([]DefinitionSchemas, error)
- func (d *DefinitionSchemas) Save() error
- func (d *DefinitionSchemas) UpdateContent(must bool, name, desc, schema string, updatedBy uint) error
- func (d *DefinitionSchemas) Updater() string
- type GlobalParameters
- func (gp *GlobalParameters) Create() error
- func (gp *GlobalParameters) Delete() error
- func (gp *GlobalParameters) GetCountByName() (int64, error)
- func (gp *GlobalParameters) GetCountExcludeTheID() (int64, error)
- func (gp *GlobalParameters) List() ([]*GlobalParameters, error)
- func (gp *GlobalParameters) Update() error
- type IdToNameMap
- type IterationApis
- type Iterations
- func (i *Iterations) Create() error
- func (i *Iterations) Creator() string
- func (i *Iterations) Delete() error
- func (i *Iterations) Deleter() string
- func (i *Iterations) List(page, pageSize int, pIDs ...uint) ([]*Iterations, error)
- func (i *Iterations) PlanningIterationApi(cIDs []uint) error
- func (i *Iterations) Update() error
- func (i *Iterations) Updater() string
- type ProjectGroups
- type ProjectMembers
- func (pm *ProjectMembers) Count() (int64, error)
- func (pm *ProjectMembers) Create() error
- func (pm *ProjectMembers) Delete() error
- func (pm *ProjectMembers) GetByUserIDAndProjectID() error
- func (pm *ProjectMembers) List(page, pageSize int) ([]ProjectMembers, error)
- func (pm *ProjectMembers) MemberHasWritePermission() bool
- func (pm *ProjectMembers) MemberIsManage() bool
- func (pm *ProjectMembers) Update() error
- type Projects
- type RefContentVirtualIDToId
- type Servers
- type ShareTmpTokens
- func (stt *ShareTmpTokens) Create() error
- func (stt *ShareTmpTokens) Delete() error
- func (stt *ShareTmpTokens) DeleteByCollectionID() error
- func (stt *ShareTmpTokens) DeleteByProjectID() error
- func (stt *ShareTmpTokens) DeleteByProjectIDAndCollectionID() error
- func (stt *ShareTmpTokens) GetByShareToken() error
- type TagToCollections
- type Tags
- type Users
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProjectMembersManage = "manage" ProjectMembersWrite = "write" ProjectMembersRead = "read" )
View Source
var ( // Conn 是一个指向数据库连接的指针 Conn *gorm.DB )
Functions ¶
func BatchDeleteIterationApi ¶
func BatchDeleteIterationApi(ias []*IterationApis) error
func BatchInsertIterationApi ¶
func BatchInsertIterationApi(ias []*IterationApis) error
func CollectionExport ¶
func CollectionExport(project *Projects, collection *Collections) *spec.Spec
CollectionExport 返回单篇文档导出的 apicat 结构 project 导出集合所属项目 model collection 导出的集合 model
func CollectionToTagIds ¶
func CollectionsExport ¶
func CollectionsExport(projectID uint) []*spec.CollectItem
func DBConnStatus ¶
DBConnStatus status 返回数据库连接状态,1-成功,2-失败,3-数据库不存在 err 连接遇到错误时返回错误信息
func DefinitionIdToName ¶
func DefinitionIdToName(content string, idToNameMap IdToNameMap) string
func DefinitionResponsesExport ¶
func DefinitionResponsesExport(projectID uint) spec.HTTPResponseDefines
func DefinitionResponsesImport ¶
func DefinitionResponsesImport(projectID uint, responses spec.HTTPResponseDefines) virtualIDToIDMap
func DefinitionSchemasExport ¶
func DefinitionSchemasImport ¶
func DefinitionsResponseDelRef ¶
func DefinitionsResponseDelRef(dr *DefinitionResponses, uid uint) error
func DefinitionsResponseUnRef ¶
func DefinitionsResponseUnRef(dr *DefinitionResponses, uid uint) error
func DefinitionsSchemaUnRefByCollections ¶
func DefinitionsSchemaUnRefByCollections(d *DefinitionSchemas, isUnRef int, uid uint) error
func DefinitionsSchemaUnRefByDefinitionsResponse ¶
func DefinitionsSchemaUnRefByDefinitionsResponse(d *DefinitionSchemas, isUnRef int) error
func DefinitionsSchemaUnRefByDefinitionsSchema ¶
func DefinitionsSchemaUnRefByDefinitionsSchema(d *DefinitionSchemas, isUnRef int, uid uint) error
func GlobalParametersExport ¶
func GlobalParametersExport(projectID uint) spec.HTTPParameters
func GlobalParametersImport ¶
func GlobalParametersImport(projectID uint, parameters *spec.HTTPParameters) map[int64]uint
func IterationsCount ¶
func ServersExport ¶
func ServersImport ¶
func TagsExport ¶
func TagsImport ¶
Types ¶
type CollectionHistories ¶
type CollectionHistories struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` CollectionId uint `gorm:"type:bigint;index;not null;comment:集合id"` Title string `gorm:"type:varchar(255);not null;comment:名称"` Type string `gorm:"type:varchar(255);not null;comment:类型:category,doc,http"` Content string `gorm:"type:mediumtext;comment:内容"` CreatedAt time.Time CreatedBy uint `gorm:"type:bigint;not null;default:0;comment:创建人id"` }
func NewCollectionHistories ¶
func NewCollectionHistories(ids ...uint) (*CollectionHistories, error)
func (*CollectionHistories) Create ¶
func (ch *CollectionHistories) Create() error
func (*CollectionHistories) List ¶
func (ch *CollectionHistories) List(collectionIDs ...uint) ([]*CollectionHistories, error)
func (*CollectionHistories) Restore ¶
func (ch *CollectionHistories) Restore(collection *Collections, uid uint) error
type Collections ¶
type Collections struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` PublicId string `gorm:"type:varchar(255);comment:集合公开id"` ProjectId uint `gorm:"type:bigint;index;not null;comment:项目id"` ParentId uint `gorm:"type:bigint;not null;comment:父级id"` Title string `gorm:"type:varchar(255);not null;comment:名称"` Type string `gorm:"type:varchar(255);not null;comment:类型:category,doc,http"` Content string `gorm:"type:mediumtext;comment:内容"` DisplayOrder int `gorm:"type:int(11);not null;default:0;comment:显示顺序"` CreatedAt time.Time CreatedBy uint `gorm:"type:bigint;not null;default:0;comment:创建人id"` UpdatedAt time.Time UpdatedBy uint `gorm:"type:bigint;not null;default:0;comment:最后更新人id"` DeletedAt gorm.DeletedAt DeletedBy uint `gorm:"type:bigint;not null;default:0;comment:删除人id"` }
func CollectionsImport ¶
func CollectionsImport(projectID, parentID uint, collections []*spec.CollectItem, refContentNameToId *RefContentVirtualIDToId) []*Collections
func NewCollections ¶
func NewCollections(ids ...uint) (*Collections, error)
func (*Collections) Create ¶
func (c *Collections) Create() error
func (*Collections) CreateCategory ¶
func (c *Collections) CreateCategory() error
func (*Collections) CreateDoc ¶
func (c *Collections) CreateDoc() error
func (*Collections) Creator ¶
func (c *Collections) Creator() string
func (*Collections) Deleter ¶
func (c *Collections) Deleter() string
func (*Collections) GetByPublicId ¶
func (c *Collections) GetByPublicId() error
func (*Collections) GetSubCollectionsContainsSelf ¶
func (c *Collections) GetSubCollectionsContainsSelf() ([]*Collections, error)
func (*Collections) GetUnscopedCollections ¶
func (c *Collections) GetUnscopedCollections() error
func (*Collections) List ¶
func (c *Collections) List() ([]*Collections, error)
func (*Collections) Restore ¶
func (c *Collections) Restore() error
func (*Collections) TrashList ¶
func (c *Collections) TrashList() ([]*Collections, error)
func (*Collections) Update ¶
func (c *Collections) Update() error
func (*Collections) UpdateContent ¶
func (*Collections) Updater ¶
func (c *Collections) Updater() string
type DefinitionParameters ¶
type DefinitionParameters struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` ProjectID uint `gorm:"type:bigint;index;not null;comment:项目id"` Name string `gorm:"type:varchar(255);not null;comment:参数名称"` Required int `gorm:"type:tinyint(1);not null;comment:是否必传:0-否,1-是"` Schema string `gorm:"type:mediumtext;comment:参数内容"` CreatedAt time.Time UpdatedAt time.Time }
func NewDefinitionParameters ¶
func NewDefinitionParameters(ids ...uint) (*DefinitionParameters, error)
func (*DefinitionParameters) Create ¶
func (dp *DefinitionParameters) Create() error
func (*DefinitionParameters) Delete ¶
func (dp *DefinitionParameters) Delete() error
func (*DefinitionParameters) List ¶
func (dp *DefinitionParameters) List() ([]*DefinitionParameters, error)
func (*DefinitionParameters) Save ¶
func (dp *DefinitionParameters) Save() error
type DefinitionResponses ¶
type DefinitionResponses struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` ProjectID uint `gorm:"type:bigint;index;not null;comment:项目id"` Name string `gorm:"type:varchar(255);not null;comment:响应名称"` Description string `gorm:"type:varchar(255);not null;comment:状态描述"` Type string `gorm:"type:varchar(255);not null;comment:响应类型:category,response"` Header string `gorm:"type:mediumtext;comment:响应头"` Content string `gorm:"type:mediumtext;comment:响应内容"` DisplayOrder int `gorm:"type:int(11);not null;default:0;comment:显示顺序"` CreatedAt time.Time UpdatedAt time.Time }
func NewDefinitionResponses ¶
func NewDefinitionResponses(ids ...uint) (*DefinitionResponses, error)
func (*DefinitionResponses) Create ¶
func (dr *DefinitionResponses) Create() error
func (*DefinitionResponses) Delete ¶
func (dr *DefinitionResponses) Delete() error
func (*DefinitionResponses) GetCountByName ¶
func (dr *DefinitionResponses) GetCountByName() (int64, error)
func (*DefinitionResponses) GetCountExcludeTheID ¶
func (dr *DefinitionResponses) GetCountExcludeTheID() (int64, error)
func (*DefinitionResponses) List ¶
func (dr *DefinitionResponses) List() ([]*DefinitionResponses, error)
func (*DefinitionResponses) Update ¶
func (dr *DefinitionResponses) Update() error
type DefinitionSchemaHistories ¶
type DefinitionSchemaHistories struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` SchemaID uint `gorm:"type:bigint;index;not null;comment:模型id"` Name string `gorm:"type:varchar(255);not null;comment:名称"` Description string `gorm:"type:varchar(255);comment:描述"` Type string `gorm:"type:varchar(255);not null;comment:类型:category,schema"` Schema string `gorm:"type:mediumtext;comment:内容"` CreatedAt time.Time CreatedBy uint `gorm:"type:bigint;not null;default:0;comment:创建人id"` }
func NewDefinitionSchemaHistories ¶
func NewDefinitionSchemaHistories(ids ...uint) (*DefinitionSchemaHistories, error)
func (*DefinitionSchemaHistories) Create ¶
func (dsh *DefinitionSchemaHistories) Create() error
func (*DefinitionSchemaHistories) List ¶
func (dsh *DefinitionSchemaHistories) List(schemsIDs ...uint) ([]*DefinitionSchemaHistories, error)
func (*DefinitionSchemaHistories) Restore ¶
func (dsh *DefinitionSchemaHistories) Restore(ds *DefinitionSchemas, uid uint) error
type DefinitionSchemas ¶
type DefinitionSchemas struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` ProjectId uint `gorm:"type:bigint;index;not null;comment:项目id"` ParentId uint `gorm:"type:bigint;not null;comment:父级id"` Name string `gorm:"type:varchar(255);not null;comment:名称"` Description string `gorm:"type:varchar(255);comment:描述"` Type string `gorm:"type:varchar(255);not null;comment:类型:category,schema"` Schema string `gorm:"type:mediumtext;comment:内容"` DisplayOrder int `gorm:"type:int(11);not null;default:0;comment:显示顺序"` CreatedAt time.Time CreatedBy uint `gorm:"type:bigint;not null;default:0;comment:创建人id"` UpdatedAt time.Time UpdatedBy uint `gorm:"type:bigint;not null;default:0;comment:最后更新人id"` DeletedAt *gorm.DeletedAt DeletedBy uint `gorm:"type:bigint;not null;default:0;comment:删除人id"` }
func NewDefinitionSchemas ¶
func NewDefinitionSchemas(ids ...uint) (*DefinitionSchemas, error)
func (*DefinitionSchemas) Create ¶
func (d *DefinitionSchemas) Create() error
func (*DefinitionSchemas) Creator ¶
func (d *DefinitionSchemas) Creator() string
func (*DefinitionSchemas) Delete ¶
func (d *DefinitionSchemas) Delete() error
func (*DefinitionSchemas) Deleter ¶
func (d *DefinitionSchemas) Deleter() string
func (*DefinitionSchemas) Get ¶
func (d *DefinitionSchemas) Get() error
func (*DefinitionSchemas) List ¶
func (d *DefinitionSchemas) List() ([]DefinitionSchemas, error)
func (*DefinitionSchemas) Save ¶
func (d *DefinitionSchemas) Save() error
func (*DefinitionSchemas) UpdateContent ¶
func (d *DefinitionSchemas) UpdateContent(must bool, name, desc, schema string, updatedBy uint) error
func (*DefinitionSchemas) Updater ¶
func (d *DefinitionSchemas) Updater() string
type GlobalParameters ¶
type GlobalParameters struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` ProjectID uint `gorm:"type:bigint;index;not null;comment:项目id"` In string `gorm:"type:varchar(255);not null;comment:位置:header,cookie,query,path"` Name string `gorm:"type:varchar(255);not null;comment:参数名称"` Required int `gorm:"type:tinyint(1);not null;comment:是否必传:0-否,1-是"` Schema string `gorm:"type:mediumtext;comment:参数内容"` CreatedAt time.Time UpdatedAt time.Time }
func NewGlobalParameters ¶
func NewGlobalParameters(ids ...uint) (*GlobalParameters, error)
func (*GlobalParameters) Create ¶
func (gp *GlobalParameters) Create() error
func (*GlobalParameters) Delete ¶
func (gp *GlobalParameters) Delete() error
func (*GlobalParameters) GetCountByName ¶
func (gp *GlobalParameters) GetCountByName() (int64, error)
func (*GlobalParameters) GetCountExcludeTheID ¶
func (gp *GlobalParameters) GetCountExcludeTheID() (int64, error)
func (*GlobalParameters) List ¶
func (gp *GlobalParameters) List() ([]*GlobalParameters, error)
func (*GlobalParameters) Update ¶
func (gp *GlobalParameters) Update() error
type IdToNameMap ¶
type IterationApis ¶
type IterationApis struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` IterationID uint `gorm:"type:bigint;index;not null;comment:迭代id"` CollectionID uint `gorm:"type:bigint;not null;comment:集合id"` CollectionType string `gorm:"type:varchar(255);not null;comment:集合类型:category,doc,http"` CreatedAt time.Time UpdatedAt time.Time }
func NewIterationApis ¶
func NewIterationApis(ids ...uint) (*IterationApis, error)
func (*IterationApis) Create ¶
func (ia *IterationApis) Create() error
func (*IterationApis) Delete ¶
func (ia *IterationApis) Delete() error
func (*IterationApis) GetCollectionIDByIterationID ¶
func (ia *IterationApis) GetCollectionIDByIterationID(iID uint) ([]uint, error)
func (*IterationApis) List ¶
func (ia *IterationApis) List(iID ...uint) ([]*IterationApis, error)
type Iterations ¶
type Iterations struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` PublicID string `gorm:"type:varchar(255);index;not null;comment:迭代公开id"` ProjectID uint `gorm:"type:bigint;not null;comment:项目id"` Title string `gorm:"type:varchar(255);not null;comment:迭代标题"` Description string `gorm:"type:varchar(255);comment:迭代描述"` CreatedAt time.Time CreatedBy uint `gorm:"type:bigint;not null;default:0;comment:创建人id"` UpdatedAt time.Time UpdatedBy uint `gorm:"type:bigint;not null;default:0;comment:最后更新人id"` DeletedAt gorm.DeletedAt DeletedBy uint `gorm:"type:bigint;not null;default:0;comment:删除人id"` }
func NewIterations ¶
func NewIterations(ids ...any) (*Iterations, error)
func (*Iterations) Create ¶
func (i *Iterations) Create() error
func (*Iterations) Creator ¶
func (i *Iterations) Creator() string
func (*Iterations) Delete ¶
func (i *Iterations) Delete() error
func (*Iterations) Deleter ¶
func (i *Iterations) Deleter() string
func (*Iterations) List ¶
func (i *Iterations) List(page, pageSize int, pIDs ...uint) ([]*Iterations, error)
func (*Iterations) PlanningIterationApi ¶
func (i *Iterations) PlanningIterationApi(cIDs []uint) error
func (*Iterations) Update ¶
func (i *Iterations) Update() error
func (*Iterations) Updater ¶
func (i *Iterations) Updater() string
type ProjectGroups ¶
type ProjectGroups struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` UserID uint `gorm:"type:bigint;index;not null;comment:用户id"` Name string `gorm:"type:varchar(255);not null;comment:分组名称"` DisplayOrder int `gorm:"type:int(11);not null;default:0;comment:显示顺序"` CreatedAt time.Time UpdatedAt time.Time }
func NewProjectGroups ¶
func NewProjectGroups(ids ...uint) (*ProjectGroups, error)
func (*ProjectGroups) Create ¶
func (pg *ProjectGroups) Create() error
func (*ProjectGroups) Delete ¶
func (pg *ProjectGroups) Delete() error
func (*ProjectGroups) List ¶
func (pg *ProjectGroups) List() ([]ProjectGroups, error)
func (*ProjectGroups) Update ¶
func (pg *ProjectGroups) Update() error
type ProjectMembers ¶
type ProjectMembers struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` ProjectID uint `gorm:"type:bigint;index;not null;comment:项目id"` UserID uint `gorm:"type:bigint;index;not null;comment:用户id"` GroupID uint `gorm:"type:bigint;not null;default:0;comment:分组id"` Authority string `gorm:"type:varchar(255);not null;comment:项目权限:manage,write,read"` FollowedAt *time.Time CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt }
func GetProjectFollowedByUser ¶
func GetProjectFollowedByUser(UserID uint) ([]ProjectMembers, error)
func GetProjectGroupedByUser ¶
func GetProjectGroupedByUser(UserID, GroupID uint) ([]ProjectMembers, error)
func GetUserInvolvedProject ¶
func GetUserInvolvedProject(UserID uint, PMAuthorities ...string) ([]ProjectMembers, error)
func NewProjectMembers ¶
func NewProjectMembers(ids ...uint) (*ProjectMembers, error)
func (*ProjectMembers) Count ¶
func (pm *ProjectMembers) Count() (int64, error)
func (*ProjectMembers) Create ¶
func (pm *ProjectMembers) Create() error
func (*ProjectMembers) Delete ¶
func (pm *ProjectMembers) Delete() error
func (*ProjectMembers) GetByUserIDAndProjectID ¶
func (pm *ProjectMembers) GetByUserIDAndProjectID() error
func (*ProjectMembers) List ¶
func (pm *ProjectMembers) List(page, pageSize int) ([]ProjectMembers, error)
func (*ProjectMembers) MemberHasWritePermission ¶
func (pm *ProjectMembers) MemberHasWritePermission() bool
func (*ProjectMembers) MemberIsManage ¶
func (pm *ProjectMembers) MemberIsManage() bool
func (*ProjectMembers) Update ¶
func (pm *ProjectMembers) Update() error
type Projects ¶
type Projects struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` PublicId string `gorm:"type:varchar(255);uniqueIndex;not null;comment:项目公开id"` Title string `gorm:"type:varchar(255);not null;comment:项目名称"` Visibility int `gorm:"type:tinyint(1);not null;comment:项目可见性:0私有,1公开"` Description string `gorm:"type:varchar(255);comment:项目描述"` Cover string `gorm:"type:varchar(255);comment:项目封面"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt }
func NewProjects ¶
type RefContentVirtualIDToId ¶
type RefContentVirtualIDToId struct { DefinitionSchemas virtualIDToIDMap DefinitionResponses virtualIDToIDMap DefinitionParameters virtualIDToIDMap GolbalParameters virtualIDToIDMap }
type Servers ¶
type Servers struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` ProjectId uint `gorm:"type:bigint;index;not null;comment:项目id"` Description string `gorm:"type:varchar(255);not null;comment:描述"` Url string `gorm:"type:varchar(255);not null;comment:服务器地址"` DisplayOrder int `gorm:"type:int(11);not null;default:0;comment:显示顺序"` CreatedAt time.Time UpdatedAt time.Time }
func NewServers ¶
func NewServers() *Servers
func (*Servers) DeleteAndCreateServers ¶
type ShareTmpTokens ¶
type ShareTmpTokens struct {}
func NewShareTmpTokens ¶
func NewShareTmpTokens() *ShareTmpTokens
func (*ShareTmpTokens) Create ¶
func (stt *ShareTmpTokens) Create() error
func (*ShareTmpTokens) Delete ¶
func (stt *ShareTmpTokens) Delete() error
func (*ShareTmpTokens) DeleteByCollectionID ¶
func (stt *ShareTmpTokens) DeleteByCollectionID() error
func (*ShareTmpTokens) DeleteByProjectID ¶
func (stt *ShareTmpTokens) DeleteByProjectID() error
func (*ShareTmpTokens) DeleteByProjectIDAndCollectionID ¶
func (stt *ShareTmpTokens) DeleteByProjectIDAndCollectionID() error
func (*ShareTmpTokens) GetByShareToken ¶
func (stt *ShareTmpTokens) GetByShareToken() error
type TagToCollections ¶
type TagToCollections struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` TagId uint `gorm:"type:bigint;index;not null;comment:标签id"` CollectionId uint `gorm:"type:bigint;not null;comment:集合id"` DisplayOrder int `gorm:"type:int(11);not null;default:0;comment:显示顺序"` CreatedAt time.Time UpdatedAt time.Time }
func NewTagToCollections ¶
func NewTagToCollections() *TagToCollections
func (*TagToCollections) Create ¶
func (ttc *TagToCollections) Create() error
type Tags ¶
type Tags struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` ProjectId uint `gorm:"type:bigint;index;not null;comment:项目id"` Name string `gorm:"type:varchar(255);not null;comment:名称"` DisplayOrder int `gorm:"type:int(11);not null;default:0;comment:显示顺序"` CreatedAt time.Time UpdatedAt time.Time }
type Users ¶
type Users struct { ID uint `gorm:"type:bigint;primaryKey;autoIncrement"` Email string `gorm:"type:varchar(255);index;not null;comment:邮箱"` Username string `gorm:"type:varchar(255);not null;comment:用户名"` Password string `gorm:"type:varchar(255);not null;comment:密码"` Role string `gorm:"type:varchar(255);not null;comment:角色:superadmin,admin,user"` IsEnabled int `gorm:"type:tinyint(1);not null;default:1;comment:是否启用:0停用,1启用"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt }
func UserListByIDs ¶
func (*Users) GetByEmail ¶
Source Files ¶
- collection_histories.go
- collections.go
- common_type.go
- db.go
- definition_parameters.go
- definition_responses.go
- definition_schema_histories.go
- definition_schemas.go
- global_parameters.go
- iteration_apis.go
- iterations.go
- project_groups.go
- project_members.go
- projects.go
- servers.go
- share_tmp_tokens.go
- tag_to_collections.go
- tags.go
- users.go
Click to show internal directories.
Click to hide internal directories.