Commit Graph

11 Commits

Author SHA1 Message Date
Mateusz Filipowicz
e79dcb13f0 feat: add logging and support for custom logger (#36)
* feat: add support for logging

* fix linting

* chore: remove old APIError in favor of ServerError
2025-02-23 12:59:46 +01:00
Mateusz Filipowicz
7c7ef98c03 feat: rename HttpCustomizer to HttpTransportCustomizer and make it return http.Transport that is later used (#30)
* feat: rename HttpCustomizer to HttpTransportCustomizer and make it return http.Transport that is later used

* linting
2025-02-19 01:03:21 +01:00
Mateusz Filipowicz
35e7b2c3cc docs: add detailed usage documentation together with examples (#29)
* feat: rename Pass to Password in ClientConfig

* docs: add more detailed usage documentation together with examples

* chore: update issue templates

* docs: add codeowners, code of conduct and contributing docs

* chore: add editorconfig

* chore: apply linter
2025-02-18 22:36:08 +01:00
Mateusz Filipowicz
dca894e8e7 feat: use Client interface instead of client struct when interacting with UniFi SDK (#21)
* feat: use Client interface instead of client struct when interacting with UniFi SDK

Breaking change!

* chore: linting

* chore: linting
2025-02-17 09:38:41 +01:00
Mateusz Filipowicz
c6e20b675c refactor: major refactor of unifi.go to split it into multiple files for cohesiveness and readability.
Even more documentation
2025-02-10 22:59:39 +01:00
Mateusz Filipowicz
473a5d0d5c chore: increase test coverage of unifi 2025-02-10 19:02:30 +01:00
Mateusz Filipowicz
35b786277c feat: use sysinfo API for getting system information with fallback to old API (#10)
* feat: use sysinfo API for getting system information with fallback to old API

* chore: apply linting
2025-02-10 18:43:20 +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
c7e81e2b18 feat: add validation of ClientConfig fields for improved data integrity (#5)
* feat: add validation of ClientConfig fields for improved data integrity

* chore: add tests for client config validation
2025-02-09 04:21:15 +01:00
Mateusz Filipowicz
d79f581c1f chore: apply linter fixes 2025-02-09 01:51:47 +01:00
Mateusz Filipowicz
685572d5ce test: add tests for Unifi client 2025-02-09 01:51:47 +01:00