modify projects

This commit is contained in:
yanghao05
2023-04-20 14:05:22 +08:00
parent c35644377a
commit da7cde1149
6 changed files with 17 additions and 44 deletions

View File

@@ -6,4 +6,5 @@ type Route interface {
type Service interface {
Serve() error
GetEngine() interface{}
}

View File

@@ -21,6 +21,10 @@ func (e *Service) Use(middleware ...gin.HandlerFunc) gin.IRoutes {
return e.Engine.Use(middleware...)
}
func (e *Service) GetEngine() interface{} {
return e.Engine
}
func (e *Service) Serve() error {
if e.conf.Https {
return e.Engine.RunTLS(e.conf.PortString(), e.conf.HttpsCert, e.conf.HttpKey)