Introduce the Models module in order to make others internal
This commit is contained in:
parent
915d01e086
commit
c377ec25dc
6 changed files with 31 additions and 26 deletions
|
|
@ -1,20 +1,12 @@
|
|||
module NightLight.ZigbeeEvents
|
||||
module internal NightLight.ZigbeeEvents
|
||||
|
||||
open NightLight.Models
|
||||
open FsToolkit.ErrorHandling
|
||||
open FSharp.Data
|
||||
|
||||
type ZigbeeEvent = DeviceAnnounce of FriendlyName: string
|
||||
|
||||
type ParseZigbeeEventError =
|
||||
| InvalidJson
|
||||
| MissingTypeField
|
||||
| MissingDataField
|
||||
| MissingFriendlyNameField
|
||||
| InvalidTypeField
|
||||
| InvalidFriendlyNameField
|
||||
| UnknownType
|
||||
|
||||
let internal parseZigbeeEvent str =
|
||||
let parseZigbeeEvent str =
|
||||
result {
|
||||
let! jsonValue = JsonValue.TryParse str |> Result.requireSome InvalidJson
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue