feat:pull the slack message service out to slack pkg

Signed-off-by: manish-singh-bisht <mthefool218@gmail.com>
This commit is contained in:
manish-singh-bisht
2025-12-09 13:42:21 +05:30
committed by Émile Ré
parent 7cb6edcbb5
commit 8eeab0a6d0
16 changed files with 353 additions and 101 deletions

View File

@@ -0,0 +1,26 @@
package slack_v1
import (
"github.com/go-chi/chi/v5"
"go.gearno.de/kit/log"
"go.probo.inc/probo/pkg/slack"
"go.probo.inc/probo/pkg/trust"
)
func NewMux(
logger *log.Logger,
slackSvc *slack.Service,
trustSvc *trust.Service,
) *chi.Mux {
r := chi.NewMux()
logger.Info("Registering Slack interactive endpoint")
r.Post("/interactive", SlackHandler(
slackSvc,
slackSvc.GetSlackSigningSecret(),
logger,
trustSvc,
))
return r
}