refactor: remove pocketbase (#1138)

This commit is contained in:
Jonas Plum
2025-09-02 21:58:08 +02:00
committed by GitHub
parent f28c238135
commit eba2615ec0
435 changed files with 42677 additions and 4730 deletions

17
app/hook/hook.go Normal file
View File

@@ -0,0 +1,17 @@
package hook
import "context"
type Hook struct {
subscribers []func(ctx context.Context, table string, record any)
}
func (h *Hook) Publish(ctx context.Context, table string, record any) {
for _, subscriber := range h.subscribers {
subscriber(ctx, table, record)
}
}
func (h *Hook) Subscribe(fn func(ctx context.Context, table string, record any)) {
h.subscribers = append(h.subscribers, fn)
}