Documentation
¶
Index ¶
- Constants
- func Bind(app *runtime.App, manager *Manager) error
- func DeletePolicyRules(ctx context.Context, db *gorm.DB, filter RuleFilter) error
- func DeletePolicyTuples(ctx context.Context, db *gorm.DB, rules []Rule) error
- func EnsurePolicyTable(ctx context.Context, db *gorm.DB) error
- func Init(db *database.Database, cfg Config) error
- func InitContext(ctx context.Context, db *database.Database, cfg Config) error
- func InsertPolicyRules(ctx context.Context, db *gorm.DB, rules []Rule) error
- func PolicyRuleCountsByV0(ctx context.Context, db *gorm.DB, filter RuleFilter, keyFunc func(Rule) string) (map[string]int64, error)
- func Reload()
- func ReplacePolicyRules(ctx context.Context, db *gorm.DB, deleteFilter RuleFilter, rules []Rule) error
- type Config
- type Manager
- type Rule
- type RuleFilter
Constants ¶
View Source
const ( KeyCasbin runtime.Key = "casbin" DefaultModelPath = "configs/rbac_model.conf" DefaultSuperRole = "admin" DefaultRuleTable = "casbin_rule" )
Variables ¶
This section is empty.
Functions ¶
func DeletePolicyRules ¶ added in v0.1.4
func DeletePolicyTuples ¶ added in v0.1.4
func EnsurePolicyTable ¶ added in v0.1.4
func InsertPolicyRules ¶ added in v0.1.4
func PolicyRuleCountsByV0 ¶ added in v0.1.4
func ReplacePolicyRules ¶ added in v0.1.4
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
var Default *Manager
func NewContext ¶
func (*Manager) ReloadContext ¶
Click to show internal directories.
Click to hide internal directories.