Documentation
¶
Overview ¶
call_resource包提供资源调用和HTTP服务功能
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResourceHandler ¶
func NewResourceHandler(webEngine *web_engine.WebEngine, frontendFiles embed.FS, iconData embed.FS) backend.CallResourceHandler
NewResourceHandler 创建一个新的资源处理器
func ServeFrontendFiles ¶
func ServeFrontendFiles(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc
ServeFrontendFiles 创建一个用于服务前端文件的中间件
Types ¶
type ServeFileSystem ¶
type ServeFileSystem interface {
// 继承http.FileSystem接口
http.FileSystem
// 检查路径是否存在
Exists(prefix string, path string) bool
}
ServeFileSystem 定义文件服务的接口
func EmbedFolder ¶
func EmbedFolder(fsEmbed embed.FS, targetPath string) ServeFileSystem
EmbedFolder 将嵌入式文件系统的子目录转换为ServeFileSystem接口
Click to show internal directories.
Click to hide internal directories.