Documentation
¶
Index ¶
- func OpenCasbinEnforcer(db *gorm.DB, re *redis_.Cluster) (*casbin.Enforcer, error)
- type Database
- type GrpcClient
- type Logger
- func (l *Logger) EnableLog(enable bool)
- func (l *Logger) IsEnabled() bool
- func (l *Logger) LogEnforce(matcher string, request []interface{}, result bool, explains [][]string)
- func (l *Logger) LogError(err error, msg ...string)
- func (l *Logger) LogModel(model [][]string)
- func (l *Logger) LogPolicy(policy map[string][][]string)
- func (l *Logger) LogRole(roles []string)
- type MySql
- type PostgreSql
- type Smtp
- type SqlServer
- type Sqlite3
- type Tls
- type Twilio
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct { PostgreSql PostgreSql `toml:"postgresql,omitempty"` MySql MySql `toml:"mysql,omitempty"` SqlServer SqlServer `toml:"sqlserver,omitempty"` }
type GrpcClient ¶
https://github.com/grpc/grpc/blob/master/doc/naming.md
func (*GrpcClient) Address ¶
func (p *GrpcClient) Address() string
func (*GrpcClient) Open ¶
func (p *GrpcClient) Open() (*grpc.ClientConn, error)
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) LogEnforce ¶
type MySql ¶
type MySql struct { Host string `toml:"host"` Port uint16 `toml:"port"` DbName string `toml:"dbname"` User string `toml:"user"` Password string `toml:"password"` PoolSize int `toml:"pool-size"` }
type PostgreSql ¶
type PostgreSql struct { Host string `toml:"host"` Port uint16 `toml:"port"` DbName string `toml:"dbname"` User string `toml:"user"` Password string `toml:"password"` PoolSize int `toml:"pool-size"` }
func (*PostgreSql) Url ¶
func (p *PostgreSql) Url() string
type SqlServer ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.