-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Structured logging solution (Elasticsearch back end)
--   
--   Elasticsearch back end for the <a>log</a> library suite. Depends on
--   'log-base'.
@package log-elasticsearch
@version 0.9.1.0

module Log.Backend.ElasticSearch.V1.Internal

-- | Configuration for the Elasticsearch <tt>Logger</tt>. See
--   <a>https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.html</a>
--   for the explanation of terms.
data ElasticSearchConfig
ElasticSearchConfig :: !Text -> !Text -> !Text -> Maybe (EsUsername, EsPassword) -> !Bool -> ElasticSearchConfig

-- | Elasticsearch server address.
[esServer] :: ElasticSearchConfig -> !Text

-- | Elasticsearch index name.
[esIndex] :: ElasticSearchConfig -> !Text

-- | Elasticsearch mapping name.
[esMapping] :: ElasticSearchConfig -> !Text

-- | Elasticsearch basic authentication username and password.
[esLogin] :: ElasticSearchConfig -> Maybe (EsUsername, EsPassword)

-- | Allow basic authentication over non-TLS connections.
[esLoginInsecure] :: ElasticSearchConfig -> !Bool

-- | Sensible defaults for <a>ElasticSearchConfig</a>.
defaultElasticSearchConfig :: ElasticSearchConfig

-- | Username type used for HTTP Basic authentication. See
--   <tt>basicAuthHook</tt>.
newtype EsUsername :: *
EsUsername :: Text -> EsUsername
[esUsername] :: EsUsername -> Text

-- | Password type used for HTTP Basic authentication. See
--   <tt>basicAuthHook</tt>.
newtype EsPassword :: *
EsPassword :: Text -> EsPassword
[esPassword] :: EsPassword -> Text
instance GHC.Show.Show Log.Backend.ElasticSearch.V1.Internal.ElasticSearchConfig
instance GHC.Classes.Eq Log.Backend.ElasticSearch.V1.Internal.ElasticSearchConfig


-- | Elasticsearch logging back-end.
module Log.Backend.ElasticSearch.V1

-- | Configuration for the Elasticsearch <tt>Logger</tt>. See
--   <a>https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.html</a>
--   for the explanation of terms.
data ElasticSearchConfig

-- | Elasticsearch server address.
esServer :: ElasticSearchConfig -> Text

-- | Elasticsearch index name.
esIndex :: ElasticSearchConfig -> Text

-- | Elasticsearch mapping name.
esMapping :: ElasticSearchConfig -> Text

-- | Elasticsearch basic authentication username and password.
esLogin :: ElasticSearchConfig -> Maybe (EsUsername, EsPassword)

-- | Allow basic authentication over non-TLS connections.
esLoginInsecure :: ElasticSearchConfig -> Bool

-- | Sensible defaults for <a>ElasticSearchConfig</a>.
defaultElasticSearchConfig :: ElasticSearchConfig

-- | Create an <a>elasticSearchLogger</a> for the duration of the given
--   action, and shut it down afterwards, making sure that all buffered
--   messages are actually written to the Elasticsearch store.
withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r) -> IO r

-- | Start an asynchronous logger thread that stores messages using
--   Elasticsearch.
--   
--   Please use <a>withElasticSearchLogger</a> instead, which is more
--   exception-safe (see the note attached to <a>mkBulkLogger</a>).

-- | <i>Deprecated: Use <a>withElasticSearchLogger</a> instead!</i>
elasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> IO Logger
instance Data.Aeson.Types.ToJSON.ToJSON Log.Backend.ElasticSearch.V1.LogsMapping


-- | <i>Deprecated: Use directly Log.Backend.ElasticSearch.V1 or V5</i>
module Log.Backend.ElasticSearch


-- | <i>Deprecated: Use directly Log.Backend.ElasticSearch.V1 or V5</i>
module Log.Backend.ElasticSearch.Internal


-- | Lensified version of <a>Log.Backend.ElasticSearch</a>.
module Log.Backend.ElasticSearch.V1.Lens

-- | Configuration for the Elasticsearch <tt>Logger</tt>. See
--   <a>https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.html</a>
--   for the explanation of terms.
data ElasticSearchConfig

-- | Elasticsearch server address.
esServer :: Lens' ElasticSearchConfig Text

-- | Elasticsearch index name.
esIndex :: Lens' ElasticSearchConfig Text

-- | Elasticsearch mapping name.
esMapping :: Lens' ElasticSearchConfig Text

-- | Elasticsearch basic authentication username and password.
esLogin :: Lens' ElasticSearchConfig (Maybe (EsUsername, EsPassword))

-- | Allow basic authentication over non-TLS connections.
esLoginInsecure :: Lens' ElasticSearchConfig Bool

-- | Sensible defaults for <a>ElasticSearchConfig</a>.
defaultElasticSearchConfig :: ElasticSearchConfig

