working commit

This commit is contained in:
2026-06-08 09:42:32 +02:00
parent 0506b35cd1
commit 5f16f33a8b
21 changed files with 786 additions and 114 deletions
+3 -6
View File
@@ -22,22 +22,19 @@ type DeleteGrantParams struct {
Username string
Operation string
}
type DeleteGrantResult struct {
GrantID string `json:"grantId"`
}
type DeleteGrantResult struct{}
func (util *Util) deleteGrant(params *DeleteGrantParams) (*DeleteGrantResult, error) {
var err error
res := &DeleteGrantResult{}
ctx := context.Background()
operParams := &mbctl.SetGrantParams{
operParams := &mbctl.DeleteGrantParams{
Username: params.Username,
Operation: params.Operation,
}
operRes, err := util.oper.SetGrant(ctx, util.operID, operParams)
_, err = util.oper.DeleteGrant(ctx, util.operID, operParams)
if err != nil {
return res, err
}
res.GrantID = operRes.GrantID
return res, err
}