mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PermissionRepository

type PermissionRepository struct {
	mock.Mock
}

PermissionRepository is an autogenerated mock type for the PermissionRepository type

func (*PermissionRepository) Delete

func (_m *PermissionRepository) Delete(permission *models.Permission) (err error)

Delete provides a mock function with given fields: permission

func (*PermissionRepository) FirstOrCreate

func (_m *PermissionRepository) FirstOrCreate(permission *models.Permission) error

FirstOrCreate provides a mock function with given fields: permission

func (*PermissionRepository) GetDirectPermissionIDsOfUserByID

func (_m *PermissionRepository) GetDirectPermissionIDsOfUserByID(userID uint, pagination scopes.GormPager) (permissionIDs []uint, totalCount int64, err error)

GetDirectPermissionIDsOfUserByID provides a mock function with given fields: userID, pagination

func (*PermissionRepository) GetPermissionByGuardName

func (_m *PermissionRepository) GetPermissionByGuardName(guardName string) (permission models.Permission, err error)

GetPermissionByGuardName provides a mock function with given fields: guardName

func (*PermissionRepository) GetPermissionByID

func (_m *PermissionRepository) GetPermissionByID(ID uint) (permission models.Permission, err error)

GetPermissionByID provides a mock function with given fields: ID

func (*PermissionRepository) GetPermissionIDs

func (_m *PermissionRepository) GetPermissionIDs(pagination scopes.GormPager) (permissionIDs []uint, totalCount int64, err error)

GetPermissionIDs provides a mock function with given fields: pagination

func (*PermissionRepository) GetPermissionIDsOfRolesByIDs

func (_m *PermissionRepository) GetPermissionIDsOfRolesByIDs(roleIDs []uint, pagination scopes.GormPager) (permissionIDs []uint, totalCount int64, err error)

GetPermissionIDsOfRolesByIDs provides a mock function with given fields: roleIDs, pagination

func (*PermissionRepository) GetPermissions

func (_m *PermissionRepository) GetPermissions(IDs []uint) (permissions collections.Permission, err error)

GetPermissions provides a mock function with given fields: IDs

func (*PermissionRepository) GetPermissionsByGuardNames

func (_m *PermissionRepository) GetPermissionsByGuardNames(guardNames []string) (permissions collections.Permission, err error)

GetPermissionsByGuardNames provides a mock function with given fields: guardNames

func (*PermissionRepository) Migrate

func (_m *PermissionRepository) Migrate() (err error)

Migrate provides a mock function.

func (*PermissionRepository) Updates

func (_m *PermissionRepository) Updates(permission *models.Permission, updates map[string]interface{}) (err error)

Updates provides a mock function with given fields: permission, updates

type RoleRepository

type RoleRepository struct {
	mock.Mock
}

RoleRepository is an autogenerated mock type for the RoleRepository type

func (*RoleRepository) AddPermissions

func (_m *RoleRepository) AddPermissions(role *models.Role, permissions collections.Permission) error

AddPermissions provides a mock function with given fields: role, permissions

func (*RoleRepository) ClearPermissions

func (_m *RoleRepository) ClearPermissions(role *models.Role) error

ClearPermissions provides a mock function with given fields: role

func (*RoleRepository) Delete

func (_m *RoleRepository) Delete(role *models.Role) (err error)

Delete provides a mock function with given fields: permission

func (*RoleRepository) FirstOrCreate

func (_m *RoleRepository) FirstOrCreate(role *models.Role) error

FirstOrCreate provides a mock function with given fields: permission

func (*RoleRepository) GetRoleByGuardName

func (_m *RoleRepository) GetRoleByGuardName(guardName string) (role models.Role, err error)

GetRoleByGuardName provides a mock function with given fields: guardName

func (*RoleRepository) GetRoleByGuardNameWithPermissions

func (_m *RoleRepository) GetRoleByGuardNameWithPermissions(guardName string) (role models.Role, err error)

GetRoleByGuardNameWithPermissions provides a mock function with given fields: guardName

func (*RoleRepository) GetRoleByID

func (_m *RoleRepository) GetRoleByID(ID uint) (role models.Role, err error)

GetRoleByID provides a mock function with given fields: ID

func (*RoleRepository) GetRoleByIDWithPermissions

func (_m *RoleRepository) GetRoleByIDWithPermissions(ID uint) (role models.Role, err error)

GetRoleByIDWithPermissions provides a mock function with given fields: ID

func (*RoleRepository) GetRoleIDs

func (_m *RoleRepository) GetRoleIDs(pagination scopes.GormPager) (roleIDs []uint, totalCount int64, err error)

GetRoleIDs provides a mock function with given fields: pagination

func (*RoleRepository) GetRoleIDsOfPermission

func (_m *RoleRepository) GetRoleIDsOfPermission(permissionID uint, pagination scopes.GormPager) (roleIDs []uint, totalCount int64, err error)

GetRoleIDsOfPermission provides a mock function with given fields: userID, pagination

func (*RoleRepository) GetRoleIDsOfUser

func (_m *RoleRepository) GetRoleIDsOfUser(userID uint, pagination scopes.GormPager) (roleIDs []uint, totalCount int64, err error)

