light-core/lightCore/IClass.go
2024-12-17 22:28:48 +08:00

25 lines
490 B
Go

package lightCore
import "github.com/gin-gonic/gin"
type IClass interface {
Build(core *LightCore)
}
type ClassMounts struct {
handles []IClass
errorHandler []gin.HandlerFunc
}
func NewClassMounts(handles []IClass, errorHandler []gin.HandlerFunc) *ClassMounts {
return &ClassMounts{handles: handles, errorHandler: errorHandler}
}
func (t *ClassMounts) Handles() []IClass {
return t.handles
}
func (t *ClassMounts) ErrorHandler() []gin.HandlerFunc {
return t.errorHandler
}