2026-04-29

This commit is contained in:
2026-04-29 22:52:33 +08:00
parent e762cbdfe3
commit 3ffefa66c3
28 changed files with 1442 additions and 19 deletions

View File

@@ -0,0 +1,21 @@
package config
import (
"gitea.sunhpc.com/kelvin/sunhpc/internal/pkg/util"
)
// DHCPConf represents the configuration for the DHCP service that
// Sunhpc will configure.
type DHCPConf struct {
EnabledP *bool `yaml:"enabled,omitempty" default:"true"`
Template string `yaml:"template,omitempty" default:"default"`
RangeStart string `yaml:"range start,omitempty"`
RangeEnd string `yaml:"range end,omitempty"`
Range6Start string `yaml:"range6 start,omitempty"`
Range6End string `yaml:"range6 end,omitempty"`
SystemdName string `yaml:"systemd name,omitempty" default:"dhcpd"`
}
func (conf DHCPConf) Enabled() bool {
return util.BoolP(conf.EnabledP)
}