Go Unifi Save

Unifi Controller API SDK for Go

Project README

Unifi Go SDK GoDoc

This was written primarily for use in my Terraform provider for 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.

Open Source Agenda is not affiliated with "Go Unifi" Project. README Source: paultyng/go-unifi
Stars
160
Open Issues
20
Last Commit
1 week ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating