add metrics and usergroup subcommands

This commit is contained in:
Anish Mukherjee
2022-11-28 19:27:17 +05:30
parent d999f7b86e
commit 683fe7abb1
13 changed files with 307 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package functions
import (
"net/http"
"github.com/gravitl/netmaker/models/promodels"
)
func GetUsergroups() *promodels.UserGroups {
return request[promodels.UserGroups](http.MethodGet, "/api/usergroups", nil)
}
func CreateUsergroup(usergroupName string) {
request[any](http.MethodPost, "/api/usergroups/"+usergroupName, nil)
}
func DeleteUsergroup(usergroupName string) {
request[any](http.MethodDelete, "/api/usergroups/"+usergroupName, nil)
}