unpoller / unifi

Go Library (w/ structures) to grab data from a Ubitquiti UniFi Controller
https://golift.io/discord
MIT License
114 stars 22 forks source link

Mocking Improvements, capture hidden bugs in unpoller #87

Closed platinummonkey closed 1 year ago

platinummonkey commented 1 year ago

This mainly includes mocking improvements tied to a soon to come unpoller PR.

During this I found a couple bugs related to unpoller and corrected the type handling in the structs here.

Implements that status handler for mock device.

FlexTemp is introduced here to normalize some repeated logic found elsewhere in unpoller.

gofakeit is somewhat pedantic but expected given the strong typing, so some nicer annotations that would make sense were dropped.