IPv6DB 0.3.1 → 0.3.2
raw patch · 6 files changed
+23/−21 lines, 6 filesdep ~IPv6Addrdep ~fast-loggerdep ~hedisPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: IPv6Addr, fast-logger, hedis, optparse-applicative, unordered-containers, warp
API changes (from Hackage documentation)
- Network.IPv6DB.Types: data Addresses
- Network.IPv6DB.Types: data Entries
- Network.IPv6DB.Types: data Resources
- Network.IPv6DB.Types: data Source
+ Network.IPv6DB.Types: newtype Addresses
+ Network.IPv6DB.Types: newtype Entries
+ Network.IPv6DB.Types: newtype Resources
+ Network.IPv6DB.Types: newtype Source
- Network.IPv6DB.Types: Entry :: !Text -> !IPv6Addr -> Entry
+ Network.IPv6DB.Types: Entry :: !Text -> IPv6Addr -> Entry
- Network.IPv6DB.Types: Resource :: !Text -> !IPv6Addr -> !(Maybe Integer) -> !Source -> Resource
+ Network.IPv6DB.Types: Resource :: !Text -> !IPv6Addr -> !Maybe Integer -> !Source -> Resource
- Network.IPv6DB.Types: Source :: !Value -> Source
+ Network.IPv6DB.Types: Source :: Value -> Source
- Network.IPv6DB.Types: [$sel:address:Entry] :: Entry -> !IPv6Addr
+ Network.IPv6DB.Types: [$sel:address:Entry] :: Entry -> IPv6Addr
- Network.IPv6DB.Types: [$sel:ttl:Resource] :: Resource -> !(Maybe Integer)
+ Network.IPv6DB.Types: [$sel:ttl:Resource] :: Resource -> !Maybe Integer
Files
- IPv6DB.cabal +13/−11
- LICENSE +1/−1
- app/Main.hs +1/−1
- app/Options.hs +1/−1
- app/Types.hs +2/−2
- src/Network/IPv6DB/Types.hs +5/−5
IPv6DB.cabal view
@@ -1,5 +1,5 @@ name: IPv6DB-version: 0.3.1+version: 0.3.2 synopsis: A RESTful microService for IPv6-related data description: IPv6DB is a RESTful microservice using Redis as backend to store lists of IPv6 addresses and attach to each of@@ -9,14 +9,16 @@ license: BSD3 license-file: LICENSE author: Michel Boucey-maintainer: michel.boucey@cybervisible.fr-copyright: (c) 2017-2018 - Michel Boucey+maintainer: michel.boucey@gmail.com+copyright: (c) 2017-2020 - Michel Boucey category: network, database build-type: Simple cabal-version: >=1.10 extra-source-files: README.md , IPv6DB_APIv1.md +Tested-With: GHC ==8.4.3 || ==8.6.5 || ==8.8.1+ Source-Repository head Type: git Location: https://github.com/MichelBoucey/IPv6DB.git@@ -29,9 +31,9 @@ , base >= 4.8.2 && < 5.0 , bytestring >= 0.10.6 && < 0.11 , IPv6Addr >= 1.1.0 && < 1.2.0- , hedis >= 0.9.4 && < 0.11+ , hedis >= 0.9.4 && < 0.13 , http-types >= 0.9.1 && < 0.13- , unordered-containers >= 0.2.7.2 && < 0.2.10+ , unordered-containers >= 0.2.7.2 && < 0.2.11 , mtl >= 2.2.1 && < 2.3 , text >= 1.2.2 && < 1.3 , vector >= 0.11.0.0 && < 0.13@@ -46,19 +48,19 @@ build-depends: aeson >= 0.11.2 && < 1.5 , base >= 4.8.2 && < 5.0 , bytestring >= 0.10.6 && < 0.11- , fast-logger >= 2.4.8 && < 2.5- , IPv6Addr >= 1.1.0 && < 1.2.0+ , fast-logger >= 2.4.8 && < 3.1+ , IPv6Addr >= 1.1.3 && < 1.2.0 , IPv6DB- , hedis >= 0.9.4 && < 0.11+ , hedis >= 0.9.4 && < 0.13 , http-types >= 0.9.1 && < 0.13- , unordered-containers >= 0.2.7.2 && < 0.2.10+ , unordered-containers >= 0.2.7.2 && < 0.2.11 , mtl >= 2.2.1 && < 2.3- , optparse-applicative >= 0.12.1.0 && < 0.15+ , optparse-applicative >= 0.12.1.0 && < 0.16 , text >= 1.2.2 && < 1.3 , vector >= 0.11.0.0 && < 0.13 , wai >= 3.2.1 && < 3.3 , wai-logger >= 2.2.7 && < 2.4- , warp >= 3.2.9 && < 3.3+ , warp >= 3.2.9 && < 3.4 default-language: Haskell2010 ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2017, Michel Boucey+Copyright (c) 2017-2018, Michel Boucey All rights reserved. Redistribution and use in source and binary forms, with or without
app/Main.hs view
@@ -100,7 +100,7 @@ DELETE -> maybeJSONBody >>= maybe badJSONRequest answer where- answer ents = do+ answer ents = runRedis redisConn (delByEntries ents) >>= \case Right d -> case d of
app/Options.hs view
@@ -20,7 +20,7 @@ opts = info (options <**> helper) ( fullDesc <> progDesc "RESTful Web Service for IPv6 related data"- <> header "IPv6DB v0.2.0 APIv1, (c) Michel Boucey 2017" )+ <> header "IPv6DB v0.3.1 APIv1, (c) Michel Boucey 2017-2018" ) options :: Parser Options options =
app/Types.hs view
@@ -13,7 +13,7 @@ import Network.IPv6DB.Types -data Env = Env { redisConn :: Connection }+newtype Env = Env { redisConn :: Connection } data RedisResponse = RedisOk@@ -32,7 +32,7 @@ ] toJSON _ = Null -data RedisErrors = RedisErrors [RedisResponse] deriving (Eq, Show)+newtype RedisErrors = RedisErrors [RedisResponse] deriving (Eq, Show) instance ToJSON RedisErrors where toJSON (RedisErrors rrs) =
src/Network/IPv6DB/Types.hs view
@@ -9,7 +9,7 @@ import qualified Data.Vector as V import Text.IPv6Addr -data Addresses = Addresses [IPv6Addr]+newtype Addresses = Addresses [IPv6Addr] instance FromJSON Addresses where parseJSON (Array v) = do@@ -22,7 +22,7 @@ data Entry = Entry { list :: !T.Text- , address :: !IPv6Addr+ , address :: IPv6Addr } deriving (Eq, Show) instance FromJSON Entry where@@ -32,7 +32,7 @@ pure Entry{..} parseJSON _ = fail "JSON Object Expected" -data Entries = Entries [Entry]+newtype Entries = Entries [Entry] instance FromJSON Entries where parseJSON (Array v) = do@@ -42,7 +42,7 @@ else fail "Malformed JSON Array" parseJSON _ = fail "JSON Array Expected" -data Source = Source !Value deriving (Eq, Show)+newtype Source = Source Value deriving (Eq, Show) instance ToJSON Source where toJSON (Source v) = v@@ -93,7 +93,7 @@ source <- o .: "source" return Resource{..} -data Resources = Resources [Resource] deriving (Eq, Show)+newtype Resources = Resources [Resource] deriving (Eq, Show) instance ToJSON Resources where toJSON (Resources rs) =