// SPDX-FileCopyrightText: 2025 Romain Maneschi // // SPDX-License-Identifier: MIT package model type Server interface { PluginOption(opts ...PluginOptionWith) ForgeConf() (ForgeConf, error) Worktree() *GrFs Webcontent() *GrFs Cache() *GrFs // TODO delete after v0.4 is released // // Deprecated: Use Worktree().WriteContent(filepath, content string) instead ModifyContent(filepath, content string) // TODO delete after v0.4 is released // // Deprecated: Use Webcontent().WriteContent(filepath, content string) instead ModifyWebContent(filepath, content string) // TODO delete after v0.4 is released // // Deprecated: Use Webcontent().ReplaceContent(filepath string, oldContent string, content string) instead ReplaceWebContent(filepath string, oldContent string, content string) // TODO delete after v0.4 is released // // Deprecated: Use Cache().WriteContent(filepath, content string) instead ModifyCacheContent(filepath, content string) CommitAllIfNeeded(message string) DiffWithParent(hash string, oldFilepath string, newFilepath string) (string, error) Log(message string) LogError(message string, err error) Merge(from string, to string) Commits(from string, to string) ([]Commit, error) Exec(exec Exec) (ExecStatus, error) Report(level ReportLevel, content []string) error CanCallFunc(plugin string, name string, args map[string]string) bool ExportFunc(name string, callback func(args map[string]string) (map[string]string, error)) CallFunc(plugin string, name string, args map[string]string) (map[string]string, error) }