Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdapter ¶
NewAdapter creates a new adapter. It assumes that the Bolt DB is already open. A bucket name is required and represents the Bolt bucket to save the data into. like to save to. The builtinPolicy is a string representation of a Casbin csv policy definition. If left builtinPolicy will not be used.
Types ¶
type CasbinRule ¶
type CasbinRule struct { Key string `json:"key"` PType string `json:"p_type"` V0 string `json:"v0"` V1 string `json:"v1"` V2 string `json:"v2"` V3 string `json:"v3"` V4 string `json:"v4"` V5 string `json:"v5"` }
CasbinRule represents a Casbin rule line.
func (*CasbinRule) Rule ¶
func (cr *CasbinRule) Rule() []string
Click to show internal directories.
Click to hide internal directories.