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 "io/fs"
 8
 9type Server interface {
10	ForgeConf() (ForgeConf, error)
11	Worktree() fs.FS
12	Webcontent() fs.FS
13	Cache() fs.FS
14	ModifyContent(filepath, content string)
15	ModifyWebContent(filepath, content string)
16	ReplaceWebContent(filepath string, oldContent string, content string)
17	ModifyCacheContent(filepath, content string)
18	CommitAllIfNeeded(message string)
19	DiffWithParent(hash string, oldFilepath string, newFilepath string) (string, error)
20	Log(message string)
21	LogError(message string, err error)
22	Merge(from string, to string)
23	Commits(from string, to string) ([]Commit, error)
24}