Documentation ¶
Index ¶
- func LoadModel(client *firestore.Client) (model.Model, error)
- func LoadModelWithConfig(client *firestore.Client, config Config) (model.Model, error)
- func NewAdapter(db *firestore.Client) persist.Adapter
- func NewAdapterWithConfig(db *firestore.Client, config Config) persist.Adapter
- func SaveModel(db *firestore.Client, path string) error
- func SaveModelWithConfig(client *firestore.Client, path string, config Config) error
- type CasbinModelConf
- type CasbinRule
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadModelWithConfig ¶
LoadModel loads a casbin model definition from Firestore.
func NewAdapter ¶
NewAdapter is the constructor for Adapter. A valid firestore client must be provided.
func NewAdapterWithConfig ¶
NewAdapter is the constructor for Adapter. A valid firestore client must be provided.
Types ¶
type CasbinModelConf ¶
type CasbinModelConf struct {
Text string `firestore:"text"`
}
Click to show internal directories.
Click to hide internal directories.