Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultMaxOpenCon = 100
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(c DatabaseConf) (*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 bool `json:",optional"` Type string `json:",optional"` // "postgres" or "mysql" MaxOpenConns *int `json:",optional,default=100"` Debug bool `json:",optional,default=false"` }
func (DatabaseConf) MysqlDSN ¶
func (c DatabaseConf) MysqlDSN() string
func (DatabaseConf) NewEntOption ¶
func (DatabaseConf) PostgresDSN ¶
func (c DatabaseConf) PostgresDSN() string
Click to show internal directories.
Click to hide internal directories.