diff options
Diffstat (limited to 'template/args/args.go')
-rw-r--r-- | template/args/args.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/template/args/args.go b/template/args/args.go index 6e4aff1..dcba9f7 100644 --- a/template/args/args.go +++ b/template/args/args.go @@ -4,6 +4,7 @@ import ( "flag" "fmt" "os" + "strings" "sync" ) @@ -15,6 +16,10 @@ type Arguments struct { Migrate bool Scheduler bool + NtfyEndpoint string + NtfyTopics []string + NtfyListener bool + Port int Server bool } @@ -56,6 +61,10 @@ func GetArgs() (*Arguments, error) { templatePath := flag.String("template-path", "./templates", "Path to the template directory") staticPath := flag.String("static-path", "./static", "Path to the static directory") + ntfyEndpoint := flag.String("ntfy-endpoint", "https://ntfy.simponic.hatecomputers.club", "NTFY Endpoint") + ntfyTopics := flag.String("ntfy-topics", "testtopic", "Comma-separated NTFY Topics") + ntfyListener := flag.Bool("ntfy-listener", false, "Listen to NTFY Topic and propagate messages") + scheduler := flag.Bool("scheduler", false, "Run scheduled jobs via cron") migrate := flag.Bool("migrate", false, "Run the migrations") @@ -72,6 +81,9 @@ func GetArgs() (*Arguments, error) { Server: *server, Migrate: *migrate, Scheduler: *scheduler, + NtfyEndpoint: *ntfyEndpoint, + NtfyTopics: strings.Split(*ntfyTopics, ","), + NtfyListener: *ntfyListener, } err := validateArgs(args) if err != nil { |