/* * Copyright 2026 Oleg Borodin */ package grant import ( "context" "mbase/pkg/mbctl" "github.com/spf13/cobra" ) func (util *Util) DeleteGrant(cmd *cobra.Command, args []string) { util.deleteGrantParams.Username = args[0] util.deleteGrantParams.Grantname = args[1] res, err := util.deleteGrant(&util.deleteGrantParams) printResponse(res, err) } type DeleteGrantParams struct { Username string Grantname string } type DeleteGrantResult struct{} func (util *Util) deleteGrant(params *DeleteGrantParams) (*DeleteGrantResult, error) { var err error res := &DeleteGrantResult{} ctx := context.Background() operParams := &mbctl.DeleteGrantParams{ Username: params.Username, Grantname: params.Grantname, } _, err = util.oper.DeleteGrant(ctx, util.operID, operParams) if err != nil { return res, err } return res, err }