mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 17:29:15 +08:00
add metrics and usergroup subcommands
This commit is contained in:
19
cli/functions/usergroups.go
Normal file
19
cli/functions/usergroups.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user