package
0.1.82
Repository: https://github.com/techmaster/core.git
Documentation: pkg.go.dev

# Functions

Chuyển các role được hard code từ hệ thống cũ dựa trên path + method vào hệ thống mới Lưu ý kết nối casbin database trước */.
Danh sách các role có thể truy xuất.
Cho phép tất cả các role.
No description provided by the author
No description provided by the author
Hàm này cần được gọi trước tất cả handler do lập trình viên viết.
Hàm ConnectDB nhận vào đường dẫn đến file config casbin (mặc định là "config/rbac_model.conf") và database redis sẽ lưu các policy (mặc định là 3), trả về enforcer để sau này thêm, xóa, cập nhật policy */.
Hàm chuyển đổi từ Rule sang Route.
In ra thông tin debug Route - Rote thành 2 phần Phần Public: những route không cần kiểm tra phân quyền Phần Private: những route cần kiểm tra quyền */.
In ra danh sách những đường dẫn public không kiểm tra quyền */.
In ra thông tin Private Route - Role route = HTTP Verb + path */.
No description provided by the author
Danh sách các role bị cấm truy cập.
Cấm tất cả các role ngoại trừ root.
No description provided by the author
Cấu hình rbac */.
No description provided by the author
No description provided by the author
Tạo cấu hình mặc định cho RBAC */.
No description provided by the author
Post
No description provided by the author
No description provided by the author
Hàm tự động insert các roles vào database @param funcInsert: hàm insert roles vào database @param rolesDefault: danh sách các roles mặc định */.
Hàm tự động insert các rules vào database @param handleInsert: hàm insert rules vào database @param handleDelete: hàm xóa rules khỏi database */.
No description provided by the author
Chuyển role từ in string.
Chuyển roles kiểu map[int]bool thành mảng string mô tả các role` */.
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Lưu danh sách các role.

# Structs

Cấu hình cho hệ thống RBAC */.
Cấu trúc dùng để lưu thông tin của một route.
No description provided by the author

# Type aliases

Biểu thức hàm sẽ trả về - bool: true nếu là allow, false: nếu là forbid - danh sách role kiểu map[int]bool.