Documentation ¶
Index ¶
- Variables
- func DelByAuthDB(db *gorm.DB, tableName string, id, userId uint64) error
- func DelDB(db *gorm.DB, tableName string, id uint64) error
- func ExistsByAuthDB(db *gorm.DB, tableName string, id, userId uint64) (bool, error)
- func ExistsDB(db *gorm.DB, tableName string, id uint64) (bool, error)
- func GetDB(db *gorm.DB, log *log.Logger, conf *logger.Config) *gorm.DB
- func LogFormatter(values ...interface{}) (messages []interface{})
- func New2(loger *zap.Logger, conf *logger.Config) logger.Interface
- func Page(pageNo, pageSize int) clause.Limit
- func SetTranceId(traceId string) context.Context
- type Config
- type GORMConfig
- type SQLLogger
- func (l *SQLLogger) Error(ctx context.Context, msg string, data ...interface{})
- func (l *SQLLogger) Info(ctx context.Context, msg string, data ...interface{})
- func (l *SQLLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *SQLLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *SQLLogger) Warn(ctx context.Context, msg string, data ...interface{})
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ExistsByAuthDB ¶
func LogFormatter ¶
func LogFormatter(values ...interface{}) (messages []interface{})
func SetTranceId ¶
Types ¶
type GORMConfig ¶
func (*GORMConfig) Init ¶
func (c *GORMConfig) Init()
type SQLLogger ¶
Click to show internal directories.
Click to hide internal directories.