Sybren A. Stüvel 9f5e4cc0cc License: license all code under "GPL-3.0-or-later"
The add-on code was copy-pasted from other addons and used the GPL v2
license, whereas by accident the LICENSE text file had the GNU "Affero" GPL
license v3 (instead of regular GPL v3).

This is now all streamlined, and all code is licensed as "GPL v3 or later".

Furthermore, the code comments just show a SPDX License Identifier
instead of an entire license block.
2022-03-07 15:26:46 +01:00

32 lines
600 B
Go

package config
// SPDX-License-Identifier: GPL-3.0-or-later
// Service provides access to Flamenco Manager configuration.
type Service struct {
config Conf
}
func NewService() *Service {
return &Service{
config: DefaultConfig(),
}
}
func (s *Service) Load() error {
config, err := getConf()
if err != nil {
return err
}
s.config = config
return nil
}
func (s *Service) ExpandVariables(valueToExpand string, audience VariableAudience, platform string) string {
return s.config.ExpandVariables(valueToExpand, audience, platform)
}
func (s *Service) Get() *Conf {
return &s.config
}