dashboard/src/Port.elm

28 lines
706 B
Elm
Raw Normal View History

2020-11-23 14:27:33 +03:00
port module Port exposing (..)
2020-11-26 21:47:37 +03:00
import Blueprints.Model exposing (Blueprint)
2020-11-23 14:27:33 +03:00
import Dict exposing (Dict)
import Json.Encode exposing (Value)
2020-12-01 14:03:25 +03:00
import Modules.Model exposing (Module)
2020-11-26 21:47:37 +03:00
import Nodes.Model exposing (Identify)
2020-12-01 17:47:52 +03:00
import Service.Model exposing (Service)
2020-11-23 14:27:33 +03:00
2020-11-23 15:44:45 +03:00
type alias ReceiveEvent =
2020-12-01 14:03:25 +03:00
{ name : String, peer : String, peers : Maybe (List String), identify : Maybe Identify, services : Maybe (List Service), modules : Maybe (List Module), blueprints : Maybe (List Blueprint) }
2020-11-23 14:27:33 +03:00
2020-11-23 15:44:45 +03:00
port eventReceiver : (ReceiveEvent -> msg) -> Sub msg
port relayChanged : (String -> msg) -> Sub msg
type alias GetAll =
{ relayPeerId : String
, knownPeers : List String
}
port getAll : GetAll -> Cmd msg