diff --git a/agent/notify/unimplemented.go b/agent/notify/unimplemented.go index 330e995..badac69 100644 --- a/agent/notify/unimplemented.go +++ b/agent/notify/unimplemented.go @@ -1,4 +1,4 @@ -//go:build windows || darwin +//go:build darwin package notify diff --git a/agent/notify/windows.go b/agent/notify/windows.go new file mode 100644 index 0000000..7c6e0c9 --- /dev/null +++ b/agent/notify/windows.go @@ -0,0 +1,24 @@ +//go:build windows + +package notify + +import ( + "time" + + "gopkg.in/toast.v1" +) + +func Notify(title string, body string, actionName string, timeout time.Duration, onclose func()) error { + notification := toast.Notification{ + AppID: "Goldwarden", + Title: title, + Message: body, + Audio: toast.Silent, + } + + return notification.Push() +} + +func ListenForNotifications() error { + return nil +}