Compare commits
2 Commits
f9e82eba02
...
v1.1.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
205c08b00d | ||
|
|
dad2a26611 |
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user