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: EUPL-1.2
4
5package configuration
6
7type ExecConf struct {
8 BareMetal BareMetalConf
9 Bwrap BwrapConf
10 Container ContainerConf
11 Ssh SshConf
12}
13
14var ExecDefaultConf = ExecConf{
15 BareMetal: BareMetalDefaultConf,
16 Bwrap: BwrapDefaultConf,
17 Container: ContainerDefaultConf,
18 Ssh: SshDefaultConf,
19}
20
21type BareMetalConf struct {
22 Enabled bool
23}
24
25var BareMetalDefaultConf = BareMetalConf{
26 Enabled: false,
27}
28
29type BwrapConf struct {
30 Enabled bool
31 User string
32 Uid int
33 Gid int
34 RoBind []string
35 Bind []string
36}
37
38var BwrapDefaultConf = BwrapConf{
39 Enabled: false,
40 User: "nobody",
41 Uid: 65534,
42 Gid: 65534,
43}
44
45type ContainerConf struct {
46 Enabled bool
47 Bin string
48}
49
50var ContainerDefaultConf = ContainerConf{
51 Enabled: false,
52 Bin: "podman",
53}
54
55type SshConf struct {
56 Enabled bool
57 Hosts []Host
58}
59
60type Host struct {
61 User string
62 Address string
63 Port int
64 PublicKey string
65}
66
67var SshDefaultConf = SshConf{
68 Enabled: false,
69 Hosts: []Host{{User: "myUSer", Address: "127.0.0.1", Port: 22, PublicKey: "ssh-ed25519 AAAAC3NzaC1..."}},
70}