orm

package
v1.9.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkCreateGroupBindings added in v1.9.9

func BulkCreateGroupBindings(groupID string, uids []string, db *gorm.DB) error

func BulkCreateGroupRoleBindingForRole added in v1.9.9

func BulkCreateGroupRoleBindingForRole(roleID uint, groupIDs []string, db *gorm.DB) error

func BulkCreateGroupRoleBindings added in v1.9.9

func BulkCreateGroupRoleBindings(groupID string, roleIDs []uint, db *gorm.DB) error

func BulkCreateRole added in v1.9.9

func BulkCreateRole(roles []*models.NewRole, db *gorm.DB) error

func BulkCreateRoleActionBindings added in v1.9.9

func BulkCreateRoleActionBindings(roleID uint, actionIDs []uint, db *gorm.DB) error

func BulkCreateRoleBindingForRole added in v1.9.9

func BulkCreateRoleBindingForRole(roleID uint, UIDs []string, db *gorm.DB) error

func BulkCreateRoleBindingForUser added in v1.9.9

func BulkCreateRoleBindingForUser(uid string, roleIDs []uint, db *gorm.DB) error

func BulkDeleteGroupBindings added in v1.9.9

func BulkDeleteGroupBindings(groupID string, uids []string, db *gorm.DB) error

func CountActiveUser added in v1.9.9

func CountActiveUser(db *gorm.DB) (int64, error)

func CountUser added in v1.9.9

func CountUser(db *gorm.DB) (int64, error)

func CountUserByGroup added in v1.9.9

func CountUserByGroup(gid string, db *gorm.DB) (int64, error)

func CountUserByType added in v1.9.9

func CountUserByType(db *gorm.DB) ([]*types.UserCountByType, error)

func CreateAction added in v1.9.9

func CreateAction(action *models.Action, db *gorm.DB) error

func CreateGroupBinding added in v1.9.9

func CreateGroupBinding(groupID, uid string, db *gorm.DB) error

func CreateGroupRoleBinding added in v1.9.9

func CreateGroupRoleBinding(grb *models.GroupRoleBinding, db *gorm.DB) error

func CreateRole added in v1.9.9

func CreateRole(role *models.NewRole, db *gorm.DB) error

func CreateRoleBinding added in v1.9.9

func CreateRoleBinding(role *models.NewRoleBinding, db *gorm.DB) error

func CreateUser

func CreateUser(user *models.User, db *gorm.DB) error

CreateUser create a user

func CreateUserGroup added in v1.9.9

func CreateUserGroup(userGroup *models.UserGroup, db *gorm.DB) error

func CreateUserLogin

func CreateUserLogin(userLogin *models.UserLogin, db *gorm.DB) error

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 DeleteGroupRoleBindingByGID(gid, namespace string, db *gorm.DB) error

func DeleteRoleActionBindingByRole added in v1.9.9

func DeleteRoleActionBindingByRole(roleID uint, db *gorm.DB) error

func DeleteRoleBindingByUID added in v1.9.9

func DeleteRoleBindingByUID(uid, namespace string, db *gorm.DB) error

DeleteRoleBindingByUID deletes all user-role bindings with a certain user under a specific namespace

func DeleteRoleByName added in v1.9.9

func DeleteRoleByName(name, namespace string, db *gorm.DB) error

func DeleteRoleByNameSpace added in v1.9.9

func DeleteRoleByNameSpace(namespace string, db *gorm.DB) error

func DeleteUserByUid

func DeleteUserByUid(uid string, db *gorm.DB) error

DeleteUserByUid Delete users based on uids

func DeleteUserByUids

func DeleteUserByUids(uids []string, db *gorm.DB) error

DeleteUserByUids Delete users based on uids

func DeleteUserGroup added in v1.9.9

func DeleteUserGroup(groupID string, db *gorm.DB) error

func DeleteUserLoginByUid

func DeleteUserLoginByUid(uid string, db *gorm.DB) error

DeleteUserLoginByUid Delete userLogin based on uids

func DeleteUserLoginByUids

func DeleteUserLoginByUids(uids []string, db *gorm.DB) error

DeleteUserLoginByUids Delete userLogin based on uids

func FindSystemAdminRole added in v1.9.9

func FindSystemAdminRole(db *gorm.DB) (*models.NewRole, error)

func GetActionByVerb added in v1.9.9

func GetActionByVerb(verb string, db *gorm.DB) (*models.Action, error)

func GetAllUserGroup added in v1.9.9

func GetAllUserGroup(db *gorm.DB) (*models.UserGroup, error)

func GetConnectorInfo added in v1.9.9

func GetConnectorInfo(id string, db *gorm.DB) (*models.Connector, error)

func GetGroupRoleBinding added in v1.9.9

func GetGroupRoleBinding(groupID string, roleID uint, db *gorm.DB) (*models.GroupRoleBinding, error)

func GetRole added in v1.9.9

func GetRole(name, namespace string, db *gorm.DB) (*models.NewRole, error)

func GetRoleBinding added in v1.9.9

func GetRoleBinding(roleID uint, uid string, db *gorm.DB) (*models.NewRoleBinding, error)

func GetRoleByID added in v1.9.9

