Documentation
¶
Overview ¶
Package console defines console controllers.
Package console defines console controllers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarkdownAction ¶
MarkdownAction handles markdown text to HTML.
func RemoveCommentAction ¶
RemoveCommentAction Delete comment
func Routes ¶
func Routes(ret *gin.RouterGroup)
Routes returns a gin engine and binds controllers with request URLs.
Types ¶
type ConsoleArticle ¶
type ConsoleArticle struct {
ID uint64 `json:"id"`
Author *ConsoleAuthor `json:"author"`
CreatedAt string `json:"createdAt"`
Title string `json:"title"`
Tags []*ConsoleTag `json:"tags"`
URL string `json:"url"`
Topped bool `json:"topped"`
ViewCount int `json:"viewCount"`
CommentCount int `json:"commentCount"`
}
ConsoleArticle represents console article.
type ConsoleAuthor ¶
type ConsoleAuthor struct {
URL string `json:"url"`
Name string `json:"name"`
AvatarURL string `json:"avatarURL"`
}
ConsoleAuthor represents console author.
func (*ConsoleAuthor) AvatarURLWithSize ¶
func (u *ConsoleAuthor) AvatarURLWithSize(size int) string
AvatarURLWithSize returns avatar URL with the specified size.
type ConsoleCategory ¶
type ConsoleCategory struct {
ID uint64 `json:"id"`
Title string `json:"title"`
URL string `json:"url"`
Description string `json:"description"`
Number int `json:"number"`
Tags string `json:"tags"`
}
ConsoleCategory represents console category.
type ConsoleComment ¶
type ConsoleComment struct {
ID uint64 `json:"id"`
Author *ConsoleAuthor `json:"author"`
ArticleAuthor *ConsoleAuthor `json:"articleAuthor"`
CreatedAt string `json:"createdAt"`
Title string `json:"title"`
Content template.HTML `json:"content"`
URL string `json:"url"`
}
ConsoleComment represents console comment.
type ConsoleNavigation ¶
type ConsoleNavigation struct {
}
ConsoleNavigation represents console navigation.
type ConsoleTag ¶
type ConsoleTag struct {
ID uint64 `json:"id"`
Title string `json:"title"`
URL string `json:"url,omitempty"`
}
ConsoleTag represents console tag.
type ConsoleTheme ¶
ConsoleTheme represents console theme.
Click to show internal directories.
Click to hide internal directories.