frontend

package
v0.0.0-...-9d2f815 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const MaxTagLen = 15 // 单个标签最大长度
View Source
const MaxTagsLen = 3 // 标签最大长度

Variables

This section is empty.

Functions

This section is empty.

Types

type SCheckin

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

func CheckinService

func CheckinService(ctx *gin.Context) *SCheckin

func (*SCheckin) IsCheckin

func (s *SCheckin) IsCheckin() (bool, error)

IsCheckin 今日是否签到

func (*SCheckin) Store

func (s *SCheckin) Store() error

Store 签到保存

type SComment

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

func CommentService

func CommentService(ctx *gin.Context) *SComment

func (*SComment) Delete

func (s *SComment) Delete(id uint64) error

Delete 删除评论

func (*SComment) GetList

func (s *SComment) GetList(topicId, authorId uint64) ([]*frontend.Comment, error)

GetList 获取列表

func (*SComment) Submit

func (s *SComment) Submit(req *frontend.SubmitCommentReq) (uint64, error)

Submit 提交评论

type SHome

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

func HomeService

func HomeService(ctx *gin.Context) *SHome

type SLike

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

func LikeService

func LikeService(ctx *gin.Context) *SLike

func (*SLike) IsLiked

func (s *SLike) IsLiked(id uint64, source string) (bool, error)

IsLiked 是否点赞

func (*SLike) Like

func (s *SLike) Like(req *frontend.LikeReq) error

Like 点赞提交

type SNode

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

func NodeService

func NodeService(ctx *gin.Context) *SNode

func (*SNode) GetEnableNodes

func (s *SNode) GetEnableNodes() ([]*model.Nodes, error)

GetEnableNodes 获取已开启的所有节点

type SNotice

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

func NoticeService

func NoticeService(ctx *gin.Context) *SNotice

func (*SNotice) GetLetterUnread

func (s *SNotice) GetLetterUnread() (int64, error)

GetLetterUnread 获取私信未读数

func (*SNotice) GetList

func (s *SNotice) GetList(req *fe.GetRemindListReq) (gin.H, error)

GetList 获取消息列表

func (*SNotice) GetRemindUnread

func (s *SNotice) GetRemindUnread() (int64, error)

GetRemindUnread 获取提醒未读消息

func (*SNotice) GetSystemUnread

func (s *SNotice) GetSystemUnread() (int64, error)

GetSystemUnread 获取系统未读数

func (*SNotice) ReadAll

func (s *SNotice) ReadAll(t string)

ReadAll 读取消息

type SRemind

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

func RemindService

func RemindService(ctx *gin.Context) *SRemind

type SReport

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

func ReportService

func ReportService(ctx *gin.Context) *SReport

func (*SReport) Store

func (s *SReport) Store(req *fe.SubmitReportReq) error

type SSearch

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

func SearchService

func SearchService(ctx *gin.Context) *SSearch

func (*SSearch) GetList

func (s *SSearch) GetList(req *fe.GetSearchListReq) (gin.H, error)

GetList 获取搜索列表

type STopic

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

func TopicService

func TopicService(ctx *gin.Context) *STopic

func (*STopic) Delete

func (s *STopic) Delete(ID uint64) error

Delete 删除话题

func (*STopic) Edit

func (s *STopic) Edit(ID uint64, req *fe.PublishTopicReq) (uint64, error)

func (*STopic) GetDetail

func (s *STopic) GetDetail(topicId uint64) (*fe.Topic, error)

GetDetail 获取详情

func (*STopic) GetList

func (s *STopic) GetList(req *fe.GetTopicListReq) (gin.H, error)

GetList 获取列表

func (*STopic) ParseBrief

func (s *STopic) ParseBrief(html string) (string, error)

ParseBrief parse topic brief

func (*STopic) ParseHtmlImages

func (s *STopic) ParseHtmlImages(html string) ([]string, error)

ParseHtmlImages parse topic images

func (*STopic) Publish

func (s *STopic) Publish(req *fe.PublishTopicReq) (uint64, error)

Publish 发布话题

func (*STopic) SettingCommentState

func (s *STopic) SettingCommentState(ID uint64) error

SettingCommentState 设置话题讨论状态

type SUser

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

func UserService

func UserService(ctx *gin.Context) *SUser

func (*SUser) Edit

func (s *SUser) Edit(req *fe.EditUserReq) error

Edit 编辑用户

func (*SUser) EditAvatar

func (s *SUser) EditAvatar(ctx *gin.Context) error

EditAvatar 修改头像

func (*SUser) EditPassword

func (s *SUser) EditPassword(req *fe.EditPasswordReq) error

EditPassword 修改密码

func (*SUser) Follow

func (s *SUser) Follow(req *fe.FollowUserReq) (int, error)

Follow 关注

func (*SUser) Home

func (s *SUser) Home(req *fe.GetUserHomeReq) (gin.H, error)

Home 用户主页

func (*SUser) Login

func (s *SUser) Login(req *fe.LoginReq) error

Login 处理用户登录

func (*SUser) Logout

func (s *SUser) Logout()

Logout 用户登出

func (*SUser) Register

func (s *SUser) Register(req *fe.RegisterReq) error

Register 用户登录

Jump to

Keyboard shortcuts

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