Copyright | (C) Jonathan Lamothe |
---|---|
License | AGPL-3.0-or-later |
Maintainer | jonathan@jlamothe.net |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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/.
Synopsis
- data GemURL = GemURL {}
- data GemRequest = GemRequest {
- reqURL :: GemURL
- reqCert :: Maybe Certificate
- data GemResponse = GemResponse {
- respStatus :: Word8
- respMeta :: String
- respBody :: Maybe ByteString
- type GemHandler = GemRequest -> IO GemResponse
- data GemCapSettings = GemCapSettings {
- capConnections :: Int
- capPort :: Word16
- capCert :: FilePath
- capCertChain :: [FilePath]
- capKey :: FilePath
- newGemURL :: String -> GemURL
- newGemRequest :: GemURL -> GemRequest
- newGemResponse :: GemResponse
- newGemCapSettings :: FilePath -> FilePath -> GemCapSettings
Types
Gemini URL
data GemRequest Source #
Describes a Gemini request
GemRequest | |
|
Instances
Show GemRequest Source # | |
Defined in Network.Gemini.Capsule.Types showsPrec :: Int -> GemRequest -> ShowS # show :: GemRequest -> String # showList :: [GemRequest] -> ShowS # | |
Eq GemRequest Source # | |
Defined in Network.Gemini.Capsule.Types (==) :: GemRequest -> GemRequest -> Bool # (/=) :: GemRequest -> GemRequest -> Bool # |
data GemResponse Source #
Describes a response to a Gemini request
GemResponse | |
|
Instances
Show GemResponse Source # | |
Defined in Network.Gemini.Capsule.Types showsPrec :: Int -> GemResponse -> ShowS # show :: GemResponse -> String # showList :: [GemResponse] -> ShowS # | |
Eq GemResponse Source # | |
Defined in Network.Gemini.Capsule.Types (==) :: GemResponse -> GemResponse -> Bool # (/=) :: GemResponse -> GemResponse -> Bool # |
type GemHandler = GemRequest -> IO GemResponse Source #
Handles a GemRequest
to produce a GemResponse
data GemCapSettings Source #
The settings required to set up a Gemini capsule
GemCapSettings | |
|
Instances
Show GemCapSettings Source # | |
Defined in Network.Gemini.Capsule.Types showsPrec :: Int -> GemCapSettings -> ShowS # show :: GemCapSettings -> String # showList :: [GemCapSettings] -> ShowS # | |
Eq GemCapSettings Source # | |
Defined in Network.Gemini.Capsule.Types (==) :: GemCapSettings -> GemCapSettings -> Bool # (/=) :: GemCapSettings -> GemCapSettings -> Bool # |
Constructors
newGemResponse :: GemResponse Source #
Builds a GemResponse
:: FilePath | Path to the server certificate |
-> FilePath | Path to the private key |
-> GemCapSettings |
Builds a reasonable set of server settings.