working commit

This commit is contained in:
2026-02-20 19:08:26 +02:00
parent f973293315
commit 3220e2d78f
32 changed files with 195 additions and 213 deletions
+9 -9
View File
@@ -18,12 +18,12 @@ import (
"mstore/app/operator"
"mstore/pkg/descr"
"mstore/pkg/term"
"mstore/pkg/uuid"
"mstore/pkg/auxid"
)
func (cli *Client) CreateGrantByAccountID(ctx context.Context, hosturi string, accountID uuid.UUID, right term.Right, pattern string) (uuid.UUID, error) {
func (cli *Client) CreateGrantByAccountID(ctx context.Context, hosturi string, accountID uint64, right term.Right, pattern string) (uint64, error) {
var err error
var res uuid.UUID
var res uint64
apiuri, err := setApiPath(hosturi, "/v3/api/grant/create")
if err != nil {
@@ -56,9 +56,9 @@ func (cli *Client) CreateGrantByAccountID(ctx context.Context, hosturi string, a
return res, err
}
func (cli *Client) CreateGrantByUsername(ctx context.Context, hosturi, username string, right term.Right, pattern string) (uuid.UUID, error) {
func (cli *Client) CreateGrantByUsername(ctx context.Context, hosturi, username string, right term.Right, pattern string) (uint64, error) {
var err error
var res uuid.UUID
var res uint64
apiuri, err := setApiPath(hosturi, "/v3/api/grant/create")
if err != nil {
@@ -91,7 +91,7 @@ func (cli *Client) CreateGrantByUsername(ctx context.Context, hosturi, username
return res, err
}
func (cli *Client) GetGrant(ctx context.Context, hosturi string, id uuid.UUID) (*descr.Grant, error) {
func (cli *Client) GetGrant(ctx context.Context, hosturi string, id uint64) (*descr.Grant, error) {
var err error
res := &descr.Grant{}
@@ -124,7 +124,7 @@ func (cli *Client) GetGrant(ctx context.Context, hosturi string, id uuid.UUID) (
return res, err
}
func (cli *Client) UpdateGrant(ctx context.Context, hosturi string, grantID uuid.UUID, newPattern string) error {
func (cli *Client) UpdateGrant(ctx context.Context, hosturi string, grantID uint64, newPattern string) error {
var err error
apipath, err := setApiPath(hosturi, "/v3/api/grant/update")
@@ -155,7 +155,7 @@ func (cli *Client) UpdateGrant(ctx context.Context, hosturi string, grantID uuid
return err
}
func (cli *Client) DeleteGrant(ctx context.Context, hosturi string, grantID uuid.UUID) error {
func (cli *Client) DeleteGrant(ctx context.Context, hosturi string, grantID uint64) error {
var err error
apipath, err := setApiPath(hosturi, "/v3/api/grant/delete")
@@ -186,7 +186,7 @@ func (cli *Client) DeleteGrant(ctx context.Context, hosturi string, grantID uuid
return err
}
func (cli *Client) ListGrantsByAccountID(ctx context.Context, hosturi string, accountID uuid.UUID) ([]descr.Grant, error) {
func (cli *Client) ListGrantsByAccountID(ctx context.Context, hosturi string, accountID uint64) ([]descr.Grant, error) {
var err error
res := make([]descr.Grant, 0)