Versions in this module Expand all Collapse all v3 v3.18.0 Jun 17, 2024 Changes in this version + func ConditionsToGormQuery(db *gobatis.DB, conditions []string, combineType CombineType) *gobatis.DB + func TurnOffAutoMigrate(db *gobatis.DB) + type Adapter struct + func NewAdapter(driverName string, dataSourceName string, params ...interface{}) (*Adapter, error) + func NewAdapterByDB(db *gobatis.DB) (*Adapter, error) + func NewAdapterByDBUseTableName(db *gobatis.DB, prefix string, tableName string) (*Adapter, error) + func NewAdapterByDBWithCustomTable(db *gobatis.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 NewFilteredAdapterByDB(db *gobatis.DB, prefix string, tableName string) (*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) AddPolicyCtx(ctx context.Context, sec string, ptype string, rule []string) error + func (a *Adapter) Close() error + func (a *Adapter) GetDb() *gobatis.DB + 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) LoadPolicyCtx(ctx context.Context, model model.Model) error + func (a *Adapter) Open() error + func (a *Adapter) Preview(rules *[]CasbinRule, model model.Model) error + func (a *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error + func (a *Adapter) RemoveFilteredPolicyCtx(ctx context.Context, sec string, ptype string, fieldIndex int, ...) error + func (a *Adapter) RemovePolicies(sec string, ptype string, rules [][]string) error + func (a *Adapter) RemovePoliciesCtx(ctx context.Context, sec string, ptype string, rules [][]string) error + func (a *Adapter) RemovePolicy(sec string, ptype string, rule []string) error + func (a *Adapter) RemovePolicyCtx(ctx context.Context, sec string, ptype string, rule []string) error + func (a *Adapter) SavePolicy(model model.Model) error + func (a *Adapter) SavePolicyCtx(ctx context.Context, model model.Model) error + func (a *Adapter) Transaction(e casbin.IEnforcer, fc func(casbin.IEnforcer) error, opts ...*sql.TxOptions) 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 BatchFilter struct + type CasbinRule struct + ID uint + Ptype string + V0 string + V1 string + V2 string + V3 string + V4 string + V5 string + func (CasbinRule) TableName() string + type CombineType uint32 + const CombineTypeAnd + const CombineTypeOr + type DbPool struct + func InitDbResolver(dbArr []gobatis.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 gitee.com/gobatis/gobatis-adapter