summaryrefslogtreecommitdiff
path: root/overlays/spm/server/Spm/Server/Ctx.hs
blob: 1d22804352c5f1c4e97a5dd6510436e26ec175c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE TemplateHaskell #-}

module Spm.Server.Ctx
  ( ServerCtx(..)
  , sctxSqlPool, sctxInstanceId, sctxJwkSet
  ) where

import Data.UUID (UUID)
import Crypto.JOSE.JWK (JWKSet)
import Database.Persist.Postgresql
import UnliftIO.Pool
import Control.Lens.TH

import GHC.Generics (Generic)


data ServerCtx = ServerCtx
  { _sctxSqlPool :: Pool SqlBackend
  , _sctxInstanceId :: UUID
  , _sctxJwkSet :: JWKSet
  } deriving (Generic)
makeLenses ''ServerCtx