controller

package
v0.0.0-...-2472da9 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: BSD-3-Clause Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const GoStoragePrefix = "https://golang.google.cn/dl/"

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(g *echo.Group)

Types

type AccountController

type AccountController struct{}

func (AccountController) Activate

func (AccountController) Activate(ctx echo.Context) error

Activate 用户激活

func (AccountController) ChangeAvatar

func (AccountController) ChangeAvatar(ctx echo.Context) error

ChangeAvatar 更换头像

func (AccountController) ChangePwd

func (AccountController) ChangePwd(ctx echo.Context) error

ChangePwd 修改密码

func (AccountController) Edit

func (self AccountController) Edit(ctx echo.Context) error

Edit 用户编辑个人信息

func (AccountController) ForgetPasswd

func (AccountController) ForgetPasswd(ctx echo.Context) error

ForgetPasswd 忘记密码

func (AccountController) Login

func (AccountController) Login(ctx echo.Context) error

Login 登录

func (AccountController) Logout

func (AccountController) Logout(ctx echo.Context) error

Logout 注销

func (AccountController) Register

func (self AccountController) Register(ctx echo.Context) error

func (AccountController) RegisterRoute

func (self AccountController) RegisterRoute(g *echo.Group)

注册路由

func (AccountController) ResetPasswd

func (AccountController) ResetPasswd(ctx echo.Context) error

ResetPasswd 重置密码

func (AccountController) SendActivateEmail

func (self AccountController) SendActivateEmail(ctx echo.Context) error

SendActivateEmail 发送注册激活邮件

func (AccountController) Unbind

func (AccountController) Unbind(ctx echo.Context) error

Unbind 第三方账号解绑

func (AccountController) WechatActive

func (AccountController) WechatActive(ctx echo.Context) error

type ArticleController

type ArticleController struct{}

func (ArticleController) Crawl

func (ArticleController) Crawl(ctx echo.Context) error

func (ArticleController) Create

func (ArticleController) Create(ctx echo.Context) error

Create 发布新文章

func (ArticleController) Detail

func (ArticleController) Detail(ctx echo.Context) error

Detail 文章详细页

func (ArticleController) Modify

func (ArticleController) Modify(ctx echo.Context) error

Modify 修改文章

func (ArticleController) ReadList

func (ArticleController) ReadList(ctx echo.Context) error

ReadList 网友文章列表页

func (ArticleController) RegisterRoute

func (self ArticleController) RegisterRoute(g *echo.Group)

注册路由

type BookController

type BookController struct{}

func (BookController) Create

func (BookController) Create(ctx echo.Context) error

Create 发布新书

func (BookController) Detail

func (BookController) Detail(ctx echo.Context) error

Detail 图书详细页

func (BookController) ReadList

func (BookController) ReadList(ctx echo.Context) error

ReadList 图书列表页

func (BookController) RegisterRoute

func (self BookController) RegisterRoute(g *echo.Group)

注册路由

type CaptchaController

type CaptchaController struct{}

验证码

func (CaptchaController) RegisterRoute

func (self CaptchaController) RegisterRoute(g *echo.Group)

func (CaptchaController) Server

func (CaptchaController) Server(ctx echo.Context) error

type CommentController

type CommentController struct{}

func (CommentController) ArticleDetail

func (self CommentController) ArticleDetail(ctx echo.Context) error

func (CommentController) AtUsers

func (CommentController) AtUsers(ctx echo.Context) error

AtUsers 评论或回复 @ 某人 suggest

func (CommentController) CommentList

func (CommentController) CommentList(ctx echo.Context) error

CommentList 获取某对象的评论信息

func (CommentController) Create

func (CommentController) Create(ctx echo.Context) error

Create 评论(或回复)

func (CommentController) Modify

func (CommentController) Modify(ctx echo.Context) error

修改评论

func (CommentController) RegisterRoute

func (self CommentController) RegisterRoute(g *echo.Group)

func (CommentController) TopicDetail

func (self CommentController) TopicDetail(ctx echo.Context) error

type DownloadController

type DownloadController struct{}

func (DownloadController) AddNewDownload

func (DownloadController) AddNewDownload(ctx echo.Context) error

func (DownloadController) FetchGoInstallPackage

func (self DownloadController) FetchGoInstallPackage(ctx echo.Context) error

