refactor!: Use gin router instead chi router
- Removed chi dependencies - Updated router registration logic
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/go-andiamo/chioas"
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
// SecuredController - means, controller has middlewares
|
||||
// Maybe should rename it later
|
||||
type SecuredController interface {
|
||||
Middlewares() []gin.HandlerFunc
|
||||
}
|
||||
|
||||
type DocumentateController interface {
|
||||
Documentate() (*chioas.Paths, *chioas.Components)
|
||||
}
|
||||
|
||||
type Controller interface {
|
||||
New() Controller
|
||||
Group(r chi.Router)
|
||||
Documentate() (*chioas.Paths, *chioas.Components)
|
||||
Handler() gin.HandlerFunc
|
||||
Method() string
|
||||
Path() string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user