summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhailGlushenkov <>2019-05-15 14:43:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-05-15 14:43:00 (GMT)
commit64bfdca06987adb8ffab54e3ae09ac191277db68 (patch)
tree9d2c236a52078db61cdbc7ccd9ad7a22bbdd040c
parent9039f54b42af7ff773f2f0dc4e281c54abea4660 (diff)
version 0.10.1.0HEAD0.10.1.0master
-rwxr-xr-xCHANGELOG.md5
-rw-r--r--log-elasticsearch.cabal4
-rw-r--r--src/Log/Backend/ElasticSearch/V1/Internal.hs27
-rw-r--r--src/Log/Backend/ElasticSearch/V5/Internal.hs4
4 files changed, 26 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f5385e3..98b0851 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,7 @@
-# log-elasticsearch-0.10.0.1 (2019-01-14)
+# log-elasticsearch-0.10.1.0 (2019-05-15)
+* Add a Generic instance for ElasticSearchConfig.
+
+# log-elasticsearch-0.10.0.1 (2019-01-24)
* Compatibility with ES 6.x by using "text" instead of deprecated "string"
# log-elasticsearch-0.10.0.0 (2018-03-28)
diff --git a/log-elasticsearch.cabal b/log-elasticsearch.cabal
index a5a4cc0..4e0dffe 100644
--- a/log-elasticsearch.cabal
+++ b/log-elasticsearch.cabal
@@ -1,5 +1,5 @@
name: log-elasticsearch
-version: 0.10.0.1
+version: 0.10.1.0
synopsis: Structured logging solution (Elasticsearch back end)
description: Elasticsearch back end for the 'log' library suite.
@@ -19,7 +19,7 @@ build-type: Simple
cabal-version: >=1.10
extra-source-files: CHANGELOG.md, README.md
tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4,
- GHC == 8.6.2
+ GHC == 8.6.5
Source-repository head
Type: git
diff --git a/src/Log/Backend/ElasticSearch/V1/Internal.hs b/src/Log/Backend/ElasticSearch/V1/Internal.hs
index fc7e5b7..f48f865 100644
--- a/src/Log/Backend/ElasticSearch/V1/Internal.hs
+++ b/src/Log/Backend/ElasticSearch/V1/Internal.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DeriveGeneric #-}
module Log.Backend.ElasticSearch.V1.Internal
(ElasticSearchConfig(..)
,defaultElasticSearchConfig
@@ -6,6 +7,7 @@ module Log.Backend.ElasticSearch.V1.Internal
where
import Database.V1.Bloodhound hiding (Status)
+import GHC.Generics (Generic)
import Prelude
import qualified Data.Text as T
@@ -15,16 +17,21 @@ import qualified Data.Text as T
data ElasticSearchConfig = ElasticSearchConfig {
esServer :: !T.Text -- ^ Elasticsearch server address.
, esIndex :: !T.Text -- ^ Elasticsearch index name.
- , esShardCount :: !Int -- ^ Elasticsearch shard count for the named index.
- --
- -- @since 0.10.0.0
- , esReplicaCount :: !Int -- ^ Elasticsearch replica count for the named index.
- --
- -- @since 0.10.0.0
- , esMapping :: !T.Text -- ^ Elasticsearch mapping name.
- , esLogin :: Maybe (EsUsername, EsPassword) -- ^ Elasticsearch basic authentication username and password.
- , esLoginInsecure :: !Bool -- ^ Allow basic authentication over non-TLS connections.
- } deriving (Eq, Show)
+ , esShardCount :: !Int
+ -- ^ Elasticsearch shard count for the named index.
+ --
+ -- @since 0.10.0.0
+ , esReplicaCount :: !Int
+ -- ^ Elasticsearch replica count for the named index.
+ --
+ -- @since 0.10.0.0
+ , esMapping :: !T.Text
+ -- ^ Elasticsearch mapping name.
+ , esLogin :: Maybe (EsUsername, EsPassword)
+ -- ^ Elasticsearch basic authentication username and password.
+ , esLoginInsecure :: !Bool
+ -- ^ Allow basic authentication over non-TLS connections.
+ } deriving (Eq, Show, Generic)
-- | Sensible defaults for 'ElasticSearchConfig'.
defaultElasticSearchConfig :: ElasticSearchConfig
diff --git a/src/Log/Backend/ElasticSearch/V5/Internal.hs b/src/Log/Backend/ElasticSearch/V5/Internal.hs
index 4829381..09119f9 100644
--- a/src/Log/Backend/ElasticSearch/V5/Internal.hs
+++ b/src/Log/Backend/ElasticSearch/V5/Internal.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DeriveGeneric #-}
module Log.Backend.ElasticSearch.V5.Internal
(ElasticSearchConfig(..)
,defaultElasticSearchConfig
@@ -6,6 +7,7 @@ module Log.Backend.ElasticSearch.V5.Internal
where
import Database.V5.Bloodhound hiding (Status)
+import GHC.Generics (Generic)
import Prelude
import qualified Data.Text as T
@@ -29,7 +31,7 @@ data ElasticSearchConfig = ElasticSearchConfig {
-- ^ Elasticsearch basic authentication username and password.
, esLoginInsecure :: !Bool
-- ^ Allow basic authentication over non-TLS connections.
- } deriving (Eq, Show)
+ } deriving (Eq, Show, Generic)
-- | Sensible defaults for 'ElasticSearchConfig'.
defaultElasticSearchConfig :: ElasticSearchConfig