2 Commits

2 changed files with 6 additions and 2 deletions

View File

@@ -4,11 +4,15 @@ import "github.com/ThreeDotsLabs/watermill/message"
type EventHandler interface {
Topic() string
PublishToTopic() string
Channel() Channel
PublishTo() (Channel, string)
Handler(msg *message.Message) ([]*message.Message, error)
}
type Channel string
type EventPublisher interface {
Topic() string
Channel() Channel
Marshal() ([]byte, error)
}

View File

@@ -14,7 +14,7 @@ func File[T any](key string) func(fiber.Ctx) (*multipart.FileHeader, error) {
}
}
func Local[T any](key string) func(fiber.Ctx) (T, error) {
func Local[T any](key any) func(fiber.Ctx) (T, error) {
return func(ctx fiber.Ctx) (T, error) {
v := fiber.Locals[T](ctx, key)
return v, nil