Commit e305f9c5 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Adding Backend Name

parent 6346a3e4
...@@ -4,7 +4,7 @@ cabal-version: 1.12 ...@@ -4,7 +4,7 @@ cabal-version: 1.12
-- --
-- see: https://github.com/sol/hpack -- see: https://github.com/sol/hpack
-- --
-- hash: 5bb5ed278614ba01df850033ab3475484d4df276a3278039a7aebf1d86dea06b -- hash: 6d2d8c161ae59694c70216c31e6ac2cdb0f16397f06fd30a24d7098e86f268e8
name: gargantext-prelude name: gargantext-prelude
version: 0.1.0.0 version: 0.1.0.0
...@@ -31,12 +31,12 @@ library ...@@ -31,12 +31,12 @@ library
Gargantext.Prelude.Clock Gargantext.Prelude.Clock
Gargantext.Prelude.Config Gargantext.Prelude.Config
Gargantext.Prelude.Crypto.Auth Gargantext.Prelude.Crypto.Auth
Gargantext.Prelude.Crypto.Encode
Gargantext.Prelude.Crypto.Hash Gargantext.Prelude.Crypto.Hash
Gargantext.Prelude.Crypto.Pass.Machine Gargantext.Prelude.Crypto.Pass.Machine
Gargantext.Prelude.Crypto.Pass.User Gargantext.Prelude.Crypto.Pass.User
Gargantext.Prelude.Crypto.QRCode Gargantext.Prelude.Crypto.QRCode
Gargantext.Prelude.Crypto.Share Gargantext.Prelude.Crypto.Share
Gargantext.Prelude.Crypto.Symmetric
Gargantext.Prelude.Fibonacci Gargantext.Prelude.Fibonacci
Gargantext.Prelude.Mail Gargantext.Prelude.Mail
Gargantext.Prelude.Mail.Types Gargantext.Prelude.Mail.Types
......
...@@ -29,7 +29,8 @@ import Gargantext.Prelude.Mail.Types (MailConfig(..)) ...@@ -29,7 +29,8 @@ import Gargantext.Prelude.Mail.Types (MailConfig(..))
stripRight :: Char -> T.Text -> T.Text stripRight :: Char -> T.Text -> T.Text
stripRight c s = if T.last s == c then stripRight c (T.take (T.length s - 1) s) else s stripRight c s = if T.last s == c then stripRight c (T.take (T.length s - 1) s) else s
data GargConfig = GargConfig { _gc_url :: !T.Text data GargConfig = GargConfig { _gc_backend_name :: !T.Text
, _gc_url :: !T.Text
, _gc_url_backend_api :: !T.Text , _gc_url_backend_api :: !T.Text
, _gc_masteruser :: !T.Text , _gc_masteruser :: !T.Text
...@@ -72,7 +73,8 @@ readConfig fp = do ...@@ -72,7 +73,8 @@ readConfig fp = do
let val' = val ini "gargantext" let val' = val ini "gargantext"
pure $ GargConfig pure $ GargConfig
{ _gc_url = stripRight '/' $ val' "URL" { _gc_backend_name = cs $ val' "BACKEND_NAME"
, _gc_url = stripRight '/' $ val' "URL"
, _gc_url_backend_api = stripRight '/' $ val' "URL_BACKEND_API" , _gc_url_backend_api = stripRight '/' $ val' "URL_BACKEND_API"
, _gc_masteruser = val' "MASTER_USER" , _gc_masteruser = val' "MASTER_USER"
, _gc_secretkey = val' "SECRET_KEY" , _gc_secretkey = val' "SECRET_KEY"
......
...@@ -42,7 +42,8 @@ data Ordering = Down | Up ...@@ -42,7 +42,8 @@ data Ordering = Down | Up
deriving (Enum, Show, Eq, Bounded) deriving (Enum, Show, Eq, Bounded)
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- TODO
-- make hash then hash to int
createSeed :: String -> (Char -> Int) -> Seed createSeed :: String -> (Char -> Int) -> Seed
createSeed = undefined createSeed = undefined
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# resolver: ./custom-snapshot.yaml # resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: resolver:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/1.yaml url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
# User packages to be built. # User packages to be built.
# Various formats can be used as shown in the example below. # Various formats can be used as shown in the example below.
......
...@@ -7,14 +7,14 @@ packages: ...@@ -7,14 +7,14 @@ packages:
- completed: - completed:
hackage: located-base-0.1.1.1@sha256:7c6395f2b6fbf2d5f76c3514f774423838c0ea94e1c6a5530dd3c94b30c9d1c8,1904 hackage: located-base-0.1.1.1@sha256:7c6395f2b6fbf2d5f76c3514f774423838c0ea94e1c6a5530dd3c94b30c9d1c8,1904
pantry-tree: pantry-tree:
size: 534
sha256: 9d7b96ce785b464253dcf0ac2d8eb0be4cae6b96ed3960d66b81c373b540ed3f sha256: 9d7b96ce785b464253dcf0ac2d8eb0be4cae6b96ed3960d66b81c373b540ed3f
size: 534
original: original:
hackage: located-base-0.1.1.1@sha256:7c6395f2b6fbf2d5f76c3514f774423838c0ea94e1c6a5530dd3c94b30c9d1c8,1904 hackage: located-base-0.1.1.1@sha256:7c6395f2b6fbf2d5f76c3514f774423838c0ea94e1c6a5530dd3c94b30c9d1c8,1904
snapshots: snapshots:
- completed: - completed:
size: 585392 sha256: 428ec8d5ce932190d3cbe266b9eb3c175cd81e984babf876b64019e2cbe4ea68
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/1.yaml size: 590100
sha256: 4e4c5e435a2f1c6f3c650f282db0f387f806406ed4fe6ef1aa4e6add9035d065 url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
original: original:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/1.yaml url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment