snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s

This commit is contained in:
upstream-mirror
2026-09-15 21:27:46 +05:00
commit ce933d1277
538 changed files with 46504 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
package main
import "time"
var allReactions = []Reaction{
{
ID: "fire",
Label: "🔥",
},
{
ID: "thinking",
Label: "🤔",
},
{
ID: "heart",
Label: "🩵",
},
{
ID: "laugh",
Label: "😂",
},
{
ID: "sad",
Label: "😢",
},
}
func mustReactionByID(id string) Reaction {
for _, r := range allReactions {
if r.ID == id {
return r
}
}
panic("reaction not found")
}
type Reaction struct {
ID string
Label string
}
type Post struct {
ID int
Author string
Content string
CreatedAt time.Time
Views int
Reactions map[string]int
}
type PostStats struct {
ID int
Views int
ViewsUpdated bool
Reactions map[string]int
ReactionUpdated *string
}