Documentation
¶
Index ¶
- Variables
- func CollectTaggedColumns(entity interface{}, setting string) []string
- func OnConflictClause(entity interface{}, setting string, updateAll bool, doUpdates clause.Set) *clause.OnConflict
- type DB
- type JSONB
- type LogrusLogger
- func (l *LogrusLogger) Error(ctx context.Context, s string, i ...interface{})
- func (l *LogrusLogger) Info(ctx context.Context, s string, i ...interface{})
- func (l *LogrusLogger) LogMode(logger.LogLevel) logger.Interface
- func (l *LogrusLogger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *LogrusLogger) Unmask() *logrus.Logger
- func (l *LogrusLogger) Warn(ctx context.Context, s string, i ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Logger = (*LogrusLogger)(logrus.StandardLogger()) DefaultConfig = &gorm.Config{Logger: Logger} )
Functions ¶
func CollectTaggedColumns ¶
CollectTaggedColumns collects all columns from this entity tagged with a setting from this entity and all its embedded structs.
func OnConflictClause ¶
func OnConflictClause(entity interface{}, setting string, updateAll bool, doUpdates clause.Set) *clause.OnConflict
OnConflictClause generates ON CONFLICT clause containing columns tagged with "setting" in the struct of "entity".
Types ¶
type JSONB ¶
type JSONB json.RawMessage
JSONB provides PostgreSQL jsonb type support for gorm.
func (JSONB) GormDataType ¶
type LogrusLogger ¶
LogrusLogger is an adapter for logrus.Logger allowing it to be used in gorm.Config.
func (*LogrusLogger) Error ¶
func (l *LogrusLogger) Error(ctx context.Context, s string, i ...interface{})
func (*LogrusLogger) Info ¶
func (l *LogrusLogger) Info(ctx context.Context, s string, i ...interface{})
func (*LogrusLogger) Unmask ¶
func (l *LogrusLogger) Unmask() *logrus.Logger
Click to show internal directories.
Click to hide internal directories.