working commit

This commit is contained in:
2026-06-09 14:10:53 +02:00
parent ee30858d11
commit 6e92720e69
26 changed files with 339 additions and 165 deletions
+3 -3
View File
@@ -13,14 +13,14 @@ import (
func (util *Util) SetGrant(cmd *cobra.Command, args []string) {
util.setGrantParams.Username = args[0]
util.setGrantParams.Operation = args[1]
util.setGrantParams.Grantname = args[1]
res, err := util.setGrant(&util.setGrantParams)
printResponse(res, err)
}
type SetGrantParams struct {
Username string
Operation string
Grantname string
}
type SetGrantResult struct {
GrantID string `json:"grantId"`
@@ -32,7 +32,7 @@ func (util *Util) setGrant(params *SetGrantParams) (*SetGrantResult, error) {
ctx := context.Background()
operParams := &mbctl.SetGrantParams{
Username: params.Username,
Operation: params.Operation,
Grantname: params.Grantname,
}
operRes, err := util.oper.SetGrant(ctx, util.operID, operParams)
if err != nil {