func (DownloadController) GoDl

GoDl Go 语言安装包下载

func (DownloadController) RegisterRoute

func (self DownloadController) RegisterRoute(g *echo.Group)

注册路由

type FavoriteController

type FavoriteController struct{}

func (FavoriteController) Create

func (FavoriteController) Create(ctx echo.Context) error

Create 收藏(取消收藏)

func (FavoriteController) ReadList

func (FavoriteController) ReadList(ctx echo.Context) error

ReadList 我的(某人的)收藏

func (FavoriteController) RegisterRoute

func (self FavoriteController) RegisterRoute(g *echo.Group)

注册路由

type FeedController

type FeedController struct{}

func (FeedController) Atom

func (self FeedController) Atom(ctx echo.Context) error

func (FeedController) List

func (self FeedController) List(ctx echo.Context) error

func (FeedController) RegisterRoute

func (self FeedController) RegisterRoute(g *echo.Group)

注册路由

type GCTTController

type GCTTController struct{}

func (GCTTController) Apply

func (GCTTController) Apply(ctx echo.Context) error

Apply 申请成为译者

func (GCTTController) Create

func (GCTTController) Create(ctx echo.Context) error

Create 发布新译文

func (GCTTController) Index

func (self GCTTController) Index(ctx echo.Context) error

func (GCTTController) IssueList

func (GCTTController) IssueList(ctx echo.Context) error

func (GCTTController) RegisterRoute

func (self GCTTController) RegisterRoute(g *echo.Group)

注册路由

func (GCTTController) User

func (GCTTController) User(ctx echo.Context) error

func (GCTTController) UserList

func (GCTTController) UserList(ctx echo.Context) error

func (GCTTController) Webhook

func (GCTTController) Webhook(ctx echo.Context) error

type GiftController

type GiftController struct{}

func (GiftController) Exchange

func (GiftController) Exchange(ctx echo.Context) error

func (GiftController) GiftList

func (GiftController) GiftList(ctx echo.Context) error

func (GiftController) MyGift

func (GiftController) MyGift(ctx echo.Context) error

func (GiftController) RegisterRoute

func (self GiftController) RegisterRoute(g *echo.Group)

注册路由

type ImageController

type ImageController struct{}

图片处理

func (ImageController) PasteUpload

func (self ImageController) PasteUpload(ctx echo.Context) error

PasteUpload jquery 粘贴上传图片

func (ImageController) QuickUpload

func (self ImageController) QuickUpload(ctx echo.Context) error

QuickUpload CKEditor 编辑器,上传图片,支持粘贴方式上传

func (ImageController) RegisterRoute

func (self ImageController) RegisterRoute(g *echo.Group)

func (ImageController) Transfer

func (ImageController) Transfer(ctx echo.Context) error

Transfer 转换图片:通过 url 从远程下载图片然后转存到七牛

func (ImageController) Upload

func (ImageController) Upload(ctx echo.Context) error

Upload 上传图片

type IndexController

type IndexController struct{}

func (IndexController) Index

func (IndexController) Index(ctx echo.Context) error
func (IndexController) Link(ctx echo.Context) error

Link 用于重定向外部链接,比如广告链接

func (IndexController) Markdown

func (IndexController) Markdown(ctx echo.Context) error

func (IndexController) Pkgdoc

func (IndexController) Pkgdoc(ctx echo.Context) error

PkgdocHandler Go 语言文档中文版

func (IndexController) RegisterRoute

func (self IndexController) RegisterRoute(g *echo.Group)

注册路由

func (IndexController) WrapUrl

func (IndexController) WrapUrl(ctx echo.Context) error

WrapUrl 包装链接

type InstallController

type InstallController struct{}

func (InstallController) DoInstall

func (self InstallController) DoInstall(ctx echo.Context) error

DoInstall 执行安装,包括站点简单配置,安装数据库(创建数据库、表,填充基本数据)等

func (InstallController) RegisterRoute

func (self InstallController) RegisterRoute(g *echo.Group)

注册路由

func (InstallController) SetupConfig

func (self InstallController) SetupConfig(ctx echo.Context) error

func (InstallController) SetupOptions

func (InstallController) SetupOptions(ctx echo.Context) error

type InterviewController

type InterviewController struct{}

func (InterviewController) Create