-- | Create an <a>elasticSearchLogger</a> for the duration of the given
--   action, and shut it down afterwards, making sure that all buffered
--   messages are actually written to the Elasticsearch store.
withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r) -> IO r


-- | <i>Deprecated: Use directly Log.Backend.ElasticSearch.V1 or V5</i>
module Log.Backend.ElasticSearch.Lens

module Log.Backend.ElasticSearch.V5.Internal

-- | Configuration for the Elasticsearch <tt>Logger</tt>. See
--   <a>https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.html</a>
--   for the explanation of terms.
data ElasticSearchConfig
ElasticSearchConfig :: !Text -> !Text -> !Text -> Maybe (EsUsername, EsPassword) -> !Bool -> ElasticSearchConfig

-- | Elasticsearch server address.
[esServer] :: ElasticSearchConfig -> !Text

-- | Elasticsearch index name.
[esIndex] :: ElasticSearchConfig -> !Text

-- | Elasticsearch mapping name.
[esMapping] :: ElasticSearchConfig -> !Text

-- | Elasticsearch basic authentication username and password.
[esLogin] :: ElasticSearchConfig -> Maybe (EsUsername, EsPassword)

-- | Allow basic authentication over non-TLS connections.
[esLoginInsecure] :: ElasticSearchConfig -> !Bool

-- | Sensible defaults for <a>ElasticSearchConfig</a>.
defaultElasticSearchConfig :: ElasticSearchConfig

-- | Username type used for HTTP Basic authentication. See
--   <tt>basicAuthHook</tt>.
newtype EsUsername :: *
EsUsername :: Text -> EsUsername
[esUsername] :: EsUsername -> Text

-- | Password type used for HTTP Basic authentication. See
--   <tt>basicAuthHook</tt>.
newtype EsPassword :: *
EsPassword :: Text -> EsPassword
[esPassword] :: EsPassword -> Text
instance GHC.Show.Show Log.Backend.ElasticSearch.V5.Internal.ElasticSearchConfig
instance GHC.Classes.Eq Log.Backend.ElasticSearch.V5.Internal.ElasticSearchConfig


-- | Elasticsearch logging back-end.
module Log.Backend.ElasticSearch.V5

-- | Configuration for the Elasticsearch <tt>Logger</tt>. See
--   <a>https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.html</a>
--   for the explanation of terms.
data ElasticSearchConfig

-- | Elasticsearch server address.
esServer :: ElasticSearchConfig -> Text

-- | Elasticsearch index name.
esIndex :: ElasticSearchConfig -> Text

-- | Elasticsearch mapping name.
esMapping :: ElasticSearchConfig -> Text

-- | Elasticsearch basic authentication username and password.
esLogin :: ElasticSearchConfig -> Maybe (EsUsername, EsPassword)

-- | Allow basic authentication over non-TLS connections.
esLoginInsecure :: ElasticSearchConfig -> Bool

-- | Sensible defaults for <a>ElasticSearchConfig</a>.
defaultElasticSearchConfig :: ElasticSearchConfig

-- | Create an <a>elasticSearchLogger</a> for the duration of the given
--   action, and shut it down afterwards, making sure that all buffered
--   messages are actually written to the Elasticsearch store.
withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r) -> IO r

-- | Start an asynchronous logger thread that stores messages using
--   Elasticsearch.
--   
--   Please use <a>withElasticSearchLogger</a> instead, which is more
--   exception-safe (see the note attached to <a>mkBulkLogger</a>).

-- | <i>Deprecated: Use <a>withElasticSearchLogger</a> instead!</i>
elasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> IO Logger
instance Data.Aeson.Types.ToJSON.ToJSON Log.Backend.ElasticSearch.V5.LogsMapping


-- | Lensified version of <a>Log.Backend.ElasticSearch</a>.
module Log.Backend.ElasticSearch.V5.Lens

-- | Configuration for the Elasticsearch <tt>Logger</tt>. See
--   <a>https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.html</a>
--   for the explanation of terms.
data ElasticSearchConfig

-- | Elasticsearch server address.
esServer :: Lens' ElasticSearchConfig Text

-- | Elasticsearch index name.
esIndex :: Lens' ElasticSearchConfig Text

-- | Elasticsearch mapping name.
esMapping :: Lens' ElasticSearchConfig Text

-- | Elasticsearch basic authentication username and password.
esLogin :: Lens' ElasticSearchConfig (Maybe (EsUsername, EsPassword))

-- | Allow basic authentication over non-TLS connections.
esLoginInsecure :: Lens' ElasticSearchConfig Bool

-- | Sensible defaults for <a>ElasticSearchConfig</a>.
defaultElasticSearchConfig :: ElasticSearchConfig

-- | Create an <a>elasticSearchLogger</a> for the duration of the given
--   action, and shut it down afterwards, making sure that all buffered
--   messages are actually written to the Elasticsearch store.
withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r) -> IO r
