Skip to content

Instantly share code, notes, and snippets.

@harfangk
Created November 26, 2017 04:12
Show Gist options
  • Save harfangk/93ed854ca02ae3c122f6acadc60703e6 to your computer and use it in GitHub Desktop.
Save harfangk/93ed854ca02ae3c122f6acadc60703e6 to your computer and use it in GitHub Desktop.
type Request
= User User.Msg
| Room Room.Msg
type Endpoint
= User
| Room
type User.Msg
= Create UserPayload
| Delete User
| List
type Room.Msg
= Create RoomPayload
| Expand Room
| Clean
type alias OutboundRequest
= { endpoint : String
, message : String
, payload : Json.Encode.Value
}
encodeRequest : Request -> OutboundRequest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment