fix: issues

This commit is contained in:
Rogee
2025-01-23 19:03:17 +08:00
parent ec1356210e
commit ea06d7212c
8 changed files with 381 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package contracts
import (
"time"
"github.com/riverqueue/river"
)
type CronJob interface {
Description() string
Periodic() time.Duration
JobArgs() []river.JobArgs
InsertOpts() *river.InsertOpts
RunOnStart() bool
}

View File

@@ -0,0 +1,14 @@
package contracts
import "github.com/ThreeDotsLabs/watermill/message"
type EventHandler interface {
Topic() string
PublishToTopic() string
Handler(msg *message.Message) ([]*message.Message, error)
}
type EventPublisher interface {
Topic() string
Marshal() ([]byte, error)
}

View File

@@ -0,0 +1,10 @@
package contracts
import (
"github.com/gofiber/fiber/v3"
)
type HttpRoute interface {
Register(fiber.Router)
Name() string
}

View File

@@ -0,0 +1,3 @@
package contracts
type Initial interface{}