GitRoot
craft your forge, build your project, grow your community freely
1// SPDX-FileCopyrightText: 2025 Romain Maneschi <romain@gitroot.dev>
2//
3// SPDX-License-Identifier: MIT
4
5package model
6
7import (
8 "io/fs"
9)
10
11type Server interface {
12 PluginOption(opts ...PluginOptionWith)
13 ForgeConf() (ForgeConf, error)
14 Worktree() fs.FS
15 Webcontent() fs.FS
16 Cache() fs.FS
17 ModifyContent(filepath, content string)
18 ModifyWebContent(filepath, content string)
19 ReplaceWebContent(filepath string, oldContent string, content string)
20 ModifyCacheContent(filepath, content string)
21 CommitAllIfNeeded(message string)
22 DiffWithParent(hash string, oldFilepath string, newFilepath string) (string, error)
23 Log(message string)
24 LogError(message string, err error)
25 Merge(from string, to string)
26 Commits(from string, to string) ([]Commit, error)
27 Exec(exec Exec) (ExecStatus, error)
28 Report(level ReportLevel, content []string) error
29}