Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindPrivilegeChecker ¶
BindPrivilegeChecker binds Checker to context.
Types ¶
type Checker ¶
type Checker interface { // Check checks privilege. // If tbl is nil, only check global/db scope privileges. // If tbl is not nil, check global/db/table scope privileges. Check(ctx context.Context, db *model.DBInfo, tbl *model.TableInfo, privilege mysql.PrivilegeType) (bool, error) // Show granted privileges for user. ShowGrants(ctx context.Context, user string) ([]string, error) }
Checker is the interface for check privileges.
func GetPrivilegeChecker ¶
GetPrivilegeChecker gets Checker from context.
Click to show internal directories.
Click to hide internal directories.