diff --git a/gemserv.cabal b/gemserv.cabal index a0adb24..61cc79e 100644 --- a/gemserv.cabal +++ b/gemserv.cabal @@ -22,6 +22,7 @@ extra-source-files: library exposed-modules: Network.GemServ + Network.GemServ.Types other-modules: Paths_gemserv hs-source-dirs: diff --git a/src/Network/GemServ/Types.hs b/src/Network/GemServ/Types.hs new file mode 100644 index 0000000..1fb1246 --- /dev/null +++ b/src/Network/GemServ/Types.hs @@ -0,0 +1,45 @@ +{-| + +Module : Network.GemServ.Types +Description : Gemini Server Types +Copyright : (C) Jonathan Lamothe +License : AGPL-3.0-or-later +Maintainer : jonathan@jlamothe.net +Stability : experimental +Portability : POSIX + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with this program. If not, see +. + +-} + +module Network.GemServ.Types ( + Request (..) +) where + +import Data.Word (Word32) + +-- | Gemini request +data Request = Request + { reqHost :: String + -- ^ The host part of the authority section, e.g.: "example.com" + , reqPort :: Maybe Word32 + -- ^ The port number (if supplied) + , reqPath :: [String] + -- ^ The decoded path segments + , reqQuery :: String + -- ^ The decoded request query + } deriving (Eq, Show) + +--jl