config.go 559 B

123456789101112131415161718192021222324
  1. package client
  2. const (
  3. // DefaultBaseURL is the base URL used to expand short topic names
  4. DefaultBaseURL = "https://ntfy.sh"
  5. )
  6. // Config is the config struct for a Client
  7. type Config struct {
  8. DefaultHost string `yaml:"default-host"`
  9. Subscribe []struct {
  10. Topic string `yaml:"topic"`
  11. Command string `yaml:"command"`
  12. // If []map[string]string TODO This would be cool
  13. } `yaml:"subscribe"`
  14. }
  15. // NewConfig creates a new Config struct for a Client
  16. func NewConfig() *Config {
  17. return &Config{
  18. DefaultHost: DefaultBaseURL,
  19. Subscribe: nil,
  20. }
  21. }