summaryrefslogtreecommitdiff
path: root/overlays/spm/server/Spm/Server/Ctx.hs
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/spm/server/Spm/Server/Ctx.hs')
-rw-r--r--overlays/spm/server/Spm/Server/Ctx.hs24
1 files changed, 24 insertions, 0 deletions
diff --git a/overlays/spm/server/Spm/Server/Ctx.hs b/overlays/spm/server/Spm/Server/Ctx.hs
new file mode 100644
index 00000000..7b84e3d5
--- /dev/null
+++ b/overlays/spm/server/Spm/Server/Ctx.hs
@@ -0,0 +1,24 @@
1{-# LANGUAGE TemplateHaskell #-}
2
3module Spm.Server.Ctx
4 ( ServerCtx(..)
5 , sctxSqlPool, sctxInstanceId, sctxJwkSet
6 ) where
7
8import Data.UUID (UUID)
9import Crypto.JOSE.JWK (JWKSet)
10import Database.Persist.Postgresql
11import Data.Pool
12import Control.Lens.TH
13
14import Type.Reflection (Typeable)
15import GHC.Generics (Generic)
16
17
18data ServerCtx = ServerCtx
19 { _sctxSqlPool :: Pool SqlBackend
20 , _sctxInstanceId :: UUID
21 , _sctxJwkSet :: JWKSet
22 } deriving (Generic, Typeable)
23makeLenses ''ServerCtx
24