Documentation ¶
Overview ¶
* @Descripttion: * @version: * @Author: sunylin * @Date: 2020-12-20 22:54:43 * @LastEditors: sunylin * @LastEditTime: 2020-12-22 13:07:04
Index ¶
- type ContentController
- func (c *ContentController) DeleteBy(contentID string) (res models.CommonRes)
- func (c *ContentController) GetDetailBy(contentID string) (res models.ContentDetailres)
- func (c *ContentController) GetPublic() (res models.ContentPublicList)
- func (c *ContentController) GetTextsBy(userID string) (res models.ContentListByUser)
- func (c *ContentController) Options()
- func (c *ContentController) OptionsBy(contentID string)
- func (c *ContentController) OptionsDetailBy(contentID string)
- func (c *ContentController) OptionsPublic()
- func (c *ContentController) OptionsText()
- func (c *ContentController) OptionsTextsBy(userID string)
- func (c *ContentController) OptionsUpdate()
- func (c *ContentController) PostText() (res models.CommonRes)
- func (c *ContentController) PostUpdate() (res models.CommonRes)
- type LikeController
- type LikeRes
- type LoginReq
- type NameReq
- type NotificationController
- func (c *NotificationController) DeleteBy(notificationID string) (res models.CommonRes)
- func (c *NotificationController) GetAll() (res models.UserNotificationres)
- func (c *NotificationController) OptionsAll() (res models.UserNotificationres)
- func (c *NotificationController) OptionsBy(notificationID string)
- type PageParams
- type RegisterReq
- type TextReq
- type TextUpdateReq
- type UsersController
- func (c *UsersController) GetInfoBy(id string) (res models.UserInfoRes)
- func (c *UsersController) OptionsInfoBy(id string)
- func (c *UsersController) OptionsLogin()
- func (c *UsersController) OptionsLogout()
- func (c *UsersController) OptionsName()
- func (c *UsersController) OptionsRegister()
- func (c *UsersController) PostLogin() (res models.CommonRes)
- func (c *UsersController) PostLogout() (res models.CommonRes)
- func (c *UsersController) PostName() (res models.CommonRes)
- func (c *UsersController) PostRegister() (res models.CommonRes)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentController ¶
ContentController content 控制器
func (*ContentController) DeleteBy ¶
func (c *ContentController) DeleteBy(contentID string) (res models.CommonRes)
DeleteBy DELETE /api/content/{contentID:string} 删除指定内容
func (*ContentController) GetDetailBy ¶
func (c *ContentController) GetDetailBy(contentID string) (res models.ContentDetailres)
GetDetailBy GET /api/content/detail/{contentID:string} 获取指定内容
func (*ContentController) GetPublic ¶
func (c *ContentController) GetPublic() (res models.ContentPublicList)
GetPublic GET /api/content/public 获取公共内容
func (*ContentController) GetTextsBy ¶
func (c *ContentController) GetTextsBy(userID string) (res models.ContentListByUser)
GetUsercontentBy GET /api/content/texts/{userID:string} 获取指定用户的所有内容
func (*ContentController) OptionsBy ¶
func (c *ContentController) OptionsBy(contentID string)
OptionsBy options
func (*ContentController) OptionsDetailBy ¶
func (c *ContentController) OptionsDetailBy(contentID string)
OptionsDetailBy OPTIONS /api/content/detail/{contentID:string} 获取指定内容
func (*ContentController) OptionsPublic ¶
func (c *ContentController) OptionsPublic()
OptionsPublic OPTIONS /api/content/public 获取公共内容
func (*ContentController) OptionsText ¶
func (c *ContentController) OptionsText()
OptionsText OPTIONS /api/content/text 增加文本内容
func (*ContentController) OptionsTextsBy ¶
func (c *ContentController) OptionsTextsBy(userID string)
OptionsTextsBy OPTIONS /api/content/texts/{userID:string} 获取指定用户的所有内容
func (*ContentController) OptionsUpdate ¶
func (c *ContentController) OptionsUpdate()
OptionsUpdate OPTIONS /api/content/update 增加文本内容
func (*ContentController) PostText ¶
func (c *ContentController) PostText() (res models.CommonRes)
PostText POST /api/content/text 增加文本内容
func (*ContentController) PostUpdate ¶
func (c *ContentController) PostUpdate() (res models.CommonRes)
PostUpdate POST /api/content/update 增加文本内容
type LikeController ¶
func (*LikeController) GetBy ¶
func (c *LikeController) GetBy(id string) (res LikeRes)
GetBy Get /like/{contentID} 获取用户点赞列表
func (*LikeController) OptionsBy ¶
func (c *LikeController) OptionsBy(id string)
Options Options /like/{contentID} 对某个内容点赞
type NotificationController ¶
type NotificationController struct { Ctx iris.Context Model models.NotifiationDB Session *sessions.Session }
func (*NotificationController) DeleteBy ¶
func (c *NotificationController) DeleteBy(notificationID string) (res models.CommonRes)
DeleteBy DELETE /api/notificaiton/{NotificationID:string} 删除指定通知
func (*NotificationController) GetAll ¶
func (c *NotificationController) GetAll() (res models.UserNotificationres)
GetAll GET /api/notification/all 获取用户所有通知
func (*NotificationController) OptionsAll ¶
func (c *NotificationController) OptionsAll() (res models.UserNotificationres)
type PageParams struct { Page int `url:"page"` PerPage int `url:"per_page"` }
OptionsAll OPTIONS /api/notification/all 获取用户所有通知
func (*NotificationController) OptionsBy ¶
func (c *NotificationController) OptionsBy(notificationID string)
OptionsBy OPTIONS /api/notificaiton/{NotificationID:string} 删除指定通知
type PageParams ¶
type RegisterReq ¶
type RegisterReq struct { Name string `json:"username"` Email string `json:"email"` Password string `json:"password"` }
RegisterReq POST /user/register 注册请求
type TextReq ¶
type TextReq struct { Detail string `json:"detail"` Tags []string `json:"tags"` IsPublic bool `json:"isPublic"` }
TextReq POST /api/content/text 增加文本内容
type TextUpdateReq ¶
type TextUpdateReq struct { ID string `json:"contentID"` Detail string `json:"detail"` Tags []string `json:"tags"` IsPublic bool `json:"isPublic"` }
TextUpdateReq 文本内容
type UsersController ¶
func (*UsersController) GetInfoBy ¶
func (c *UsersController) GetInfoBy(id string) (res models.UserInfoRes)
GetInfo GET /user/info/{userID:string}
func (*UsersController) OptionsInfoBy ¶
func (c *UsersController) OptionsInfoBy(id string)
OptionsInfoBy OPTIONS /user/info/{userID:string}
func (*UsersController) OptionsLogin ¶
func (c *UsersController) OptionsLogin()
OptionsLogin Options /user/login 用户登陆
func (*UsersController) OptionsLogout ¶
func (c *UsersController) OptionsLogout()
OptionsLogout Options user/logout 退出登陆
func (*UsersController) OptionsName ¶
func (c *UsersController) OptionsName()
OptionsName OPTIONS /user/name
func (*UsersController) OptionsRegister ¶
func (c *UsersController) OptionsRegister()
OptionsRegister OPTIONS /user/register 用户注册
func (*UsersController) PostLogin ¶
func (c *UsersController) PostLogin() (res models.CommonRes)
PostLogin POST /user/login 用户登陆
func (*UsersController) PostLogout ¶
func (c *UsersController) PostLogout() (res models.CommonRes)
PostLogout POST /user/logout 退出登陆
func (*UsersController) PostName ¶
func (c *UsersController) PostName() (res models.CommonRes)
PostName POST /user/name 更新用户名 (Token required)
func (*UsersController) PostRegister ¶
func (c *UsersController) PostRegister() (res models.CommonRes)
PostRegister POST /user/register 用户注册