github.com/wtfutil/wtf@v0.43.0/modules/weatherservices/arpansagovau/settings.go (about)

     1  package arpansagovau
     2  
     3  import (
     4  	"github.com/olebedev/config"
     5  	"github.com/wtfutil/wtf/cfg"
     6  )
     7  
     8  const (
     9  	defaultFocusable = false
    10  	defaultTitle     = "ARPANSA UV Data"
    11  )
    12  
    13  type Settings struct {
    14  	*cfg.Common
    15  
    16  	city string
    17  }
    18  
    19  func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
    20  	settings := Settings{
    21  		Common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
    22  		city:   ymlConfig.UString("locationid"),
    23  	}
    24  
    25  	settings.SetDocumentationPath("weather_services/arpansagovau")
    26  
    27  	return &settings
    28  }