21 lines
562 B
Go
21 lines
562 B
Go
package svc
|
|||
|
|
|
||
|
|
import (
|
||
|
|
"io/fs"
|
||
|
|
|
||
|
|
"bj_power_workstation/internal/config"
|
||
|
|
"bj_power_workstation/internal/mes"
|
||
|
|
"bj_power_workstation/internal/pdfcache"
|
||
|
|
"bj_power_workstation/internal/store"
|
||
|
|
"bj_power_workstation/internal/syncer"
|
||
|
|
)
|
||
|
|
|
||
|
|
// ServiceContext 服务上下文:配置 + 本地存储 + MES 客户端 + 同步器 + PDF 缓存 + 前端静态资源
|
||
|
|
type ServiceContext struct {
|
||
|
|
Config config.Config
|
||
|
|
Store *store.Store
|
||
|
|
Mes *mes.Client
|
||
|
|
Syncer *syncer.Syncer
|
||
|
|
PdfCache *pdfcache.Cache
|
||
|
|
WebFS fs.FS // go:embed 的 web/static 子文件系统
|
||
|
|
}
|