ulflow_phattt2901 f4ef71b63b
Some checks failed
CI Pipeline / Security Scan (push) Failing after 5m24s
CI Pipeline / Lint (push) Failing after 5m30s
CI Pipeline / Test (push) Has been skipped
CI Pipeline / Build (push) Has been skipped
CI Pipeline / Notification (push) Successful in 1s
feat: implement user authentication system with JWT and role-based access control
2025-05-24 11:24:19 +07:00

25 lines
687 B
Go

package role
import "context"
// Repository định nghĩa các phương thức làm việc với dữ liệu vai trò
type Repository interface {
// Create tạo mới vai trò
Create(ctx context.Context, role *Role) error
// GetByID lấy thông tin vai trò theo ID
GetByID(ctx context.Context, id int) (*Role, error)
// GetByName lấy thông tin vai trò theo tên
GetByName(ctx context.Context, name string) (*Role, error)
// List lấy danh sách vai trò
List(ctx context.Context) ([]*Role, error)
// Update cập nhật thông tin vai trò
Update(ctx context.Context, role *Role) error
// Delete xóa vai trò
Delete(ctx context.Context, id int) error
}