https://github.com/paultyng/go-unifi
Unifi Controller API SDK for Go
https://github.com/paultyng/go-unifi
sdk sdk-go ubiquiti unifi
Last synced: 2 days ago
JSON representation
Unifi Controller API SDK for Go
- Host: GitHub
- URL: https://github.com/paultyng/go-unifi
- Owner: paultyng
- License: mpl-2.0
- Created: 2020-01-10T18:56:24.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T23:43:28.000Z (about 1 month ago)
- Last Synced: 2025-04-09T07:01:34.616Z (about 1 month ago)
- Topics: sdk, sdk-go, ubiquiti, unifi
- Language: Go
- Homepage:
- Size: 844 KB
- Stars: 173
- Watchers: 9
- Forks: 59
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unifi Go SDK [](https://godoc.org/github.com/paultyng/go-unifi)
This was written primarily for use in my [Terraform provider for Unifi](https://github.com/paultyng/terraform-provider-unifi).
## Versioning
Many of the naming adjustments are breaking changes, but to simplify things, treating naming errors as minor changes for the 1.0.0 version (probably should have just started at 0.1.0).
## Note on Code Generation
The data models and basic REST methods are "generated" from JSON files in the JAR that show all fields and the associated regex/validation information.
To regenerate the code, you can bump the Unifi Controller version number in [unifi/gen.go] and run `go generate` inside the `unifi` directory.
This code generation is kind of gross, I wanted to switch to using the java classes in the jar like scala2go but the jar is obfuscated and I couldn't find a way to extract that information from anywhere else. Maybe it exists somewhere in the web UI, but I was unable to find it in there in a way that was extractable in a practical way.
Still planning to dig through the bits some more later on.