console

package
v0.0.0-...-0ec75ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2019 License: GPL-3.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func MarkdownAction(c *gin.Context)

MarkdownAction handles markdown text to HTML.

func RemoveCommentAction

func RemoveCommentAction(c *gin.Context)

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 {
	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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL