add backend tpl

This commit is contained in:
Rogee
2024-11-28 23:18:11 +08:00
parent 77e962b668
commit f7d95418a2
86 changed files with 3229 additions and 135 deletions

23
backend/services/http.go Normal file
View File

@@ -0,0 +1,23 @@
package services
import (
"backend/providers/http"
"git.ipao.vip/rogeecn/atom/container"
"git.ipao.vip/rogeecn/atom/contracts"
"go.uber.org/dig"
)
type Http struct {
dig.In
Service http.Service
Initials []contracts.Initial `group:"initials"`
Routes []http.Route `group:"routes"`
}
func Serve() error {
return container.Container.Invoke(func(http Http) error {
return http.Service.Serve()
})
}