Commit Graph

13 Commits

Author SHA1 Message Date
Mateusz Filipowicz
7f5968314d feat: make error handling more verbose and collect more error information from API errors, support API V2 error format (#8)
feat: make error handling more verbose and collect more error information from Unifi Controller, support API V2 error format
2025-02-10 03:03:56 +01:00
Mateusz Filipowicz
53bb1a13b9 feat: generate fields validation and use it when sending requests to API (#7)
* feat: generate fields validation and use it when issuing requests to API with soft (default) or hard modes

* chore: apply linter fixes

* feat: enable field validation on int fields

* feat: add validation for ^[\w]+$ fields

* feat: add validation for MAC address fields

* fix: trim wrappers for all comments

* feat: add validation for IPv4, IPv6 and IP(IPv4/IPv6) fields

* feat: add validation for numeric, non-zero based fields

* fix: one of validation can contain dot (.) sign in values

* feat: add second notation of MAC address validation

* fix: one of validation can start with ^( and end with )$

* feat: add option to disable validation and use soft validation by default

* chore: fix test

* docs: add readme about client-side validation
2025-02-09 21:08:21 +01:00
Mateusz Filipowicz
e99645cf93 fix: renamed generator template to use ErrNotFound instead of NotFoundError 2025-02-09 02:07:44 +01:00
Mateusz Filipowicz
685572d5ce test: add tests for Unifi client 2025-02-09 01:51:47 +01:00
Mateusz Filipowicz
f79f21c4ad feat: new, more customizable client supporting API Key and user/password authentication 2025-02-09 01:51:47 +01:00
Mateusz Filipowicz
cac05add7a docs: update README 2025-02-07 18:35:45 +01:00
Mateusz Filipowicz
c393dcbe71 fix: WAN network support was broken 2025-02-07 15:40:42 +01:00
Paul Tyng
4ab4036985 Bump to 6.0.43, use go generate
Also moved fetching of JSON information to Go for cross-OS usage.
2021-04-09 09:51:50 -04:00
Paul Tyng
f740d52490 Typo 2020-02-02 15:58:43 -05:00
Paul Tyng
091aff2b90 Update README.md 2020-01-12 10:15:02 -05:00
Paul Tyng
2849cbdf67 Update README.md 2020-01-10 14:44:53 -05:00
Paul Tyng
ca7112178a Add godoc badge 2020-01-10 14:37:27 -05:00
Paul Tyng
435ecf9d6f Initial version
Extracted from paultyng/terraform-provider-unifi@ef25893f14
2020-01-10 14:31:12 -05:00