Documentation ¶
Index ¶
- func BulkCreateGroupBindings(groupID string, uids []string, db *gorm.DB) error
- func BulkCreateGroupRoleBindingForRole(roleID uint, groupIDs []string, db *gorm.DB) error
- func BulkCreateGroupRoleBindings(groupID string, roleIDs []uint, db *gorm.DB) error
- func BulkCreateRole(roles []*models.NewRole, db *gorm.DB) error
- func BulkCreateRoleActionBindings(roleID uint, actionIDs []uint, db *gorm.DB) error
- func BulkCreateRoleBindingForRole(roleID uint, UIDs []string, db *gorm.DB) error
- func BulkCreateRoleBindingForUser(uid string, roleIDs []uint, db *gorm.DB) error
- func BulkDeleteGroupBindings(groupID string, uids []string, db *gorm.DB) error
- func CountActiveUser(db *gorm.DB) (int64, error)
- func CountUser(db *gorm.DB) (int64, error)
- func CountUserByGroup(gid string, db *gorm.DB) (int64, error)
- func CountUserByType(db *gorm.DB) ([]*types.UserCountByType, error)
- func CreateAction(action *models.Action, db *gorm.DB) error
- func CreateGroupBinding(groupID, uid string, db *gorm.DB) error
- func CreateGroupRoleBinding(grb *models.GroupRoleBinding, db *gorm.DB) error
- func CreateRole(role *models.NewRole, db *gorm.DB) error
- func CreateRoleBinding(role *models.NewRoleBinding, db *gorm.DB) error
- func CreateUser(user *models.User, db *gorm.DB) error
- func CreateUserGroup(userGroup *models.UserGroup, db *gorm.DB) error
- func CreateUserLogin(userLogin *models.UserLogin, db *gorm.DB) error
- func DeleteGroupRoleBinding(grb *models.GroupRoleBinding, db *gorm.DB) error
- func DeleteGroupRoleBindingByGID(gid, namespace string, db *gorm.DB) error
- func DeleteRoleActionBindingByRole(roleID uint, db *gorm.DB) error
- func DeleteRoleBindingByUID(uid, namespace string, db *gorm.DB) error
- func DeleteRoleByName(name, namespace string, db *gorm.DB) error
- func DeleteRoleByNameSpace(namespace string, db *gorm.DB) error
- func DeleteUserByUid(uid string, db *gorm.DB) error
- func DeleteUserByUids(uids []string, db *gorm.DB) error
- func DeleteUserGroup(groupID string, db *gorm.DB) error
- func DeleteUserLoginByUid(uid string, db *gorm.DB) error
- func DeleteUserLoginByUids(uids []string, db *gorm.DB) error
- func FindSystemAdminRole(db *gorm.DB) (*models.NewRole, error)
- func GetActionByVerb(verb string, db *gorm.DB) (*models.Action, error)
- func GetAllUserGroup(db *gorm.DB) (*models.UserGroup, error)
- func GetConnectorInfo(id string, db *gorm.DB) (*models.Connector, error)
- func GetGroupRoleBinding(groupID string, roleID uint, db *gorm.DB) (*models.GroupRoleBinding, error)
- func GetRole(name, namespace string, db *gorm.DB) (*models.NewRole, error)
- func GetRoleBinding(roleID uint, uid string, db *gorm.DB) (*models.NewRoleBinding, error)
- func GetRoleByID(id uint, db *gorm.DB) (*models.NewRole, error)
- func GetUser(account string, identityType string, db *gorm.DB) (*models.User, error)
- func GetUserByName(name string, db *gorm.DB) (*models.User, error)
- func GetUserByUid(uid string, db *gorm.DB) (*models.User, error)
- func GetUserGroup(groupID string, db *gorm.DB) (*models.UserGroup, error)
- func GetUserGroupByName(name string, db *gorm.DB) (*models.UserGroup, error)
- func GetUserLogin(uid string, account string, loginType config.LoginType, db *gorm.DB) (*models.UserLogin, error)
- func GetUsersCount(name string) (int64, error)
- func ListActionByRole(roleID uint, db *gorm.DB) ([]*models.Action, error)
- func ListActionByType(actionScope int, db *gorm.DB) ([]*models.Action, error)
- func ListAllUsers(db *gorm.DB) ([]*models.User, error)
- func ListGroupRoleBindingsByGroupsAndRoles(roleID uint, groupIDs []string, db *gorm.DB) ([]*models.GroupRoleBinding, error)
- func ListGroupRoleBindingsByNamespace(namespace string, db *gorm.DB) ([]*models.GroupRoleBinding, error)
- func ListRoleBindingByNamespace(namespace string, db *gorm.DB) ([]*models.NewRoleBinding, error)
- func ListRoleByGroupIDs(groupIDs []string, db *gorm.DB) ([]*models.NewRole, error)
- func ListRoleByGroupIDsAndNamespace(groupIDs []string, namespace string, db *gorm.DB) ([]*models.NewRole, error)
- func ListRoleByGroupIDsAndVerb(gidList []string, verb string, db *gorm.DB) ([]*models.NewRole, error)
- func ListRoleByNamespace(namespace string, db *gorm.DB) ([]*models.NewRole, error)
- func ListRoleByRoleNamesAndNamespace(names []string, namespace string, db *gorm.DB) ([]*models.NewRole, error)
- func ListRoleByUID(uid string, db *gorm.DB) ([]*models.NewRole, error)
- func ListRoleByUIDAndNamespace(uid, namespace string, db *gorm.DB) ([]*models.NewRole, error)
- func ListRoleByUIDAndVerb(uid string, verb string, db *gorm.DB) ([]*models.NewRole, error)
- func ListUserGroupByUID(uid string, db *gorm.DB) ([]*models.UserGroup, error)
- func ListUserGroups(queryName string, pageNum, pageSize int, db *gorm.DB) ([]*models.UserGroup, int64, error)
- func ListUserLogins(uids []string, db *gorm.DB) (*[]models.UserLogin, error)
- func ListUsers(page int, perPage int, name string, db *gorm.DB) ([]models.User, error)
- func ListUsersByGroup(groupID string, db *gorm.DB) ([]*models.User, error)
- func ListUsersByIdentityType(identityType string, db *gorm.DB) ([]models.User, error)
- func ListUsersByUIDs(uids []string, db *gorm.DB) ([]models.User, error)
- func UpdateRoleInfo(id uint, role *models.NewRole, db *gorm.DB) error
- func UpdateUser(uid string, user *models.User, db *gorm.DB) error
- func UpdateUserGroup(groupID, name, description string, db *gorm.DB) error
- func UpdateUserLogin(uid string, userLogin *models.UserLogin, db *gorm.DB) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BulkCreateGroupBindings ¶ added in v1.9.9
func BulkCreateGroupRoleBindingForRole ¶ added in v1.9.9
func BulkCreateGroupRoleBindings ¶ added in v1.9.9
func BulkCreateRole ¶ added in v1.9.9
func BulkCreateRoleActionBindings ¶ added in v1.9.9
func BulkCreateRoleBindingForRole ¶ added in v1.9.9
func BulkCreateRoleBindingForUser ¶ added in v1.9.9
func BulkDeleteGroupBindings ¶ added in v1.9.9
func CountUserByGroup ¶ added in v1.9.9
func CountUserByType ¶ added in v1.9.9
func CountUserByType(db *gorm.DB) ([]*types.UserCountByType, error)
func CreateGroupBinding ¶ added in v1.9.9
func CreateGroupRoleBinding ¶ added in v1.9.9
func CreateGroupRoleBinding(grb *models.GroupRoleBinding, db *gorm.DB) error
func CreateRoleBinding ¶ added in v1.9.9
func CreateRoleBinding(role *models.NewRoleBinding, db *gorm.DB) error
func CreateUserGroup ¶ added in v1.9.9
func CreateUserLogin ¶
CreateUserLogin add a userLogin record
func DeleteGroupRoleBinding ¶ added in v1.9.9
func DeleteGroupRoleBinding(grb *models.GroupRoleBinding, db *gorm.DB) error
func DeleteGroupRoleBindingByGID ¶ added in v1.9.9
func DeleteRoleActionBindingByRole ¶ added in v1.9.9
func DeleteRoleBindingByUID ¶ added in v1.9.9
DeleteRoleBindingByUID deletes all user-role bindings with a certain user under a specific namespace
func DeleteRoleByName ¶ added in v1.9.9
func DeleteRoleByNameSpace ¶ added in v1.9.9
func DeleteUserByUid ¶
DeleteUserByUid Delete users based on uids
func DeleteUserByUids ¶
DeleteUserByUids Delete users based on uids
func DeleteUserLoginByUid ¶
DeleteUserLoginByUid Delete userLogin based on uids
func DeleteUserLoginByUids ¶
DeleteUserLoginByUids Delete userLogin based on uids
func FindSystemAdminRole ¶ added in v1.9.9
func GetActionByVerb ¶ added in v1.9.9
func GetConnectorInfo ¶ added in v1.9.9
func GetGroupRoleBinding ¶ added in v1.9.9
func GetRoleBinding ¶ added in v1.9.9
func GetUserByName ¶ added in v1.9.9
GetUserByName Get a user based on name
func GetUserByUid ¶
GetUserByUid Get a user based on uid
func GetUserGroup ¶ added in v1.9.9
func GetUserGroupByName ¶ added in v1.9.9
func GetUserLogin ¶
func GetUserLogin(uid string, account string, loginType config.LoginType, db *gorm.DB) (*models.UserLogin, error)
GetUserLogin Get a userLogin based on uid
func ListActionByRole ¶ added in v1.9.9
func ListActionByType ¶ added in v1.9.9
func ListGroupRoleBindingsByGroupsAndRoles ¶ added in v1.9.9
func ListGroupRoleBindingsByNamespace ¶ added in v1.9.9
func ListRoleBindingByNamespace ¶ added in v1.9.9
func ListRoleByGroupIDs ¶ added in v1.9.9
func ListRoleByGroupIDsAndNamespace ¶ added in v1.9.9
func ListRoleByGroupIDsAndVerb ¶ added in v1.9.9
func ListRoleByNamespace ¶ added in v1.9.9
func ListRoleByRoleNamesAndNamespace ¶ added in v1.9.9
func ListRoleByUID ¶ added in v1.9.9
ListRoleByUID list a set of roles that is used by specific user in ALL namespace
func ListRoleByUIDAndNamespace ¶ added in v1.9.9
ListRoleByUIDAndNamespace list a set of roles that is used by specific user in a given namespace
func ListRoleByUIDAndVerb ¶ added in v1.9.9
ListRoleByUIDAndVerb list all roles that have the specific verb permission, or project-admin
func ListUserGroupByUID ¶ added in v1.9.9
func ListUserGroups ¶ added in v1.9.9
func ListUserLogins ¶
ListUserLogins Get a userLogin based on uid list
func ListUsersByGroup ¶ added in v1.9.9
func ListUsersByIdentityType ¶
ListUsersByIdentityType gets a list of users based on identityType
func ListUsersByUIDs ¶
ListUsersByUIDs gets a list of users based on paging constraints
func UpdateRoleInfo ¶ added in v1.9.9
func UpdateUser ¶
UpdateUser update user info
func UpdateUserGroup ¶ added in v1.9.9
Types ¶
This section is empty.