[BREAKING] changed notification config format, support multiple notification providers, support webhook and markdown style notification

This commit is contained in:
yusing
2024-11-30 06:44:49 +08:00
parent fb9de4c4ad
commit 25eeabb9f9
12 changed files with 522 additions and 99 deletions

23
internal/notif/color.go Normal file
View File

@@ -0,0 +1,23 @@
package notif
import "fmt"
type Color uint
const (
Red Color = 0xff0000
Green Color = 0x00ff00
Blue Color = 0x0000ff
)
func (c Color) HexString() string {
return fmt.Sprintf("#%x", c)
}
func (c Color) DecString() string {
return fmt.Sprintf("%d", c)
}
func (c Color) String() string {
return c.HexString()
}