controllers

package
v0.0.1-Beta01 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package controllers - NekoBlog backend server controllers. This file is for comment controller, which is used to create handlee comment related requests. Copyright (c) [2024], Author(s): - WhitePaper233<[email protected]> - sjyhlxysybzdhxd<[email protected]>

Package controllers - NekoBlog backend server controllers. This file is for factory of controllers. Copyright (c) [2024], Author(s): - WhitePaper233<[email protected]> - sjyhlxysybzdhxd<[email protected]>

Package controllers - NekoBlog backend server controllers. This file is for post controller, which is used to create handlee post related requests. Copyright (c) [2024], Author(s): - WhitePaper233<[email protected]> - sjyhlxysybzdhxd<[email protected]> - CBofJOU<[email protected]>

Package controllers - NekoBlog backend server controllers. This file is for user controller, which is used to create handlee user related requests. Copyright (c) [2024], Author(s): - WhitePaper233<[email protected]> - sjyhlxysybzdhxd<[email protected]>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentController

type CommentController struct {
	// contains filtered or unexported fields
}

CommentController 评论控制器

func (*CommentController) DeleteCommentHandler

func (controller *CommentController) DeleteCommentHandler() fiber.Handler

DeleteCommentHandler 处理删除评论的请求

返回:

  • 返回是否成功处理

func (*CommentController) NewCancelDislikeCommentHandler

func (controller *CommentController) NewCancelDislikeCommentHandler() fiber.Handler

NewCancelDislikeCommentHandler

返回值:

  • fiber.Handler:新的取消点踩评论的函数

func (*CommentController) NewCancelLikeCommentHandler

func (controller *CommentController) NewCancelLikeCommentHandler() fiber.Handler

NewCancelLikeCommentHandler 取消点赞评论的函数

返回值:

  • fiber.Handler:新的取消点赞评论的函数

func (*CommentController) NewCommentDetailHandler

func (controller *CommentController) NewCommentDetailHandler() fiber.Handler

NewCommentDetailHandler 获取文章信息的函数

返回值:

  • fiber.Handler:新的获取文章信息的函数

func (*CommentController) NewCommentListHandler

func (controller *CommentController) NewCommentListHandler() fiber.Handler

NewCommentListHandler 下拉评论列表请求

返回值:

  • 成功则返回评论列表
  • 失败返回nil

func (*CommentController) NewCommentUserStatusHandler

func (controller *CommentController) NewCommentUserStatusHandler() fiber.Handler

NewCommentUserStatusHandler 获取用户对评论的状态

返回值:

  • fiber.Handler:新的获取用户对评论的状态的函数

func (*CommentController) NewCreateCommentHandler

func (controller *CommentController) NewCreateCommentHandler(postStore *stores.PostStore, userStore *stores.UserStore) fiber.Handler

NewCreateCommentHandler 处理创建评论的请求。

参数:- postStore,userStore:绑定post和user层 来调用其中方法

返回:

  • 处理的成功和失败

func (*CommentController) NewDislikeCommentHandler

func (controller *CommentController) NewDislikeCommentHandler() fiber.Handler

NewDislikeCommentHandler 点踩评论的函数

返回值:

  • fiber.Handler:新的点踩评论的函数

func (*CommentController) NewLikeCommentHandler

func (controller *CommentController) NewLikeCommentHandler() fiber.Handler

NewLikeCommentHandler 点赞评论的函数

返回值:

  • fiber.Handler:新的点赞评论的函数

func (*CommentController) NewUpdateCommentHandler

func (controller *CommentController) NewUpdateCommentHandler() fiber.Handler

NewUpdateCommentHandler 处理修改评论的请求。

返回:

  • 处理的成功和失败

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

Factory 控制器工厂

func NewFactory

func NewFactory(serviceFactory *services.Factory) *Factory

NewFactory 创建控制器工厂

func (*Factory) NewCommentController

func (factory *Factory) NewCommentController() *CommentController

NewCommentController 创建一个新的评论控制器实例。

返回:

  • *CommentController: 返回一个新的评论控制器实例。

func (*Factory) NewPostController

func (factory *Factory) NewPostController() *PostController

NewPostController 博文控制器工厂函数。

返回值:

  • *PostController 博文控制器指针

