created Request type

This commit is contained in:
Jonathan Lamothe 2021-10-22 13:34:18 -04:00
parent 2a11520a5f
commit ef3693f49c
2 changed files with 46 additions and 0 deletions

View File

@ -22,6 +22,7 @@ extra-source-files:
library
exposed-modules:
Network.GemServ
Network.GemServ.Types
other-modules:
Paths_gemserv
hs-source-dirs:

View File

@ -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
<https://www.gnu.org/licenses/>.
-}
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