Documentation ¶
Index ¶
- func NewUnitOfWork(log logger.Logger, db *sql.DB) port.AuthUnitOfWork
- type ACLRepository
- type MockACLRepository
- type MockPermissionRepository
- type MockRoleRepository
- func (r *MockRoleRepository) Create(role domain.Role) error
- func (r *MockRoleRepository) Delete(uuid uuid.UUID, deletedBy uint64) error
- func (r *MockRoleRepository) ExistKey(key domain.RoleKeyType) (bool, error)
- func (r *MockRoleRepository) GetByUUID(uuid uuid.UUID) (*domain.Role, error)
- func (r *MockRoleRepository) GetPermissions(roleUUID uuid.UUID) (*domain.Role, error)
- func (r *MockRoleRepository) GetRoleUser() (domain.Role, error)
- func (r *MockRoleRepository) GetUserRoleKeys(userID uint64) ([]domain.RoleKeyType, error)
- func (r *MockRoleRepository) List() ([]*domain.Role, error)
- func (r *MockRoleRepository) SyncPermissions(roleID uint64, permissionIDs []uint64) error
- func (r *MockRoleRepository) Update(role domain.Role, uuid uuid.UUID) error
- type MockUnitOfWork
- func (r *MockUnitOfWork) ACLRepository() port.ACLRepository
- func (r *MockUnitOfWork) BeginTx(ctx context.Context) error
- func (r *MockUnitOfWork) Commit() error
- func (r *MockUnitOfWork) PermissionRepository() port.PermissionRepository
- func (r *MockUnitOfWork) RoleRepository() port.RoleRepository
- func (r *MockUnitOfWork) Rollback() error
- type PermissionRepository
- type RoleRepository
- func (r *RoleRepository) Create(role domain.Role) error
- func (r *RoleRepository) Delete(uuid uuid.UUID, deletedBy uint64) error
- func (r *RoleRepository) ExistKey(key domain.RoleKeyType) (bool, error)
- func (r *RoleRepository) GetByUUID(uuid uuid.UUID) (*domain.Role, error)
- func (r *RoleRepository) GetPermissions(roleUUID uuid.UUID) (*domain.Role, error)
- func (r *RoleRepository) GetRoleUser() (role domain.Role, err error)
- func (r *RoleRepository) GetUserRoleKeys(userID uint64) ([]domain.RoleKeyType, error)
- func (r *RoleRepository) List() ([]*domain.Role, error)
- func (r *RoleRepository) SyncPermissions(roleID uint64, permissionIDs []uint64) error
- func (r *RoleRepository) Update(role domain.Role, uuid uuid.UUID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUnitOfWork ¶
Types ¶
type ACLRepository ¶
type ACLRepository struct {
// contains filtered or unexported fields
}
func NewACLRepository ¶
func NewACLRepository(log logger.Logger, tx *sql.Tx) *ACLRepository
func (*ACLRepository) AssignRolesToUser ¶
func (r *ACLRepository) AssignRolesToUser(userID uint64, roleIDs []uint64) error
type MockACLRepository ¶
func (*MockACLRepository) AssignRolesToUser ¶
func (r *MockACLRepository) AssignRolesToUser(userID uint64, roleIDs []uint64) error
type MockPermissionRepository ¶
func (*MockPermissionRepository) FilterValidPermissions ¶
func (r *MockPermissionRepository) FilterValidPermissions(uuids []uuid.UUID) ([]uint64, error)
func (*MockPermissionRepository) GetUserPermissionKeys ¶
func (r *MockPermissionRepository) GetUserPermissionKeys(userID uint64) ([]domain.PermissionKeyType, error)
func (*MockPermissionRepository) List ¶
func (r *MockPermissionRepository) List() ([]*domain.Permission, error)
type MockRoleRepository ¶
func (*MockRoleRepository) Delete ¶
func (r *MockRoleRepository) Delete(uuid uuid.UUID, deletedBy uint64) error
func (*MockRoleRepository) ExistKey ¶
func (r *MockRoleRepository) ExistKey(key domain.RoleKeyType) (bool, error)
func (*MockRoleRepository) GetPermissions ¶
func (*MockRoleRepository) GetRoleUser ¶
func (r *MockRoleRepository) GetRoleUser() (domain.Role, error)
func (*MockRoleRepository) GetUserRoleKeys ¶
func (r *MockRoleRepository) GetUserRoleKeys(userID uint64) ([]domain.RoleKeyType, error)
func (*MockRoleRepository) SyncPermissions ¶
func (r *MockRoleRepository) SyncPermissions(roleID uint64, permissionIDs []uint64) error
type MockUnitOfWork ¶
func (*MockUnitOfWork) ACLRepository ¶
func (r *MockUnitOfWork) ACLRepository() port.ACLRepository
func (*MockUnitOfWork) Commit ¶
func (r *MockUnitOfWork) Commit() error
func (*MockUnitOfWork) PermissionRepository ¶
func (r *MockUnitOfWork) PermissionRepository() port.PermissionRepository
func (*MockUnitOfWork) RoleRepository ¶
func (r *MockUnitOfWork) RoleRepository() port.RoleRepository
func (*MockUnitOfWork) Rollback ¶
func (r *MockUnitOfWork) Rollback() error
type PermissionRepository ¶
type PermissionRepository struct {
// contains filtered or unexported fields
}
func NewPermissionRepository ¶
func NewPermissionRepository(log logger.Logger, tx *sql.Tx) *PermissionRepository
func (*PermissionRepository) FilterValidPermissions ¶
func (r *PermissionRepository) FilterValidPermissions(uuids []uuid.UUID) ([]uint64, error)
func (*PermissionRepository) GetUserPermissionKeys ¶
func (r *PermissionRepository) GetUserPermissionKeys(userID uint64) ([]domain.PermissionKeyType, error)
func (*PermissionRepository) List ¶
func (r *PermissionRepository) List() ([]*domain.Permission, error)
type RoleRepository ¶
type RoleRepository struct {
// contains filtered or unexported fields
}
func NewRoleRepository ¶
func NewRoleRepository(log logger.Logger, tx *sql.Tx) *RoleRepository
func (*RoleRepository) Delete ¶
func (r *RoleRepository) Delete(uuid uuid.UUID, deletedBy uint64) error
func (*RoleRepository) ExistKey ¶
func (r *RoleRepository) ExistKey(key domain.RoleKeyType) (bool, error)
func (*RoleRepository) GetPermissions ¶
func (*RoleRepository) GetRoleUser ¶
func (r *RoleRepository) GetRoleUser() (role domain.Role, err error)
func (*RoleRepository) GetUserRoleKeys ¶
func (r *RoleRepository) GetUserRoleKeys(userID uint64) ([]domain.RoleKeyType, error)
func (*RoleRepository) SyncPermissions ¶
func (r *RoleRepository) SyncPermissions(roleID uint64, permissionIDs []uint64) error
Click to show internal directories.
Click to hide internal directories.