Documentation ¶
Overview ¶
Package console defines console controllers.
Package console defines console controllers.
Index ¶
- func AddArticleAction(c *gin.Context)
- func AddCategoryAction(c *gin.Context)
- func AddNavigationAction(c *gin.Context)
- func AddUserAction(c *gin.Context)
- func BlogSwitchAction(c *gin.Context)
- func CheckVersionAction(c *gin.Context)
- func ExportMarkdownAction(c *gin.Context)
- func GenArticlesAction(c *gin.Context)
- func GetAccountAction(c *gin.Context)
- func GetArticleAction(c *gin.Context)
- func GetArticleThumbsAction(c *gin.Context)
- func GetArticlesAction(c *gin.Context)
- func GetBasicSettingsAction(c *gin.Context)
- func GetCategoriesAction(c *gin.Context)
- func GetCategoryAction(c *gin.Context)
- func GetCommentsAction(c *gin.Context)
- func GetFeedSettingsAction(c *gin.Context)
- func GetI18nSettingsAction(c *gin.Context)
- func GetNavigationAction(c *gin.Context)
- func GetNavigationsAction(c *gin.Context)
- func GetPreferenceSettingsAction(c *gin.Context)
- func GetSignSettingsAction(c *gin.Context)
- func GetTagsAction(c *gin.Context)
- func GetThemesAction(c *gin.Context)
- func GetThirdStatisticSettingsAction(c *gin.Context)
- func GetUsersAction(c *gin.Context)
- func ImportMarkdownAction(c *gin.Context)
- func LoginCheck(c *gin.Context)
- func MarkdownAction(c *gin.Context)
- func RemoveArticleAction(c *gin.Context)
- func RemoveArticlesAction(c *gin.Context)
- func RemoveCategoryAction(c *gin.Context)
- func RemoveCommentAction(c *gin.Context)
- func RemoveCommentsAction(c *gin.Context)
- func RemoveNavigationAction(c *gin.Context)
- func ShowAdminPagesAction(c *gin.Context)
- func UpdateAccountAction(c *gin.Context)
- func UpdateArticleAction(c *gin.Context)
- func UpdateBasicSettingsAction(c *gin.Context)
- func UpdateCategoryAction(c *gin.Context)
- func UpdateFeedSettingsAction(c *gin.Context)
- func UpdateI18nSettingsAction(c *gin.Context)
- func UpdateNavigationAction(c *gin.Context)
- func UpdatePasswordAction(c *gin.Context)
- func UpdatePreferenceSettingsAction(c *gin.Context)
- func UpdateSignSettingsAction(c *gin.Context)
- func UpdateThemeAction(c *gin.Context)
- func UpdateThirdStatisticSettingsAction(c *gin.Context)
- type ConsoleArticle
- type ConsoleAuthor
- type ConsoleCategory
- type ConsoleComment
- type ConsoleNavigation
- type ConsoleTag
- type ConsoleTheme
- type ConsoleUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNavigationAction ¶
AddNavigationAction adds a navigation.
func CheckVersionAction ¶ added in v1.8.2
CheckVersionAction checks version.
func ExportMarkdownAction ¶
ExportMarkdownAction exports articles as markdown zip file.
func GenArticlesAction ¶
GenArticlesAction generates articles for testing.
func GetAccountAction ¶ added in v1.7.0
GetAccountAction gets an account.
func GetArticleThumbsAction ¶
GetArticleThumbsAction gets article thumbnails.
func GetBasicSettingsAction ¶
GetBasicSettingsAction gets basic settings.
func GetCategoriesAction ¶
GetCategoriesAction gets categories.
func GetFeedSettingsAction ¶
GetFeedSettingsAction gets feed settings.
func GetI18nSettingsAction ¶
GetI18nSettingsAction gets i18n settings.
func GetNavigationAction ¶
GetNavigationAction gets a navigation.
func GetNavigationsAction ¶
GetNavigationsAction gets navigations.
func GetPreferenceSettingsAction ¶
GetPreferenceSettingsAction gets preference settings.
func GetSignSettingsAction ¶
GetSignSettingsAction gets sign settings.
func GetThirdStatisticSettingsAction ¶ added in v1.1.0
GetThirdStatisticSettingsAction gets third statistic settings.
func ImportMarkdownAction ¶
ImportMarkdownAction imports markdown zip file as articles.
func MarkdownAction ¶
MarkdownAction handles markdown text to HTML.
func RemoveArticleAction ¶
RemoveArticleAction removes an article.
func RemoveArticlesAction ¶
RemoveArticlesAction removes articles.
func RemoveCategoryAction ¶
RemoveCategoryAction removes a category.
func RemoveCommentAction ¶
RemoveCommentAction removes a comment.
func RemoveCommentsAction ¶
RemoveCommentsAction removes comments.
func RemoveNavigationAction ¶
RemoveNavigationAction remove a navigation.
func ShowAdminPagesAction ¶
ShowAdminPagesAction shows admin pages.
func UpdateAccountAction ¶ added in v1.7.0
UpdateAccountAction updates an account.
func UpdateArticleAction ¶
UpdateArticleAction updates an article.
func UpdateBasicSettingsAction ¶
UpdateBasicSettingsAction updates basic settings.
func UpdateCategoryAction ¶
UpdateCategoryAction updates a category.
func UpdateFeedSettingsAction ¶
UpdateFeedSettingsAction updates feed settings.
func UpdateI18nSettingsAction ¶
UpdateI18nSettingsAction updates i18n settings.
func UpdateNavigationAction ¶
UpdateNavigationAction updates a navigation.
func UpdatePasswordAction ¶ added in v1.7.0
UpdatePasswordAction updates a user's password.
func UpdatePreferenceSettingsAction ¶
UpdatePreferenceSettingsAction updates preference settings.
func UpdateSignSettingsAction ¶
UpdateSignSettingsAction updates sign settings.
func UpdateThirdStatisticSettingsAction ¶ added in v1.1.0
UpdateThirdStatisticSettingsAction updates third statistic settings.
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 ¶
ConsoleTag represents console tag.
type ConsoleTheme ¶
ConsoleTheme represents console theme.