working commit

This commit is contained in:
2026-02-18 23:22:46 +02:00
parent e1ca9b1b4c
commit 4a43a22c19
12 changed files with 500 additions and 92 deletions
+2 -6
View File
@@ -54,7 +54,6 @@ func (cli *Client) CreateGrantByAccountID(ctx context.Context, hosturi, accountI
return res, err
}
func (cli *Client) CreateGrantByUsername(ctx context.Context, hosturi, username, right, pattern string) (string, error) {
var err error
var res string
@@ -65,8 +64,8 @@ func (cli *Client) CreateGrantByUsername(ctx context.Context, hosturi, username,
}
operParams := operator.CreateGrantParams{
Username: username,
Right: right,
Pattern: pattern,
Right: right,
Pattern: pattern,
}
paramsJson, err := json.Marshal(operParams)
if err != nil {
@@ -90,7 +89,6 @@ func (cli *Client) CreateGrantByUsername(ctx context.Context, hosturi, username,
return res, err
}
func (cli *Client) GetGrant(ctx context.Context, hosturi, id string) (*descr.Grant, error) {
var err error
res := &descr.Grant{}
@@ -124,8 +122,6 @@ func (cli *Client) GetGrant(ctx context.Context, hosturi, id string) (*descr.Gra
return res, err
}
func (cli *Client) UpdateGrant(ctx context.Context, hosturi, grantID, newPattern string) error {
var err error