func (*Factory) NewUserController

func (factory *Factory) NewUserController() *UserController

NewUserController 返回一个新的 UserController 实例。

返回值:

  • *UserController:新的 UserController 实例。

type PostController

type PostController struct {
	// contains filtered or unexported fields
}

PostController 博文控制器结构体

func (*PostController) NewCancelFavouritePostHandler

func (controller *PostController) NewCancelFavouritePostHandler() fiber.Handler

NewCancelFavouritePostHandler 返回一个用于处理取消收藏博文请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的取消收藏博文函数

func (*PostController) NewCancelLikePostHandler

func (controller *PostController) NewCancelLikePostHandler() fiber.Handler

NewCancelLikePostHandler 返回一个用于处理取消点赞博文请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的取消点赞函数

func (*PostController) NewCreatePostHandler

func (controller *PostController) NewCreatePostHandler() fiber.Handler

NewCreatePostHandler 返回一个用于处理创建博文请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的创建博文函数

func (*PostController) NewDeletePostHandler

func (controller *PostController) NewDeletePostHandler() fiber.Handler

NewDeletePostHandler 返回一个用于处理删除博文请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的博文删除函数

func (*PostController) NewFavouritePostHandler

func (controller *PostController) NewFavouritePostHandler() fiber.Handler

NewFavouritePostHandler 返回一个用于处理收藏博文请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的收藏博文函数

func (*PostController) NewLikePostHandler

func (controller *PostController) NewLikePostHandler() fiber.Handler

NewLikePostHandler 返回一个用于处理点赞博文请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的博文点赞函数

func (*PostController) NewPostDetailHandler

func (controller *PostController) NewPostDetailHandler() fiber.Handler

NewDetailHandler 获取文章信息的函数

返回值:

  • fiber.Handler:新的获取文章信息的函数

func (*PostController) NewPostListHandler

func (controller *PostController) NewPostListHandler(userStore *stores.UserStore) fiber.Handler

NewPostListHandler 博文列表函数

返回值:

  • fiber.Handle:新的博文列表函数

func (*PostController) NewPostUserStatusHandler

func (controller *PostController) NewPostUserStatusHandler() fiber.Handler

NewPostUserStatusHandler 返回一个用于处理获取用户对帖子的状态请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的获取用户对帖子的状态函数

func (*PostController) NewUploadPostImageHandler

func (controller *PostController) NewUploadPostImageHandler() fiber.Handler

NewUploadPostImageHandler 返回一个用于处理上传博文图片请求的 Fiber 处理函数

返回值:

  • fiber.Handler:新的上传博文图片函数

type UserController

type UserController struct {
	// contains filtered or unexported fields
}

UserController 用户控制器

func (*UserController) NewLoginHandler

func (controller *UserController) NewLoginHandler() fiber.Handler

NewLoginHandler 返回登陆用户的处理函数。

返回值:

  • fiber.Handler:新的登陆用户的处理函数。

func (*UserController) NewProfileHandler

func (controller *UserController) NewProfileHandler() fiber.Handler

NewProfileHandler 返回获取用户资料的处理函数。

返回值:

  • fiber.Handler:新的获取用户资料的处理函数。

func (*UserController) NewRegisterHandler

func (controller *UserController) NewRegisterHandler() fiber.Handler

NewRegisterHandler 返回注册用户的处理函数。

返回值:

  • fiber.Handler:新的注册用户的处理函数。

func (*UserController) NewUpdatePasswordHandler

func (controller *UserController) NewUpdatePasswordHandler() fiber.Handler
NewUserUpdatePassword 修改密码的函数

返回值:

  • fiber.Handler:新密码的处理函数。

func (*UserController) NewUpdateProfileHandler

func (controller *UserController) NewUpdateProfileHandler() fiber.Handler

NewUserUpdateProfileHandler 返回更新用户资料的处理函数。

返回值:

  • fiber.Handler:新的更新用户资料的处理函数。

func (*UserController) NewUploadAvatarHandler

func (controller *UserController) NewUploadAvatarHandler() fiber.Handler

NewUploadAvatarHandler 返回上传头像的处理函数。

返回值:

  • fiber.Handler:新的上传头像的处理函数。

Jump to

Keyboard shortcuts

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