Versions in this module Expand all Collapse all v0 v0.0.9 Oct 27, 2026 Changes in this version + var ErrEngineClosed = errors.New("engine is closed") + var ErrInvalidOptions = errors.New("invalid options") + var ErrPromptsFSNotSet = errors.New("prompts filesystem not set, call SetPromptsFS() first") + type AddRepoOptions struct + Branch string + Local bool + Name string + ProjectDir string + Target string + Update bool + type AddRepoResult struct + RefName string + RefType RefType + type DoctorCheck struct + Details string + Group string + Name string + Status string + type DoctorResult struct + Checks []DoctorCheck + Summary string + type Engine struct + func New(opts Options) (*Engine, error) + func (e *Engine) AddRepo(ctx context.Context, opts AddRepoOptions) (*AddRepoResult, error) + func (e *Engine) Close() error + func (e *Engine) Doctor(ctx context.Context, projectDir string) (*DoctorResult, error) + func (e *Engine) GetAppConfig() *models.AppConfig + func (e *Engine) GetDB() *gorm.DB + func (e *Engine) GetLogger() *zap.Logger + func (e *Engine) GetRepoIndexer() *repo.RepoIndexer + func (e *Engine) Inject(ctx context.Context, projectDir string) (string, error) + func (e *Engine) ListRepos(ctx context.Context, projectDir string) (*ListReposResult, error) + func (e *Engine) RemoveRepo(ctx context.Context, opts RemoveRepoOptions) error + func (e *Engine) SCC(repoPath string) (*SCCResult, error) + func (e *Engine) SetPromptsFS(fs interface{ ... }) + func (e *Engine) UpdateRepos(ctx context.Context, opts UpdateReposOptions) error + type ListReposResult struct + Repos []RepoItem + type Options struct + AppDir string + DB *gorm.DB + LocalWikiPath string + Logger *zap.Logger + PromptsFS fs.FS + Proxy ProxyOptions + ReposPath string + WikiPath string + func (o *Options) Validate() error + type ProxyOptions struct + Git string + HTTP string + type RefType string + const RefTypeLocal + const RefTypeRemote + type RemoveRepoOptions struct + All bool + Clean bool + Identifier string + ProjectDir string + Purge bool + Yes bool + type RepoInfo struct + Branch string + CachePath string + Commit string + CommitAt *time.Time + CreatedAt time.Time + Host string + ID uint + LinkName string + LocalPath string + Namespace string + ProjectDir string + RefName string + RefType RefType + RemoteURL string + RepoName string + UpdatedAt time.Time + WikiSubPath string + type RepoItem struct + Branch string + CachePath string + CommitAt string + Name string + Source string + Type string + type SCCFileStat struct + Code int + Complex int + File string + Language string + Type string + type SCCLangStat struct + Code int + Complex int + Count int + Name string + Type string + type SCCResult struct + Langs []SCCLangStat + Path string + Repo string + TopFiles []SCCFileStat + type UpdateReposOptions struct + Identifier string + ProjectDir string