GetRoleIDsOfUser provides a mock function with given fields: userID, pagination

func (*RoleRepository) GetRoles

func (_m *RoleRepository) GetRoles(IDs []uint) (roles collections.Role, err error)

GetRoles provides a mock function with given fields: IDs

func (*RoleRepository) GetRolesByGuardNames

func (_m *RoleRepository) GetRolesByGuardNames(guardNames []string) (roles collections.Role, err error)

GetRolesByGuardNames provides a mock function with given fields: guardNames

func (*RoleRepository) GetRolesByGuardNamesWithPermissions

func (_m *RoleRepository) GetRolesByGuardNamesWithPermissions(guardNames []string) (roles collections.Role, err error)

GetRolesByGuardNamesWithPermissions provides a mock function with given fields: guardNames

func (*RoleRepository) GetRolesWithPermissions

func (_m *RoleRepository) GetRolesWithPermissions(IDs []uint) (roles collections.Role, err error)

GetRolesWithPermissions provides a mock function with given fields: IDs

func (*RoleRepository) HasAllPermissions

func (_m *RoleRepository) HasAllPermissions(roles collections.Role, permissions collections.Permission) (b bool, err error)

HasAllPermissions provides a mock function with given fields: roles, permissions

func (*RoleRepository) HasAnyPermissions

func (_m *RoleRepository) HasAnyPermissions(roles collections.Role, permissions collections.Permission) (b bool, err error)

HasAnyPermissions provides a mock function with given fields: roles, permissions

func (*RoleRepository) HasPermission

func (_m *RoleRepository) HasPermission(roles collections.Role, permission models.Permission) (b bool, err error)

HasPermission provides a mock function with given fields: role, permissions

func (*RoleRepository) Migrate

func (_m *RoleRepository) Migrate() (err error)

Migrate provides a mock function.

func (*RoleRepository) RemovePermissions

func (_m *RoleRepository) RemovePermissions(role *models.Role, permissions collections.Permission) error

RemovePermissions provides a mock function with given fields: role, permissions

func (*RoleRepository) ReplacePermissions

func (_m *RoleRepository) ReplacePermissions(role *models.Role, permissions collections.Permission) error

ReplacePermissions provides a mock function with given fields: role, permissions

func (*RoleRepository) Updates

func (_m *RoleRepository) Updates(role *models.Role, updates map[string]interface{}) (err error)

Updates provides a mock function with given fields: permission, updates

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the UserRepository type

func (*UserRepository) AddPermissions

func (_m *UserRepository) AddPermissions(userID uint, permissions collections.Permission) error

AddPermissions provides a mock function with given fields: userID, permissions

func (*UserRepository) AddRoles

func (_m *UserRepository) AddRoles(userID uint, roles collections.Role) error

AddRoles provides a mock function with given fields: userID, roles

func (*UserRepository) ClearPermissions

func (_m *UserRepository) ClearPermissions(userID uint) (err error)

ClearPermissions provides a mock function with given fields: userID

func (*UserRepository) ClearRoles

func (_m *UserRepository) ClearRoles(userID uint) (err error)

ClearRoles provides a mock function with given fields: userID

func (*UserRepository) HasAllDirectPermissions

func (_m *UserRepository) HasAllDirectPermissions(userID uint, permissions collections.Permission) (b bool, err error)

HasAllDirectPermissions provides a mock function with given fields: userID, permissions

func (*UserRepository) HasAllRoles

func (_m *UserRepository) HasAllRoles(userID uint, roles collections.Role) (b bool, err error)

HasAllRoles provides a mock function with given fields: userID, roles

func (*UserRepository) HasAnyDirectPermissions

func (_m *UserRepository) HasAnyDirectPermissions(userID uint, permissions collections.Permission) (b bool, err error)

HasAnyDirectPermissions provides a mock function with given fields: userID, permissions

func (*UserRepository) HasAnyRoles

func (_m *UserRepository) HasAnyRoles(userID uint, roles collections.Role) (b bool, err error)

HasAnyRoles provides a mock function with given fields: userID, roles

func (*UserRepository) HasDirectPermission

func (_m *UserRepository) HasDirectPermission(userID uint, permission models.Permission) (b bool, err error)

HasDirectPermission provides a mock function with given fields: userID, permission

func (*UserRepository) HasRole

func (_m *UserRepository) HasRole(userID uint, role models.Role) (b bool, err error)

HasRole provides a mock function with given fields: userID, role

func (*UserRepository) RemovePermissions

func (_m *UserRepository) RemovePermissions(userID uint, permissions collections.Permission) error

RemovePermissions provides a mock function with given fields: userID, permissions

func (*UserRepository) RemoveRoles

func (_m *UserRepository) RemoveRoles(userID uint, roles collections.Role) error

RemoveRoles provides a mock function with given fields: userID, roles

func (*UserRepository) ReplacePermissions

func (_m *UserRepository) ReplacePermissions(userID uint, permissions collections.Permission) error

ReplacePermissions provides a mock function with given fields: userID, permissions

func (*UserRepository) ReplaceRoles

func (_m *UserRepository) ReplaceRoles(userID uint, roles collections.Role) error

ReplaceRoles provides a mock function with given fields: userID, roles

Jump to

Keyboard shortcuts

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