working commit
This commit is contained in:
+4
-4
@@ -13,7 +13,7 @@ import (
|
||||
"context"
|
||||
|
||||
"mstore/pkg/descr"
|
||||
"mstore/pkg/terms"
|
||||
"mstore/pkg/term"
|
||||
"mstore/pkg/uuid"
|
||||
)
|
||||
|
||||
@@ -78,7 +78,7 @@ func (db *Database) GetGrantByID(ctx context.Context, id uuid.UUID) (bool, *desc
|
||||
return true, res, err
|
||||
}
|
||||
|
||||
func (db *Database) GetGrantByAccoundIDRight(ctx context.Context, accountID uuid.UUID, right terms.Right) (bool, *descr.Grant, error) {
|
||||
func (db *Database) GetGrantByAccoundIDRight(ctx context.Context, accountID uuid.UUID, right term.Right) (bool, *descr.Grant, error) {
|
||||
var err error
|
||||
res := &descr.Grant{}
|
||||
request := `SELECT * FROM grants WHERE account_id = $1 AND right = $2 LIMIT 1`
|
||||
@@ -95,7 +95,7 @@ func (db *Database) GetGrantByAccoundIDRight(ctx context.Context, accountID uuid
|
||||
return true, res, err
|
||||
}
|
||||
|
||||
func (db *Database) ListGrantsByAccoundIDRight(ctx context.Context, accountID uuid.UUID, right terms.Right) (bool, []descr.Grant, error) {
|
||||
func (db *Database) ListGrantsByAccoundIDRight(ctx context.Context, accountID uuid.UUID, right term.Right) (bool, []descr.Grant, error) {
|
||||
var err error
|
||||
request := `SELECT * FROM grants WHERE account_id = $1 AND right = $2`
|
||||
res := make([]descr.Grant, 0)
|
||||
@@ -109,7 +109,7 @@ func (db *Database) ListGrantsByAccoundIDRight(ctx context.Context, accountID uu
|
||||
return true, res, err
|
||||
}
|
||||
|
||||
func (db *Database) GetGrantByAccoundIDRightPattern(ctx context.Context, accountID uuid.UUID, right terms.Right, pattern string) (bool, *descr.Grant, error) {
|
||||
func (db *Database) GetGrantByAccoundIDRightPattern(ctx context.Context, accountID uuid.UUID, right term.Right, pattern string) (bool, *descr.Grant, error) {
|
||||
var err error
|
||||
res := &descr.Grant{}
|
||||
request := `SELECT * FROM grants WHERE account_id = $1 AND right = $2 AND pattern = $3 LIMIT 1`
|
||||
|
||||
Reference in New Issue
Block a user