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

@@ -342,6 +342,15 @@ func (impl *Implm) Run(
return fmt.Errorf("cannot initialize ACME service: %w", err)
}
slackService := slack.NewService(
pgClient,
impl.cfg.GetSlackSigningSecret(),
impl.cfg.BaseURL.String(),
impl.cfg.EncryptionKey,
impl.cfg.Auth.Cookie.Secret,
l.Named("slack"),
)
proboService, err := probo.NewService(
ctx,
impl.cfg.EncryptionKey,
@@ -358,6 +367,7 @@ func (impl *Implm) Run(
authService,
authzService,
l.Named("probo"),
slackService,
)
if err != nil {
return fmt.Errorf("cannot create probo service: %w", err)
@@ -370,7 +380,6 @@ func (impl *Implm) Run(
impl.cfg.BaseURL.String(),
impl.cfg.EncryptionKey,
impl.cfg.TrustAuth.TokenSecret,
impl.cfg.GetSlackSigningSecret(),
authService,
html2pdfConverter,
fileManagerService,
@@ -380,6 +389,7 @@ func (impl *Implm) Run(
TokenDuration: time.Duration(impl.cfg.TrustAuth.TokenDuration) * time.Hour,
TokenType: impl.cfg.TrustAuth.TokenType,
},
slackService,
)
serverHandler, err := server.NewServer(
@@ -390,6 +400,7 @@ func (impl *Implm) Run(
Auth: authService,
Authz: authzService,
Trust: trustService,
Slack: slackService,
SAML: samlService,
ConnectorRegistry: defaultConnectorRegistry,
Agent: agent,