Expose the Account API (RADIUS users)

* Adds Account CRUD API
* Enahnces `emptyStringInt` with a predicate for dynamically setting
  which value should be interpreted as a blank JSON payload
This commit is contained in:
James Stephenson
2020-08-21 08:08:51 -04:00
committed by Paul Tyng
parent ae40573bb7
commit 47fa522aba
7 changed files with 141 additions and 2 deletions

View File

@@ -193,6 +193,9 @@ type %s struct {
for _, name := range fieldNames {
switch {
case structName == "Account" && name == "ip":
code += "\tIP string `json:\"ip,omitempty\"`\n"
continue
case structName == "User" && name == "blocked":
code += "\tBlocked bool `json:\"blocked,omitempty\"`\n"
continue