From fc6cf6169868e60c189e4b243330c3717ff159f3 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 26 May 2022 13:58:07 +0200 Subject: ... --- hosts/surtr/email/spm/lib/Spm/Api.hs | 40 ------------------------------------ 1 file changed, 40 deletions(-) delete mode 100644 hosts/surtr/email/spm/lib/Spm/Api.hs (limited to 'hosts/surtr/email/spm/lib/Spm') diff --git a/hosts/surtr/email/spm/lib/Spm/Api.hs b/hosts/surtr/email/spm/lib/Spm/Api.hs deleted file mode 100644 index d9644222..00000000 --- a/hosts/surtr/email/spm/lib/Spm/Api.hs +++ /dev/null @@ -1,40 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} - -module Spm.Api - ( SpmMailbox - , SpmApi, spmApi - ) where - -import Prelude - -import Servant.API - -import Data.Proxy (Proxy(..)) - -import Data.Text (Text) - -import GHC.Generics (Generic) -import Type.Reflection (Typeable) - -import Control.Lens.TH - -import Data.CaseInsensitive (CI) -import Data.CaseInsensitive.Instances () - -import Crypto.JOSE.JWK (JWKSet) - -import Data.UUID (UUID) -import Data.UUID.Instances () - - -newtype SpmMailbox = SpmMailbox { unSpmMailbox :: CI Text } - deriving stock (Eq, Ord, Read, Show, Generic, Typeable) - deriving newtype (MimeRender JSON, MimeRender PlainText) -makeWrapped ''SpmMailbox - -type SpmApi = "whoami" :> Get '[PlainText, JSON] SpmMailbox - :<|> ".well-known" :> "jwks.json" :> Get '[JSON] JWKSet - :<|> "instance-id" :> Get '[PlainText, JSON, OctetStream] UUID - -spmApi :: Proxy SpmApi -spmApi = Proxy -- cgit v1.2.3