fix: issues
This commit is contained in:
15
templates/project/pkg/atom/contracts/cron_job.go.tpl
Normal file
15
templates/project/pkg/atom/contracts/cron_job.go.tpl
Normal 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
|
||||
}
|
||||
14
templates/project/pkg/atom/contracts/events.go.tpl
Normal file
14
templates/project/pkg/atom/contracts/events.go.tpl
Normal 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)
|
||||
}
|
||||
10
templates/project/pkg/atom/contracts/http.go.tpl
Normal file
10
templates/project/pkg/atom/contracts/http.go.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
package contracts
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
type HttpRoute interface {
|
||||
Register(fiber.Router)
|
||||
Name() string
|
||||
}
|
||||
3
templates/project/pkg/atom/contracts/misc.go.tpl
Normal file
3
templates/project/pkg/atom/contracts/misc.go.tpl
Normal file
@@ -0,0 +1,3 @@
|
||||
package contracts
|
||||
|
||||
type Initial interface{}
|
||||
Reference in New Issue
Block a user