wip: better config
This commit is contained in:
parent
be2e590e93
commit
aaae59ced0
6 changed files with 40 additions and 34 deletions
|
|
@ -1,24 +1,11 @@
|
|||
(* https://docs.taler.net/manpages/taler-exchange.conf.5.html#exchange-options *)
|
||||
(* https://docs.taler.net/manpages/taler-exchange.conf.5.html
|
||||
taler-docs/manpages/taler-exchange.conf.5.rst *)
|
||||
(* TODO
|
||||
- generate `config.ml` from config file (virtual module)?
|
||||
- no relative path *)
|
||||
|
||||
let default_lang = "en"
|
||||
let default_encoding : [< `Identity | `DEFLATE | `Gzip ] = `Identity
|
||||
|
||||
(* TODO Taler documentation markdown mimetype should be the prefered one, and be
|
||||
supported, according to DD we take text/plain as default instead for now *)
|
||||
let default_mimetype = ("text", "plain")
|
||||
let default_extension = ".txt"
|
||||
let terms_dir = Fpath.(v "terms")
|
||||
let privacy_dir = Fpath.(v "privacy")
|
||||
|
||||
(* ETAG is used as base filename it should be encoded in Crockford base-32 we do
|
||||
not generate it and we do not verify it *)
|
||||
let terms_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
||||
let privacy_etag = "0" |> Headers_lib.Etag.of_crockford32 |> Result.get_ok
|
||||
let terms_legal_version = "1"
|
||||
let privacy_legal_version = "1"
|
||||
- parse config file format
|
||||
- no relative path
|
||||
- default config: use relevant duration, all set to 1 year for now
|
||||
*)
|
||||
|
||||
(* ---- *)
|
||||
let currency = `Eur
|
||||
|
|
@ -37,8 +24,7 @@ let currency_round_unit = { currency= `Eur; value= 0; fraction= 1 }
|
|||
let value_to_string v =
|
||||
Fmt.str "%s:%d.%d" (currency_to_string v.currency) v.value v.fraction
|
||||
|
||||
(* todo: use relevant duration, all set to 1 year for now *)
|
||||
|
||||
(* https://docs.taler.net/manpages/taler-exchange.conf.5.html#exchange-coin-options *)
|
||||
module Coin = struct
|
||||
(* How much is the coin worth, the format is CURRENCY:VALUE.FRACTION. For
|
||||
example, a 10 cent piece is “EUR:0.10”. *)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue