Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTemplateManager ¶
func SetTemplateManager(tm *TemplateManager)
Types ¶
type Controller ¶
type Controller struct{}
func (*Controller) Render ¶
func (c *Controller) Render(ctx *gin.Context, template string, data any)
func (*Controller) RenderStatus ¶
type ControllerConfig ¶
type ControllerConfig struct {
// contains filtered or unexported fields
}
func NewControllerConfig ¶
func NewControllerConfig(controller ControllerInterface, options ...ControllerOption) *ControllerConfig
type ControllerGroup ¶
type ControllerGroup struct {
// contains filtered or unexported fields
}
func NewControllerGroup ¶
func NewControllerGroup(controllers ...*ControllerConfig) *ControllerGroup
func (*ControllerGroup) AddController ¶
func (cg *ControllerGroup) AddController(ctrl ControllerInterface, options ...ControllerOption) *ControllerGroup
func (*ControllerGroup) AddControllerConfig ¶
func (cg *ControllerGroup) AddControllerConfig(config *ControllerConfig) *ControllerGroup
func (*ControllerGroup) RegisterRoutes ¶
func (cg *ControllerGroup) RegisterRoutes(router gin.IRouter)
type ControllerInterface ¶
type ControllerOption ¶
type ControllerOption func(*ControllerConfig)
func WithMiddleWare ¶
func WithMiddleWare(middleWare ...gin.HandlerFunc) ControllerOption
func WithRoutePrefix ¶
func WithRoutePrefix(prefix string) ControllerOption
type TemplateManager ¶
type TemplateManager struct {
// contains filtered or unexported fields
}
func GetTemplateManager ¶
func GetTemplateManager() *TemplateManager
func NewTemplateManager ¶
func NewTemplateManager(templateDir string) *TemplateManager
func (*TemplateManager) Add ¶
func (tm *TemplateManager) Add(filename string) error
func (*TemplateManager) Load ¶
func (tm *TemplateManager) Load() error
Click to show internal directories.
Click to hide internal directories.