Files
photoprism/internal/config/client_ext.go
2025-10-19 21:08:48 +02:00

26 lines
560 B
Go

package config
// ClientExt collects optional client config values provided by registered extensions.
func ClientExt(c *Config, t ClientType) Values {
bootConfigs := Ext(StageBoot)
initConfigs := Ext(StageInit)
result := make(Values, len(bootConfigs)+len(initConfigs))
for _, conf := range bootConfigs {
if conf.clientValues == nil {
continue
}
result[conf.name] = conf.clientValues(c, t)
}
for _, conf := range initConfigs {
if conf.clientValues == nil {
continue
}
result[conf.name] = conf.clientValues(c, t)
}
return result
}