This commit is contained in:
2025-12-17 00:42:01 +08:00
commit 990963cd70
9 changed files with 219 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
// Code scaffolded by goctl. Safe to edit.
// goctl 1.9.2
package svc
import (
"github.com/zeromicro/go-zero/rest"
"hd4k-downloader/internal/config"
"hd4k-downloader/internal/middleware"
)
type ServiceContext struct {
Config config.Config
Cors rest.Middleware
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
Cors: middleware.NewCorsMiddleware().Handle,
}
}