mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 10:09:54 +08:00
增加前台模块,添加实例html模板页面
This commit is contained in:
41
server/internal/service/view.go
Normal file
41
server/internal/service/view.go
Normal file
@@ -0,0 +1,41 @@
|
||||
// ================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IView interface {
|
||||
GetBreadCrumb(ctx context.Context, in *model.ViewGetBreadCrumbInput) []model.ViewBreadCrumb
|
||||
GetTitle(ctx context.Context, in *model.ViewGetTitleInput) string
|
||||
RenderTpl(ctx context.Context, tpl string, data ...model.View)
|
||||
Render(ctx context.Context, data ...model.View)
|
||||
Render302(ctx context.Context, data ...model.View)
|
||||
Render401(ctx context.Context, data ...model.View)
|
||||
Render403(ctx context.Context, data ...model.View)
|
||||
Render404(ctx context.Context, data ...model.View)
|
||||
Render500(ctx context.Context, data ...model.View)
|
||||
Error(ctx context.Context, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localView IView
|
||||
)
|
||||
|
||||
func View() IView {
|
||||
if localView == nil {
|
||||
panic("implement not found for interface IView, forgot register?")
|
||||
}
|
||||
return localView
|
||||
}
|
||||
|
||||
func RegisterView(i IView) {
|
||||
localView = i
|
||||
}
|
Reference in New Issue
Block a user