package main

import (
	"github.com/tech/sendico/notification/internal/appversion"
	si "github.com/tech/sendico/notification/internal/server"
	"github.com/tech/sendico/pkg/mlogger"
	"github.com/tech/sendico/pkg/server"
	smain "github.com/tech/sendico/pkg/server/main"
)

// generate translations
//go:generate Users/stephandeshevikh/go/bin/go18n extract
//go:generate Users/stephandeshevikh/go/bin/go18n merge

// lint go code
// docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run -v --timeout 10m0s --enable-all -D ireturn -D wrapcheck -D varnamelen -D tagliatelle -D nosnakecase -D gochecknoglobals -D nlreturn -D stylecheck -D lll -D wsl -D scopelint -D varcheck -D exhaustivestruct -D golint -D maligned -D interfacer -D ifshort -D structcheck -D deadcode -D godot -D depguard -D tagalign

// gofumpt source files
//go:generate /Users/stephandeshevikh/go/bin/gofumpt -w .

// gci source files
//go:generate /Users/stephandeshevikh/go/bin/gci write .

// get new ampli events
//go:generate ampli pull backend --path ./internal/ampli

func factory(logger mlogger.Logger, file string, debug bool) (server.Application, error) {
	return si.Create(logger, file, debug)
}

func main() {
	smain.RunServer("notification", appversion.Create(), factory)
}
