Back to godoc.org

Package console

v1.9.1
Latest Go to latest

The highest tagged major version is .

Published: Jan 16, 2020 | License: GPL3 | Module: github.com/88250/pipe

Overview

Package console defines console controllers.

Package console defines console controllers.

Index

func AddArticleAction

func AddArticleAction(c *gin.Context)

AddArticleAction adds a new article.

func AddCategoryAction

func AddCategoryAction(c *gin.Context)

AddCategoryAction adds a category.

func AddNavigationAction

func AddNavigationAction(c *gin.Context)

AddNavigationAction adds a navigation.

func AddUserAction

func AddUserAction(c *gin.Context)

AddUserAction adds a user.

func BlogSwitchAction

func BlogSwitchAction(c *gin.Context)

BlogSwitchAction switches blog.

func CheckVersionAction

func CheckVersionAction(c *gin.Context)

CheckVersionAction checks version.

func ExportMarkdownAction

func ExportMarkdownAction(c *gin.Context)

ExportMarkdownAction exports articles as markdown zip file.

func GenArticlesAction

func GenArticlesAction(c *gin.Context)

GenArticlesAction generates articles for testing.

func GetAccountAction

func GetAccountAction(c *gin.Context)

GetAccountAction gets an account.

func GetAdSettingsAction

func GetAdSettingsAction(c *gin.Context)

GetAdSettingsAction get advertisement settings.

func GetArticleAction

func GetArticleAction(c *gin.Context)

GetArticleAction gets an article.

func GetArticleThumbsAction

func GetArticleThumbsAction(c *gin.Context)

GetArticleThumbsAction gets article thumbnails.

func GetArticlesAction

func GetArticlesAction(c *gin.Context)

GetArticlesAction gets articles.

func GetBasicSettingsAction

func GetBasicSettingsAction(c *gin.Context)

GetBasicSettingsAction gets basic settings.

func GetCategoriesAction

func GetCategoriesAction(c *gin.Context)

GetCategoriesAction gets categories.

func GetCategoryAction

func GetCategoryAction(c *gin.Context)

GetCategoryAction gets a category.

func GetCommentsAction

func GetCommentsAction(c *gin.Context)

GetCommentsAction gets comments

func GetFeedSettingsAction

func GetFeedSettingsAction(c *gin.Context)

GetFeedSettingsAction gets feed settings.

func GetI18nSettingsAction

func GetI18nSettingsAction(c *gin.Context)

GetI18nSettingsAction gets i18n settings.

func GetNavigationAction

func GetNavigationAction(c *gin.Context)

GetNavigationAction gets a navigation.

func GetNavigationsAction

func GetNavigationsAction(c *gin.Context)

GetNavigationsAction gets navigations.

func GetPreferenceSettingsAction

func GetPreferenceSettingsAction(c *gin.Context)

GetPreferenceSettingsAction gets preference settings.

func GetSignSettingsAction

func GetSignSettingsAction(c *gin.Context)

GetSignSettingsAction gets sign settings.

func GetTagsAction

func GetTagsAction(c *gin.Context)

GetTagsAction gets tags.

func GetTagsPageAction

func GetTagsPageAction(c *gin.Context)

GetTagsAction gets tags with pagination.

func GetThemesAction

func GetThemesAction(c *gin.Context)

GetThemesAction gets themes.

func GetThirdStatisticSettingsAction

func GetThirdStatisticSettingsAction(c *gin.Context)

GetThirdStatisticSettingsAction gets third statistic settings.

func GetUsersAction

func GetUsersAction(c *gin.Context)

GetUsersAction gets users.

func ImportMarkdownAction

func ImportMarkdownAction(c *gin.Context)

ImportMarkdownAction imports markdown zip file as articles.

func LoginCheck

func LoginCheck(c *gin.Context)

LoginCheck checks login or not.

func MarkdownAction

func MarkdownAction(c *gin.Context)

MarkdownAction handles markdown text to HTML.

func PushArticle2RhyAction

func PushArticle2RhyAction(c *gin.Context)

PushArticle2RhyAction pushes an article to community.

func RemoveArticleAction

func RemoveArticleAction(c *gin.Context)

RemoveArticleAction removes an article.

func RemoveArticlesAction

func RemoveArticlesAction(c *gin.Context)

RemoveArticlesAction removes articles.

func RemoveCategoryAction

func RemoveCategoryAction(c *gin.Context)

RemoveCategoryAction removes a category.

func RemoveCommentAction

func RemoveCommentAction(c *gin.Context)

RemoveCommentAction removes a comment.

func RemoveCommentsAction

func RemoveCommentsAction(c *gin.Context)

RemoveCommentsAction removes comments.

func RemoveNavigationAction

func RemoveNavigationAction(c *gin.Context)

RemoveNavigationAction remove a navigation.

func RemoveTagsAction

func RemoveTagsAction(c *gin.Context)

RemoveTagsAction remove tags that have no articles.

func ShowAdminPagesAction

func ShowAdminPagesAction(c *gin.Context)

ShowAdminPagesAction shows admin pages.

func UpdateAccountAction

func UpdateAccountAction(c *gin.Context)

UpdateAccountAction updates an account.

func UpdateAdSettingsAction

func UpdateAdSettingsAction(c *gin.Context)

UpdateAdSettingsAction update third statistic settings.

func UpdateArticleAction

func UpdateArticleAction(c *gin.Context)

UpdateArticleAction updates an article.

func UpdateBasicSettingsAction

func UpdateBasicSettingsAction(c *gin.Context)

UpdateBasicSettingsAction updates basic settings.

func UpdateCategoryAction

func UpdateCategoryAction(c *gin.Context)

UpdateCategoryAction updates a category.

func UpdateFeedSettingsAction

func UpdateFeedSettingsAction(c *gin.Context)

UpdateFeedSettingsAction updates feed settings.

func UpdateI18nSettingsAction

func UpdateI18nSettingsAction(c *gin.Context)

UpdateI18nSettingsAction updates i18n settings.

func UpdateNavigationAction

func UpdateNavigationAction(c *gin.Context)

UpdateNavigationAction updates a navigation.

func UpdatePreferenceSettingsAction

func UpdatePreferenceSettingsAction(c *gin.Context)

UpdatePreferenceSettingsAction updates preference settings.

func UpdateSignSettingsAction

func UpdateSignSettingsAction(c *gin.Context)

UpdateSignSettingsAction updates sign settings.

func UpdateThemeAction

func UpdateThemeAction(c *gin.Context)

UpdateThemeAction updates theme.

func UpdateThirdStatisticSettingsAction

func UpdateThirdStatisticSettingsAction(c *gin.Context)

UpdateThirdStatisticSettingsAction updates third statistic settings.

func UploadTokenAction

func UploadTokenAction(c *gin.Context)

UploadTokenAction gets a upload token.

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 {
	ID         uint64 `json:"id"`
	Title      string `json:"title"`
	URL        string `json:"url"`
	IconURL    string `json:"iconURL"`
	OpenMethod string `json:"openMethod"`
	Number     int    `json:"number"`
}

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

type ConsoleTheme struct {
	Name         string `json:"name"`
	ThumbnailURL string `json:"thumbnailURL"`
}

ConsoleTheme represents console theme.

type ConsoleUser

type ConsoleUser struct {
	ID           uint64 `json:"id"`
	Name         string `json:"name"`
	Nickname     string `json:"nickname"`
	Role         int    `json:"role"`
	URL          string `json:"url"`
	AvatarURL    string `json:"avatarURL"`
	ArticleCount int    `json:"articleCount"`
}

ConsoleUser represents console user.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier