Versions in this module Expand all Collapse all v4 v4.2.0 Mar 28, 2022 Changes in this version + type Adapter struct + func NewAdapter(driverName string, dataSourceName string, params ...interface{}) (*Adapter, error) + func NewAdapterByDB(db *gorm.DB) (*Adapter, error) + func NewAdapterByDBUseTableName(db *gorm.DB, prefix string, tableName string) (*Adapter, error) + func NewAdapterByDBWithCustomTable(db *gorm.DB, t interface{}, tableName ...string) (*Adapter, error) + func NewAdapterByMulDb(dbPool DbPool, dbName string, prefix string, tableName string) (*Adapter, error) + func NewFilteredAdapter(driverName string, dataSourceName string, params ...interface{}) (*Adapter, error) + func (a *Adapter) AddLogger(l logger.Interface) + func (a *Adapter) AddPolicies(sec string, ptype string, rules [][]string) error + func (a *Adapter) AddPolicy(sec string, ptype string, rule []string) error + func (a *Adapter) Close() error + func (a *Adapter) IsFiltered() bool + func (a *Adapter) LoadFilteredPolicy(model model.Model, filter interface{}) error + func (a *Adapter) LoadPolicy(model model.Model) error + func (a *Adapter) Open() error + func (a *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error + func (a *Adapter) RemovePolicies(sec string, ptype string, rules [][]string) error + func (a *Adapter) RemovePolicy(sec string, ptype string, rule []string) error + func (a *Adapter) SavePolicy(model model.Model) error + func (a *Adapter) UpdateFilteredPolicies(sec string, ptype string, newPolicies [][]string, fieldIndex int, ...) ([][]string, error) + func (a *Adapter) UpdatePolicies(sec string, ptype string, oldRules, newRules [][]string) error + func (a *Adapter) UpdatePolicy(sec string, ptype string, oldRule, newPolicy []string) error + type CasbinRule struct + ID uint + Ptype string + V0 string + V1 string + V2 string + V3 string + V4 string + V5 string + func (CasbinRule) TableName() string + type DbPool struct + func InitDbResolver(dbArr []gorm.Dialector, dbNames []string) (DbPool, error) + type Filter struct + Ptype []string + V0 []string + V1 []string + V2 []string + V3 []string + V4 []string + V5 []string Other modules containing this package github.com/arsenal1447/gorm-adapter