package json import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/temp_models/db" type GameOptions struct { Language string `json:"language"` Port int `json:"port"` RoutePrefix any `json:"routePrefix"` UpdateChannel string `json:"updateChannel"` } func (g *GameOptions) ToDB(dest *db.GameOptions) bool { if dest == nil { return false } dest.Language = g.Language dest.Port = g.Port dest.UpdateChannel = g.UpdateChannel return true } type SetupOptions struct { AwsConfig any `json:"awsConfig"` CompressSocket bool `json:"compressSocket"` CompressStatic bool `json:"compressStatic"` CSSTheme string `json:"cssTheme"` DataPath string `json:"dataPath"` Fullscreen bool `json:"fullscreen"` Hostname string `json:"hostname"` HotReload bool `json:"hotReload"` Language string `json:"language"` LocalHostname string `json:"localHostname"` // PasswordSalt any `json:"passwordSalt"` Port int `json:"port"` // Protocol any `json:"protocol"` // ProxyPort any `json:"proxyPort"` ProxySSL bool `json:"proxySSL"` // RoutePrefix any `json:"routePrefix"` // SslCert any `json:"sslCert"` // SslKey any `json:"sslKey"` Telemetry bool `json:"telemetry"` UpdateChannel string `json:"updateChannel"` Upnp bool `json:"upnp"` // UpnpLeaseDuration any `json:"upnpLeaseDuration"` // World any `json:"world"` DeleteNEDB bool `json:"deleteNEDB"` // AdminPassword string `json:"adminPassword"` NoBackups bool `json:"noBackups"` } func (s *SetupOptions) ToDB(dest *db.SetupOptions) bool { if dest == nil { return false } dest.CompressSocket = s.CompressSocket dest.CompressStatic = s.CompressStatic dest.CSSTheme = s.CSSTheme dest.DataPath = s.DataPath dest.Fullscreen = s.Fullscreen dest.Hostname = s.Hostname dest.HotReload = s.HotReload dest.Language = s.Language dest.LocalHostname = s.LocalHostname dest.Port = s.Port dest.ProxySSL = s.ProxySSL dest.Telemetry = s.Telemetry dest.UpdateChannel = s.UpdateChannel dest.Upnp = s.Upnp dest.DeleteNEDB = s.DeleteNEDB dest.NoBackups = s.NoBackups return true }