eventhandlers

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handlers

func Handlers() []cqrs.EventHandler

Handlers 返回所有事件处理器

func NewActivityFollowHandler

func NewActivityFollowHandler() cqrs.EventHandler

NewActivityFollowHandler 记录关注行为

func NewActivityLikeHandler

func NewActivityLikeHandler() cqrs.EventHandler

NewActivityLikeHandler 记录点赞行为

func NewActivityPostHandler

func NewActivityPostHandler() cqrs.EventHandler

NewActivityPostHandler 记录发帖行为

func NewActivityReplyHandler

func NewActivityReplyHandler() cqrs.EventHandler

NewActivityReplyHandler 记录回复行为

func NewActivitySignUpHandler

func NewActivitySignUpHandler() cqrs.EventHandler

NewActivitySignUpHandler 记录注册行为

func NewArticleLikedHandler

func NewArticleLikedHandler() cqrs.EventHandler

ArticleLikedHandler 文章点赞处理器

func NewArticlePublishedHandler

func NewArticlePublishedHandler() cqrs.EventHandler

ArticlePublishedHandler 文章发布处理器

func NewArticleUpdatedHandler

func NewArticleUpdatedHandler() cqrs.EventHandler

ArticleUpdatedHandler 文章更新处理器

func NewBadgeCommentHandler added in v0.2.2

func NewBadgeCommentHandler() cqrs.EventHandler

func NewBadgeFollowHandler added in v0.2.2

func NewBadgeFollowHandler() cqrs.EventHandler

func NewBadgeLikeHandler added in v0.2.2

func NewBadgeLikeHandler() cqrs.EventHandler

func NewBadgePostHandler added in v0.2.2

func NewBadgePostHandler() cqrs.EventHandler

func NewCommentCreatedHandler

func NewCommentCreatedHandler() cqrs.EventHandler

CommentCreatedHandler 评论/回复创建处理器

func NewPointArticlePublishedHandler

func NewPointArticlePublishedHandler() cqrs.EventHandler

NewPointArticlePublishedHandler 发帖获得积分

func NewPointCommentCreatedHandler

func NewPointCommentCreatedHandler() cqrs.EventHandler

NewPointCommentCreatedHandler 评论获得积分

func NewStatsPostHandler

func NewStatsPostHandler() cqrs.EventHandler

NewStatsPostHandler 记录发帖统计

func NewStatsReplyHandler

func NewStatsReplyHandler() cqrs.EventHandler

NewStatsReplyHandler 记录回复统计

func NewStatsSignUpHandler

func NewStatsSignUpHandler() cqrs.EventHandler

NewStatsSignUpHandler 记录注册统计

func NewUserFollowedHandler

func NewUserFollowedHandler() cqrs.EventHandler

UserFollowedHandler 用户关注处理器

func NewUserLastActiveUpdatedHandler

func NewUserLastActiveUpdatedHandler() cqrs.EventHandler

UserLastActiveUpdatedHandler 用户最后活跃时间更新处理器

func TakeUpTo64Chars

func TakeUpTo64Chars(s string) string

TakeUpTo64Chars 按字符数截取字符串,最多取 64 个字符

Types

type ArticleLikedEvent

type ArticleLikedEvent struct {
	UserId    uint64
	ArticleId uint64
	Title     string
	LikierId  uint64
}

ArticleLikedEvent 文章点赞事件

type ArticlePublishedEvent

type ArticlePublishedEvent struct {
	Article *articles.Entity
}

ArticlePublishedEvent 文章发布事件

type ArticleUpdatedEvent

type ArticleUpdatedEvent struct {
	Article *articles.Entity
}

ArticleUpdatedEvent 文章更新事件

type CommentCreatedEvent

type CommentCreatedEvent struct {
	ArticleId           uint64
	CommentId           uint64 // 新创建的评论ID
	UserId              uint64 // 评论者ID
	Content             string // 评论内容
	ArticleAuthorId     uint64 // 文章作者ID
	ParentReplyId       uint64 // 父评论ID(如果是回复评论)
	ParentReplyAuthorId uint64 // 父评论作者ID
}

CommentCreatedEvent 评论/回复创建事件

type UserFollowedEvent

type UserFollowedEvent struct {
	UserId       uint64
	FollowerId   uint64
	FollowerName string
}

UserFollowedEvent 用户关注事件

type UserLastActiveUpdatedEvent

type UserLastActiveUpdatedEvent struct {
	UserId     uint64
	ActiveTime time.Time
}

UserLastActiveUpdatedEvent 用户最后活跃时间更新事件

type UserSignUpEvent

type UserSignUpEvent struct {
	UserId   uint64
	Username string
}

UserSignUpEvent 用户注册事件

Jump to

Keyboard shortcuts

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