Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CasbinConf ¶
type CasbinConf struct {
ModelText string `json:"ModelText,optional"`
}
func (CasbinConf) NewCasbin ¶
func (l CasbinConf) NewCasbin(dbType, dsn string) (*casbin.Enforcer, error)
type DatabaseConf ¶
type DatabaseConf struct { Host string Port int Username string `json:",optional"` Password string `json:",optional"` DBName string `json:",optional"` SSLMode string `json:",optional"` Type string `json:",optional"` // "postgres" or "mysql" MaxOpenConns *int `json:",optional,default=100"` Debug bool `json:",optional,default=false"` CacheTime int `json:",optional,default=10"` }
func (DatabaseConf) GetDSN ¶ added in v0.1.6
func (c DatabaseConf) GetDSN() string
func (DatabaseConf) MysqlDSN ¶
func (c DatabaseConf) MysqlDSN() string
func (DatabaseConf) NewCacheDriver ¶ added in v0.1.9
func (c DatabaseConf) NewCacheDriver(redisConf redis2.RedisConf) *entcache.Driver
func (DatabaseConf) NewNoCacheDriver ¶ added in v0.1.9
func (c DatabaseConf) NewNoCacheDriver() *entsql.Driver
func (DatabaseConf) PostgresDSN ¶
func (c DatabaseConf) PostgresDSN() string
Click to show internal directories.
Click to hide internal directories.