Documentation
¶
Index ¶
- Constants
- Variables
- func EnsureDefaultContainerTemplate(ctx context.Context, containerRepo interfaces.ContainerRepository) error
- func InstallBuiltinContainerTemplates(ctx context.Context, svc interfaces.ContainerService) error
- func NewAISummaryService(summaryRepo interfaces.AISummaryRepository, ...) interfaces.AISummaryService
- func NewAnalysisService(analysisRepo interfaces.AnalysisRepository, ...) interfaces.AnalysisService
- func NewContainerService(containerRepo interfaces.ContainerRepository, ...) interfaces.ContainerService
- func NewDataService(cfg *config.Config, dataRepo interfaces.DataRepository) interfaces.DataService
- func NewLLMService(llmRepo interfaces.LLMRepository, projectSvc interfaces.ProjectService) interfaces.LLMService
- func NewProjectService(projectRepo interfaces.ProjectRepository, ...) interfaces.ProjectService
- func NewSheetFileService(cfg *config.Config) interfaces.SheetFileService
- func NewStoreService(storeRepo interfaces.StoreRepository, projectService interfaces.ProjectService) interfaces.StoreService
- func NewUserService(configInfo *config.Config, userRepo interfaces.UserRepository, ...) interfaces.UserService
- func NewWorkflowService(workflowRepo interfaces.WorkflowRepository, ...) interfaces.WorkflowService
- func SetBuiltinContainerTemplateDir(dir string)
Constants ¶
const BuiltinContainerTemplateDir = "builtin/container_templates"
BuiltinContainerTemplateDir 是内置容器模板源码目录(相对工作目录,与内置提示词一致)。
Variables ¶
var ( ErrUnsupportedSheetFormat = errors.New("unsupported sheet format") ErrInvalidWorkbookData = errors.New("invalid workbook data") )
var ErrDatasetFileAlreadyAdded = stderrs.New("dataset file already added")
var ErrUserProjectActive = errors.New("user project is active")
ErrUserProjectActive indicates the user-project binding is still active and cannot be deleted.
Functions ¶
func EnsureDefaultContainerTemplate ¶ added in v0.2.0
func EnsureDefaultContainerTemplate(ctx context.Context, containerRepo interfaces.ContainerRepository) error
EnsureDefaultContainerTemplate 在没有任何默认模板时,把库里最早的绑定行设为默认。
仅在服务启动时调用(存量数据没有默认标记,否则 create_script 无法解析默认值)。 已存在默认行时不做任何改动,因此不会覆盖用户在 UI 上的选择。
func InstallBuiltinContainerTemplates ¶ added in v0.2.0
func InstallBuiltinContainerTemplates(ctx context.Context, svc interfaces.ContainerService) error
InstallBuiltinContainerTemplates 把内置容器模板逐个导入数据库(系统启动时调用)。
读取顺序与内置提示词 / 技能一致:先读磁盘 <base>/builtin/container_templates/*.json (便于运维直接修改部署目录里的文件),目录不存在时回退到编译进二进制的内嵌副本。
每个文件是一次独立的 InstallContainerAssets(各自一个事务内按主键 upsert), 某个文件失败时记录日志并继续处理后面的文件;返回第一个错误,便于测试断言。
func NewAISummaryService ¶ added in v0.1.2
func NewAISummaryService( summaryRepo interfaces.AISummaryRepository, containerRepo interfaces.ContainerRepository, projectRepo interfaces.ProjectRepository, content manager.AISummaryContentProvider, analysisRepo interfaces.AnalysisRepository, cfg *config.Config, agentSvc *agentservice.AgentService, ) interfaces.AISummaryService
func NewAnalysisService ¶
func NewAnalysisService( analysisRepo interfaces.AnalysisRepository, workflowRepo interfaces.WorkflowRepository, projectRepo interfaces.ProjectRepository, containerService interfaces.ContainerService, cfg *config.Config, ) interfaces.AnalysisService
func NewContainerService ¶
func NewContainerService(containerRepo interfaces.ContainerRepository, containerMgr *manager.ContainerManager, config *config.Config) interfaces.ContainerService
func NewDataService ¶
func NewDataService(cfg *config.Config, dataRepo interfaces.DataRepository) interfaces.DataService
func NewLLMService ¶
func NewLLMService(llmRepo interfaces.LLMRepository, projectSvc interfaces.ProjectService) interfaces.LLMService
func NewProjectService ¶
func NewProjectService( projectRepo interfaces.ProjectRepository, analysisRepo interfaces.AnalysisRepository, summaryRepo interfaces.AISummaryRepository, dataRepo interfaces.DataRepository, cfg *config.Config, ) interfaces.ProjectService
func NewSheetFileService ¶
func NewSheetFileService(cfg *config.Config) interfaces.SheetFileService
func NewStoreService ¶
func NewStoreService(storeRepo interfaces.StoreRepository, projectService interfaces.ProjectService) interfaces.StoreService
func NewUserService ¶
func NewUserService( configInfo *config.Config, userRepo interfaces.UserRepository, tokenRepo interfaces.AuthTokenRepository, ) interfaces.UserService
NewUserService creates a new user service instance
func NewWorkflowService ¶
func NewWorkflowService( workflowRepo interfaces.WorkflowRepository, containerRepo interfaces.ContainerRepository, projectRepo interfaces.ProjectRepository, analysisRepo interfaces.AnalysisRepository, cfg *config.Config, ) interfaces.WorkflowService
func SetBuiltinContainerTemplateDir ¶ added in v0.2.0
func SetBuiltinContainerTemplateDir(dir string)
SetBuiltinContainerTemplateDir 覆盖内置容器模板源码目录(空串表示恢复默认)。 仅用于测试或自定义部署目录;非并发安全,应在服务启动前调用。
Types ¶
This section is empty.