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
7type Server interface {
8 PluginOption(opts ...PluginOptionWith)
9 ForgeConf() (ForgeConf, error)
10 Worktree() *GrFs
11 Webcontent() *GrFs
12 Cache() *GrFs
13 CommitAllIfNeeded(message string)
14 DiffWithParent(hash string, oldFilepath string, newFilepath string) (string, error)
15 Log(message string)
16 LogError(message string, err error)
17 Merge(from string, to string)
18 Commits(from string, to string) ([]Commit, error)
19 Exec(exec Exec) (ExecStatus, error)
20 Report(level ReportLevel, content []string) error
21 CanCallFunc(plugin string, name string, args map[string]string) bool
22 ExportFunc(name string, callback func(args map[string]string) (map[string]string, error))
23 CallFunc(plugin string, name string, args map[string]string) (map[string]string, error)
24 HttpClient(header map[string][]string) HttpClient
25}