This commit is contained in:
parent
51007ff612
commit
49b00ad9a7
3 changed files with 10 additions and 1 deletions
|
|
@ -51,6 +51,9 @@ aggregator_shift = "1 year"
|
||||||
max_aml_program_runtime = "1 year"
|
max_aml_program_runtime = "1 year"
|
||||||
default_purse_limit = 9999
|
default_purse_limit = 9999
|
||||||
|
|
||||||
|
[exchangedb-postgres]
|
||||||
|
config = "pgx://mte:hunter2@localhost:5432/taler-exchange"
|
||||||
|
|
||||||
[coin_kudo_1]
|
[coin_kudo_1]
|
||||||
value= EUR:0.01
|
value= EUR:0.01
|
||||||
duration_withdraw= "1 year"
|
duration_withdraw= "1 year"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
(executable
|
(executable
|
||||||
(name parse_config)
|
(name parse_config)
|
||||||
(modules parse_config)
|
(modules parse_config)
|
||||||
(libraries mirage-crypto-ec ptime fmt angstrom amount b32))
|
(libraries mirage-crypto-ec ptime fmt angstrom uri amount b32))
|
||||||
|
|
||||||
; we prefer to generate taler_signatures.ml once,
|
; we prefer to generate taler_signatures.ml once,
|
||||||
; and commit it, for versionning:
|
; and commit it, for versionning:
|
||||||
|
|
|
||||||
|
|
@ -225,6 +225,7 @@ let yes_no = function
|
||||||
| "YES" -> `YES
|
| "YES" -> `YES
|
||||||
| s -> fail_with (Fmt.str "expected `YES`/`NO` value, got `%s`" s)
|
| s -> fail_with (Fmt.str "expected `YES`/`NO` value, got `%s`" s)
|
||||||
|
|
||||||
|
let uri s = Uri.of_string s
|
||||||
let amount s = s |> Amount.of_string |> unwrap_res
|
let amount s = s |> Amount.of_string |> unwrap_res
|
||||||
let duration s = Parse_duration.(s |> parse |> to_ptime_span)
|
let duration s = Parse_duration.(s |> parse |> to_ptime_span)
|
||||||
|
|
||||||
|
|
@ -356,6 +357,11 @@ module Config = struct
|
||||||
let default_purse_limit = get "default_purse_limit" |> int
|
let default_purse_limit = get "default_purse_limit" |> int
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module Exchangedb_postgres = struct
|
||||||
|
let config =
|
||||||
|
get config ~section:"exchangedb-postgres" ~field:"config" |> uri
|
||||||
|
end
|
||||||
|
|
||||||
module Currency = struct
|
module Currency = struct
|
||||||
type t = {
|
type t = {
|
||||||
enabled: [ `YES | `NO ];
|
enabled: [ `YES | `NO ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue