This commit is contained in:
Rogee
2025-01-15 15:55:49 +08:00
parent 9002862415
commit 13566cfa38
13 changed files with 1092 additions and 872 deletions

View File

@@ -0,0 +1,23 @@
package publishers
import (
"encoding/json"
"backend/app/events"
"git.ipao.vip/rogeecn/atom/contracts"
)
var _ contracts.EventPublisher = (*UserRegister)(nil)
type PostCreated struct {
ID int64 `json:"id"`
}
func (e *PostCreated) Marshal() ([]byte, error) {
return json.Marshal(e)
}
func (e *PostCreated) Topic() string {
return events.TopicPostCreated.String()
}