func GetRoleByID(id uint, db *gorm.DB) (*models.NewRole, error)

func GetUser

func GetUser(account string, identityType string, db *gorm.DB) (*models.User, error)

GetUser Get a user based on email and identityType

func GetUserByName added in v1.9.9

func GetUserByName(name string, db *gorm.DB) (*models.User, error)

GetUserByName Get a user based on name

func GetUserByUid

func GetUserByUid(uid string, db *gorm.DB) (*models.User, error)

GetUserByUid Get a user based on uid

func GetUserGroup added in v1.9.9

func GetUserGroup(groupID string, db *gorm.DB) (*models.UserGroup, error)

func GetUserGroupByName added in v1.9.9

func GetUserGroupByName(name string, db *gorm.DB) (*models.UserGroup, error)

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 GetUsersCount

func GetUsersCount(name string) (int64, error)

GetUsersCount gets user count

func ListActionByRole added in v1.9.9

func ListActionByRole(roleID uint, db *gorm.DB) ([]*models.Action, error)

func ListActionByType added in v1.9.9

func ListActionByType(actionScope int, db *gorm.DB) ([]*models.Action, error)

func ListAllUsers added in v1.9.9

func ListAllUsers(db *gorm.DB) ([]*models.User, error)

func ListGroupRoleBindingsByGroupsAndRoles added in v1.9.9

func ListGroupRoleBindingsByGroupsAndRoles(roleID uint, groupIDs []string, db *gorm.DB) ([]*models.GroupRoleBinding, error)

func ListGroupRoleBindingsByNamespace added in v1.9.9

func ListGroupRoleBindingsByNamespace(namespace string, db *gorm.DB) ([]*models.GroupRoleBinding, error)

func ListRoleBindingByNamespace added in v1.9.9

func ListRoleBindingByNamespace(namespace string, db *gorm.DB) ([]*models.NewRoleBinding, error)

func ListRoleByGroupIDs added in v1.9.9

func ListRoleByGroupIDs(groupIDs []string, db *gorm.DB) ([]*models.NewRole, error)

func ListRoleByGroupIDsAndNamespace added in v1.9.9

func ListRoleByGroupIDsAndNamespace(groupIDs []string, namespace string, db *gorm.DB) ([]*models.NewRole, error)

func ListRoleByGroupIDsAndVerb added in v1.9.9

func ListRoleByGroupIDsAndVerb(gidList []string, verb string, db *gorm.DB) ([]*models.NewRole, error)

func ListRoleByNamespace added in v1.9.9

func ListRoleByNamespace(namespace string, db *gorm.DB) ([]*models.NewRole, error)

func ListRoleByRoleNamesAndNamespace added in v1.9.9

func ListRoleByRoleNamesAndNamespace(names []string, namespace string, db *gorm.DB) ([]*models.NewRole, error)

func ListRoleByUID added in v1.9.9

func ListRoleByUID(uid string, db *gorm.DB) ([]*models.NewRole, error)

ListRoleByUID list a set of roles that is used by specific user in ALL namespace

func ListRoleByUIDAndNamespace added in v1.9.9

func ListRoleByUIDAndNamespace(uid, namespace string, db *gorm.DB) ([]*models.NewRole, error)

ListRoleByUIDAndNamespace list a set of roles that is used by specific user in a given namespace

func ListRoleByUIDAndVerb added in v1.9.9

func ListRoleByUIDAndVerb(uid string, verb string, db *gorm.DB) ([]*models.NewRole, error)

ListRoleByUIDAndVerb list all roles that have the specific verb permission, or project-admin

func ListUserGroupByUID added in v1.9.9

func ListUserGroupByUID(uid string, db *gorm.DB) ([]*models.UserGroup, error)

func ListUserGroups added in v1.9.9

func ListUserGroups(queryName string, pageNum, pageSize int, db *gorm.DB) ([]*models.UserGroup, int64, error)

func ListUserLogins

func ListUserLogins(uids []string, db *gorm.DB) (*[]models.UserLogin, error)

ListUserLogins Get a userLogin based on uid list

func ListUsers

func ListUsers(page int, perPage int, name string, db *gorm.DB) ([]models.User, error)

ListUsers gets a list of users based on paging constraints

func ListUsersByGroup added in v1.9.9

func ListUsersByGroup(groupID string, db *gorm.DB) ([]*models.User, error)

func ListUsersByIdentityType

func ListUsersByIdentityType(identityType string, db *gorm.DB) ([]models.User, error)

ListUsersByIdentityType gets a list of users based on identityType

func ListUsersByUIDs

func ListUsersByUIDs(uids []string, db *gorm.DB) ([]models.User, error)

ListUsersByUIDs gets a list of users based on paging constraints

func UpdateRoleInfo added in v1.9.9

func UpdateRoleInfo(id uint, role *models.NewRole, db *gorm.DB) error

func UpdateUser

func UpdateUser(uid string, user *models.User, db *gorm.DB) error

UpdateUser update user info

func UpdateUserGroup added in v1.9.9

func UpdateUserGroup(groupID, name, description string, db *gorm.DB) error

func UpdateUserLogin

func UpdateUserLogin(uid string, userLogin *models.UserLogin, db *gorm.DB) error

UpdateUserLogin update login info

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL