Documentation
¶
Index ¶
- Constants
- func Fail(c *gin.Context)
- func FailWithDetailed(c *gin.Context, message string, data interface{})
- func FailWithMessage(c *gin.Context, message string)
- func Ok(c *gin.Context)
- func OkWithData(c *gin.Context, data interface{})
- func OkWithDetailed(c *gin.Context, message string, data interface{})
- func OkWithMessage(c *gin.Context, message string)
- func Result(c *gin.Context, code int, msg string, data interface{})
- type ApiTree
- type ArticleArchivesDTO
- type ArticleConditionDTO
- type ArticleDTO
- type ArticleDetails
- type ArticlePaginationDTO
- type ArticleRecommendDTO
- type AutoCodeHistory
- type Captcha
- type Category
- type Column
- type CommentDTO
- type Db
- type Login
- type LoginHistory
- type MenuTree
- type OauthLoginUrl
- type PageInfo
- type PageResult
- type ReplyDTO
- type Response
- type RoleInfo
- type Table
- type TagDTO
- type UserDetail
- type UserInfo
- type UserMenu
Constants ¶
View Source
const ( ERROR = 504 SUCCESS = 200 )
Variables ¶
This section is empty.
Functions ¶
func FailWithDetailed ¶
func FailWithMessage ¶
func OkWithData ¶
func OkWithDetailed ¶
func OkWithMessage ¶
Types ¶
type ArticleArchivesDTO ¶
type ArticleArchivesDTO struct {
ID int `json:"id"` // 文章ID
ArticleCover string `json:"article_cover"` // 文章缩略图
ArticleTitle string `json:"article_title"` // 标题
CreatedAt time.Time `json:"created_at"` // 创建时间
}
ArticleArchivesDTO represents a recommended article
type ArticleConditionDTO ¶
type ArticleConditionDTO struct {
ArticleDTOList []*ArticleDTO `json:"article_dto_list"` // 文章列表
ConditionName string `json:"condition_name"` // 条件名
}
type ArticleDTO ¶
type ArticleDTO struct {
ID int `json:"id"` // 文章ID
ArticleCover string `json:"article_cover"` // 文章缩略图
ArticleTitle string `json:"article_title"` // 标题
ArticleContent string `json:"article_content"` // 内容
LikeCount int `json:"like_count"` // 点赞量
ViewsCount int `json:"views_count"` // 浏览量
Type int `json:"type"` // 文章类型
OriginalURL string `json:"original_url"` // 原文链接
CreatedAt time.Time `json:"created_at"` // 发表时间
UpdatedAt time.Time `json:"updated_at"` // 更新时间
CategoryID int `json:"category_id"` // 文章分类ID
CategoryName string `json:"category_name"` // 文章分类名
ArticleTagList []*TagDTO `json:"article_tag_list"` // 文章标签列表
}
type ArticleDetails ¶
type ArticleDetails struct {
ID int `json:"id"` // 文章ID
ArticleCover string `json:"article_cover"` // 文章缩略图
ArticleTitle string `json:"article_title"` // 标题
ArticleContent string `json:"article_content"` // 内容
LikeCount int `json:"like_count"` // 点赞量
ViewsCount int `json:"views_count"` // 浏览量
Type int `json:"type"` // 文章类型
OriginalURL string `json:"original_url"` // 原文链接
CreatedAt time.Time `json:"created_at"` // 发表时间
UpdatedAt time.Time `json:"updated_at"` // 更新时间
CategoryID int `json:"category_id"` // 文章分类ID
CategoryName string `json:"category_name"` // 文章分类名
ArticleTagList []*TagDTO `json:"article_tag_list"` // 文章标签列表
LastArticle *ArticlePaginationDTO `json:"last_article"` // 上一篇文章
NextArticle *ArticlePaginationDTO `json:"next_article"` // 下一篇文章
RecommendArticleList []*ArticleRecommendDTO `json:"recommend_article_list"` // 推荐文章列表
NewestArticleList []*ArticleRecommendDTO `json:"newest_article_list"` // 最新文章列表
}
ArticleDetails represents an article
type ArticlePaginationDTO ¶
type ArticlePaginationDTO struct {
// pagination fields...
ID int `json:"id"` // 文章ID
ArticleCover string `json:"article_cover"` // 文章缩略图
ArticleTitle string `json:"article_title"` // 标题
}
ArticlePaginationDTO represents pagination information for an article
type ArticleRecommendDTO ¶
type ArticleRecommendDTO struct {
// recommended article fields...
ID int `json:"id"` // 文章ID
ArticleCover string `json:"article_cover"` // 文章缩略图
ArticleTitle string `json:"article_title"` // 标题
CreatedAt time.Time `json:"created_at"` // 创建时间
}
ArticleRecommendDTO represents a recommended article
type AutoCodeHistory ¶
type AutoCodeHistory struct {
ID uint `json:"ID" gorm:"column:id"`
CreatedAt time.Time `json:"CreatedAt" gorm:"column:created_at"`
UpdatedAt time.Time `json:"UpdatedAt" gorm:"column:updated_at"`
BusinessDB string `json:"businessDB" gorm:"column:business_db"`
TableName string `json:"tableName" gorm:"column:table_name"`
StructName string `json:"structName" gorm:"column:struct_name"`
StructCNName string `json:"structCNName" gorm:"column:struct_cn_name"`
Flag int `json:"flag" gorm:"column:flag"`
}
type Column ¶
type Column struct {
ColumnName string `json:"columnName" gorm:"column:column_name"` //列名
ColumnType string `json:"columnType" gorm:"column:column_type"` //字段类型 varchar(11)
ColumnDefault string `json:"columnDefault" gorm:"column:column_default"` //默认值
ColumnComment string `json:"columnComment" gorm:"column:column_comment"` //备注
DataType string `json:"dataType" gorm:"column:data_type"` //数据类型 varchar
DataTypeLong string `json:"dataTypeLong" gorm:"column:data_type_long"` //数据长度
IsNullable string `json:"isNullable" gorm:"column:is_nullable"` //是否可空
}
type CommentDTO ¶
type CommentDTO struct {
ID int `json:"id"` // 评论id
UserID int `json:"userId"` // 用户id
Nickname string `json:"nickname"` // 用户昵称
Avatar string `json:"avatar"` // 用户头像
WebSite string `json:"webSite"` // 个人网站
CommentContent string `json:"commentContent"` // 评论内容
LikeCount int `json:"likeCount"` // 点赞数
CreatedAt time.Time `json:"createdAt"` // 评论时间
ReplyCount int64 `json:"replyCount"` // 回复量
ReplyDTOList []*ReplyDTO `json:"replyDTOList"` // 回复列表
}
CommentDTO 评论
type Login ¶
type Login struct {
Token string `json:"token"`
UserInfo UserDetail `json:"userInfo"`
}
type LoginHistory ¶
type OauthLoginUrl ¶
type OauthLoginUrl struct {
Url string `json:"url" example:""` // 授权地址
}
type PageResult ¶
type ReplyDTO ¶
type ReplyDTO struct {
ID int `json:"id"` // 评论id
ParentID int `json:"parentId"` // 父评论id
UserID int `json:"userId"` // 用户id
Nickname string `json:"nickname"` // 用户昵称
Avatar string `json:"avatar"` // 用户头像
WebSite string `json:"webSite"` // 个人网站
ReplyUserID int `json:"replyUserId"` // 被回复用户id
ReplyNickname string `json:"replyNickname"` // 被回复用户昵称
ReplyWebSite string `json:"replyWebSite"` // 被回复个人网站
CommentContent string `json:"commentContent"` // 评论内容
LikeCount int `json:"likeCount"` // 点赞数
CreatedAt time.Time `json:"createdAt"` // 评论时间
}
ReplyDTO 回复
type TagDTO ¶
type TagDTO struct {
// tag fields...
ID int `json:"id"` // 标签ID
TagName string `json:"tag_name"` // 标签名
}
TagDTO represents a tag
type UserDetail ¶
type UserDetail struct {
ID int `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Avatar string `json:"avatar"`
Intro string `json:"intro"`
Email string `json:"email"`
Status int `json:"status"`
LoginType int `json:"login_type"`
IpAddress string `json:"ip_address"`
IpSource string `json:"ip_source"`
CreatedAt string `json:"created_at"`
LastLoginTime string `json:"last_login_time"`
Roles []*entity.Role
}
type UserInfo ¶
type UserInfo struct {
ID int `json:"id"`
UUID string `json:"user_id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Avatar string `json:"avatar"`
Intro string `json:"intro"`
Email string `json:"email"`
LoginType int `json:"loginType"`
IpAddress string `json:"ip_address"`
IpSource string `json:"ip_source"`
LastLoginTime string `json:"last_login_time"`
Roles []*entity.Role
}
Click to show internal directories.
Click to hide internal directories.