25 lines
490 B
Go
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
|
|
}
|