config.go 434 B

1234567891011121314151617181920212223
  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
  9. Subscribe []struct {
  10. Topic string
  11. Command string
  12. }
  13. }
  14. // NewConfig creates a new Config struct for a Client
  15. func NewConfig() *Config {
  16. return &Config{
  17. DefaultHost: DefaultBaseURL,
  18. Subscribe: nil,
  19. }
  20. }