| 1 |
package logger |
| 2 |
|
| 3 |
import ( |
| 4 |
"net/url" |
| 5 |
|
| 6 |
"github.com/nicholas-fedor/shoutrrr/pkg/services/standard" |
| 7 |
) |
| 8 |
|
| 9 |
// Config is the configuration object for the Logger Service. |
| 10 |
type Config struct { |
| 11 |
standard.EnumlessConfig |
| 12 |
} |
| 13 |
|
| 14 |
const ( |
| 15 |
// Scheme is the identifying part of this service's configuration URL. |
| 16 |
Scheme = "logger" |
| 17 |
) |
| 18 |
|
| 19 |
// GetURL returns a URL representation of it's current field values. |
| 20 |
func (c *Config) GetURL() *url.URL { |
| 21 |
return &url.URL{ |
| 22 |
Scheme: Scheme, |
| 23 |
Opaque: "//", // Ensures "logger://" output |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
// SetURL updates a ServiceConfig from a URL representation of it's field values. |
| 28 |
func (c *Config) SetURL(_ *url.URL) error { |
| 29 |
return nil |
| 30 |
} |