aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Init.elm
blob: 8c148c02de33d986aa6255afb2a66e16eab8f97b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module Init exposing
  ( Init
  , decoder
  )

import Time exposing (..)

import Json.Decode as Json exposing ((:=))

import Model.Translations exposing (..)
import Model.Conf exposing (..)
import Model.InitResult exposing (..)

type alias Init =
  { time : Time
  , translations : Translations
  , conf : Conf
  , result : InitResult
  }

decoder : Json.Decoder Init
decoder =
  Json.object4 Init
    ("time" := Json.float)
    ("translations" := translationsDecoder)
    ("conf" := confDecoder)
    ("result" := initResultDecoder)