func (InterviewController) Create(ctx echo.Context) error

func (InterviewController) Find

func (ic InterviewController) Find(ctx echo.Context) error

Find 某个题目的详情

func (InterviewController) RegisterRoute

func (self InterviewController) RegisterRoute(g *echo.Group)

RegisterRoute 注册路由

func (InterviewController) TodayQuestion

func (ic InterviewController) TodayQuestion(ctx echo.Context) error

TodayQuestion 今日题目

type LikeController

type LikeController struct{}

func (LikeController) Like

func (LikeController) Like(ctx echo.Context) error

Like 喜欢(或取消喜欢)

func (LikeController) RegisterRoute

func (self LikeController) RegisterRoute(g *echo.Group)

注册路由

type LinkController

type LinkController struct{}
func (LinkController) FindLinks(ctx echo.Context) error

FindLinks 友情链接

func (LinkController) RegisterRoute

func (self LinkController) RegisterRoute(g *echo.Group)

注册路由

type MessageController

type MessageController struct{}

func (MessageController) Delete

func (MessageController) Delete(ctx echo.Context) error

删除消息

func (MessageController) ReadList

func (MessageController) ReadList(ctx echo.Context) error

消息列表

func (MessageController) RegisterRoute

func (self MessageController) RegisterRoute(g *echo.Group)

注册路由

func (MessageController) Send

func (MessageController) Send(ctx echo.Context) error

Send 发短消息

type MissionController

type MissionController struct{}

func (MissionController) Complete

func (MissionController) Complete(ctx echo.Context) error

func (MissionController) Daily

func (MissionController) Daily(ctx echo.Context) error

func (MissionController) DailyRedeem

func (MissionController) DailyRedeem(ctx echo.Context) error

func (MissionController) RegisterRoute

func (self MissionController) RegisterRoute(g *echo.Group)

注册路由

type OAuthController

type OAuthController struct{}

func (OAuthController) GiteaCallback

func (OAuthController) GiteaCallback(ctx echo.Context) error

func (OAuthController) GiteaLogin

func (OAuthController) GiteaLogin(ctx echo.Context) error

func (OAuthController) GithubCallback

func (OAuthController) GithubCallback(ctx echo.Context) error

func (OAuthController) GithubLogin

func (OAuthController) GithubLogin(ctx echo.Context) error

func (OAuthController) RegisterRoute

func (self OAuthController) RegisterRoute(g *echo.Group)

注册路由

type OtherController

type OtherController struct{}

OtherController 有些页面只是前端,因此通过这个页面统一控制 只需要创建模板文件就可以访问到

func (OtherController) Any

func (OtherController) Any(ctx echo.Context) error

func (OtherController) RegisterRoute

func (self OtherController) RegisterRoute(g *echo.Group)

RegisterRoute 注册路由

type ProjectController

type ProjectController struct{}

func (ProjectController) CheckExist

func (ProjectController) CheckExist(ctx echo.Context) error

CheckExist 检测 uri 对应的项目是否存在(验证,true表示不存在;false表示存在)

func (ProjectController) Create

func (ProjectController) Create(ctx echo.Context) error

Create 新建项目

func (ProjectController) Detail

func (ProjectController) Detail(ctx echo.Context) error

Detail 项目详情

func (ProjectController) Modify

func (ProjectController) Modify(ctx echo.Context) error

Modify 修改项目

func (ProjectController) ReadList

func (ProjectController) ReadList(ctx echo.Context) error

ReadList 开源项目列表页

func (ProjectController) RegisterRoute

func (self ProjectController) RegisterRoute(g *echo.Group)

注册路由

type ReadingController

type ReadingController struct{}

func (ReadingController) IReading

func (ReadingController) IReading(ctx echo.Context) error

IReading 点击 【我要晨读】,记录点击数,跳转

func (ReadingController) ReadingList

func (ReadingController) ReadingList(ctx echo.Context) error

ReadingList 晨读列表页

func (ReadingController) RegisterRoute

func (self ReadingController) RegisterRoute(g *echo.Group)

注册路由

type ResourceController

type ResourceController struct{}

func (ResourceController) Create

func (ResourceController) Create(ctx echo.Context) error

Create 发布新资源

func (ResourceController) Detail

func (ResourceController) Detail(ctx echo.Context) error

Detail 某个资源详细页

func (ResourceController) Modify

func (ResourceController) Modify(ctx echo.Context) error

Modify 修改資源

func (ResourceController) ReadCatResources

func (ResourceController) ReadCatResources(ctx echo.Context) error

ReadCatResources 某个分类的资源列表

func (ResourceController) ReadList

func (ResourceController) ReadList(ctx echo.Context) error

ReadList 资源索引页

func (ResourceController) RegisterRoute

func (self ResourceController) RegisterRoute(g *echo.Group)

注册路由

type SearchController

type SearchController struct{}

func (SearchController) RegisterRoute

func (self SearchController) RegisterRoute(g *echo.Group)

注册路由

func (SearchController) Search

func (SearchController) Search(ctx echo.Context) error

Search

func (SearchController) TagList

func (SearchController) TagList(ctx echo.Context) error

TagList

type SidebarController

type SidebarController struct{}

侧边栏的内容通过异步请求获取

func (SidebarController) ActiveUser

func (SidebarController) ActiveUser(ctx echo.Context) error

ActiveUser 活跃会员

func (SidebarController) FriendLinks(ctx echo.Context) error

FriendLinks 友情链接

func (SidebarController) HotNodes

func (SidebarController) HotNodes(ctx echo.Context) error

HotNodes 社区热门节点

func (SidebarController) NewestUser

func (SidebarController) NewestUser(ctx echo.Context) error

NewestUser 新加入会员

func (SidebarController) OtherTopics

func (SidebarController) OtherTopics(ctx echo.Context) error

OtherTopics 某节点下其他帖子

func (SidebarController) RecentArticle

func (SidebarController) RecentArticle(ctx echo.Context) error

RecentArticle 最新博文

func (SidebarController) RecentComment

func (SidebarController) RecentComment(ctx echo.Context) error

RecentComment 最新评论

func (SidebarController) RecentDynamic

func (SidebarController) RecentDynamic(ctx echo.Context) error

RecentDynamic 社区最新公告或go最新动态

func (SidebarController) RecentProject

func (SidebarController) RecentProject(ctx echo.Context) error

RecentProject 最新开源项目

func (SidebarController) RecentReading

func (SidebarController) RecentReading(ctx echo.Context) error

RecentReading 技术晨读

func (SidebarController) RecentResource

func (SidebarController) RecentResource(ctx echo.Context) error

RecentResource 最新资源

func (SidebarController) RecentTopic

func (SidebarController) RecentTopic(ctx echo.Context) error

RecentTopic 最新帖子

func (SidebarController) RegisterRoute

func (self SidebarController) RegisterRoute(g *echo.Group)

func (SidebarController) ViewRank

func (SidebarController) ViewRank(ctx echo.Context) error

ViewRank 阅读排行榜

func (SidebarController) WebsiteStat

func (SidebarController) WebsiteStat(ctx echo.Context) error

WebsiteStat 网站统计信息

type SubjectController

type SubjectController struct{}

func (SubjectController) Contribute

func (self SubjectController) Contribute(ctx echo.Context) error

Contribute 投稿

func (SubjectController) Create

func (SubjectController) Create(ctx echo.Context) error

Create 新建专栏

func (SubjectController) Follow

func (self SubjectController) Follow(ctx echo.Context) error

func (SubjectController) Index

func (SubjectController) Index(ctx echo.Context) error

func (SubjectController) Mine

func (self SubjectController) Mine(ctx echo.Context) error

Mine 我管理的专栏

func (SubjectController) Modify

func (SubjectController) Modify(ctx echo.Context) error

Modify 修改专栏

func (SubjectController) MyArticles

func (self SubjectController) MyArticles(ctx echo.Context) error

func (SubjectController) RegisterRoute

func (self SubjectController) RegisterRoute(g *echo.Group)

注册路由

func (SubjectController) RemoveContribute

func (self SubjectController) RemoveContribute(ctx echo.Context) error

RemoveContribute 删除投稿

type TopController

type TopController struct{}

func (TopController) RegisterRoute

func (self TopController) RegisterRoute(g *echo.Group)

注册路由

func (TopController) TopDAU

func (TopController) TopDAU(ctx echo.Context) error

func (TopController) TopRich

func (TopController) TopRich(ctx echo.Context) error

type TopicController

type TopicController struct{}

func (TopicController) Append

func (TopicController) Append(ctx echo.Context) error

func (TopicController) Create

func (TopicController) Create(ctx echo.Context) error

Create 新建主题

func (TopicController) Detail

func (TopicController) Detail(ctx echo.Context) error

Detail 社区主题详细页

func (TopicController) GoNodeTopics

func (TopicController) GoNodeTopics(ctx echo.Context) error

GoNodeTopics 某节点下的主题列表,uri: /go/golang

func (TopicController) Modify

func (TopicController) Modify(ctx echo.Context) error

Modify 修改主题

func (TopicController) NodeTopics

func (TopicController) NodeTopics(ctx echo.Context) error

NodeTopics 某节点下的主题列表

func (TopicController) Nodes

func (TopicController) Nodes(ctx echo.Context) error

Nodes 所有节点

func (TopicController) RegisterRoute

func (self TopicController) RegisterRoute(g *echo.Group)

注册路由

func (TopicController) SetTop

func (TopicController) SetTop(ctx echo.Context) error

func (TopicController) TopicList

func (self TopicController) TopicList(ctx echo.Context) error

func (TopicController) Topics

func (self TopicController) Topics(ctx echo.Context) error

func (TopicController) TopicsLast

func (self TopicController) TopicsLast(ctx echo.Context) error

func (TopicController) TopicsNoReply

func (self TopicController) TopicsNoReply(ctx echo.Context) error

type UserController

type UserController struct{}

func (UserController) Articles

func (UserController) Articles(ctx echo.Context) error

func (UserController) Comments

func (UserController) Comments(ctx echo.Context) error

func (UserController) EmailUnsub

func (UserController) EmailUnsub(ctx echo.Context) error

EmailUnsub 邮件订阅/退订页面

func (UserController) Home

func (UserController) Home(ctx echo.Context) error

Home 用户个人首页

func (UserController) Projects

func (UserController) Projects(ctx echo.Context) error

func (UserController) ReadList

func (UserController) ReadList(ctx echo.Context) error

ReadList 会员列表

func (UserController) RegisterRoute

func (self UserController) RegisterRoute(g *echo.Group)

注册路由

func (UserController) Resources

func (UserController) Resources(ctx echo.Context) error

func (UserController) Topics

func (UserController) Topics(ctx echo.Context) error

type UserRichController

type UserRichController struct{}

func (UserRichController) Add

func (UserRichController) MyBalance

func (UserRichController) MyBalance(ctx echo.Context) error

func (UserRichController) RegisterRoute

func (self UserRichController) RegisterRoute(g *echo.Group)

注册路由

type WebsocketController

type WebsocketController struct {
	ServerId uint32
}

func (*WebsocketController) RegisterRoute

func (this *WebsocketController) RegisterRoute(g *echo.Group)

func (*WebsocketController) Ws

func (this *WebsocketController) Ws(wsConn *websocket.Conn)

websocket,统计在线用户数 uri: /ws

type WechatController

type WechatController struct{}

func (WechatController) AutoReply

func (self WechatController) AutoReply(ctx echo.Context) error

func (WechatController) Bind

func (self WechatController) Bind(ctx echo.Context) error

func (WechatController) RegisterRoute

func (self WechatController) RegisterRoute(g *echo.Group)

注册路由

type WideController

type WideController struct{}

func (WideController) Playground

func (WideController) Playground(ctx echo.Context) error

Playground Wide 的内嵌 iframe 的 playground

func (WideController) RegisterRoute

func (self WideController) RegisterRoute(g *echo.Group)

注册路由

type WikiController

type WikiController struct{}

func (WikiController) Create

func (WikiController) Create(ctx echo.Context) error

Create 创建wiki页

func (WikiController) Detail

func (WikiController) Detail(ctx echo.Context) error

Detail 展示wiki页

func (WikiController) Modify

func (WikiController) Modify(ctx echo.Context) error

Modify 修改 Wiki 页

func (WikiController) ReadList

func (WikiController) ReadList(ctx echo.Context) error

ReadList 获得wiki列表

func (WikiController) RegisterRoute

func (self WikiController) RegisterRoute(g *echo.Group)

注册路由

Directories

Path Synopsis
app Go 语言中文网 APP 接口
app Go 语言中文网 APP 接口

Jump to

Keyboard shortcuts

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