You've already forked ddns-updater
Added ability to set/add Webhook Token in payload
This commit is contained in:
@@ -15,6 +15,10 @@ const (
|
||||
configDelimiter = "@"
|
||||
)
|
||||
|
||||
type Doer interface {
|
||||
Do(*http.Request) (*http.Response, error)
|
||||
}
|
||||
|
||||
type Notifiers []Notifier
|
||||
|
||||
func (n Notifiers) NotifyWithLog(ctx context.Context, notification Notification) error {
|
||||
@@ -30,11 +34,12 @@ func (n Notifiers) NotifyWithLog(ctx context.Context, notification Notification)
|
||||
}
|
||||
|
||||
type Notification struct {
|
||||
OldIp net.IP `json:"old_ip,omitempty"`
|
||||
NewIp net.IP `json:"new_ip"`
|
||||
CheckedAt time.Time `json:"checked_at"`
|
||||
ResolverTag string `json:"resolver_tag"`
|
||||
Domain string `json:"domain"`
|
||||
OldIp net.IP `json:"old_ip,omitempty"`
|
||||
NewIp net.IP `json:"new_ip"`
|
||||
CheckedAt time.Time `json:"checked_at"`
|
||||
ResolverTag string `json:"resolver_tag"`
|
||||
Domain string `json:"domain"`
|
||||
WebhookToken string `json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (n Notification) ToSlice() []string {
|
||||
|
||||
Reference in New Issue
Block a user