Documentation ¶
Overview ¶
Package database provides PostgreSQL management for Temporal (https://github.com/RTradeLtd/Temporal), an easy-to-use interface into distributed and decentralized storage technologies for personal and enterprise use cases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface{ Print(...interface{}) }
Logger defines the database's logging interface
type Manager ¶ added in v1.0.6
type Manager struct { DB *gorm.DB Upload *models.UploadManager }
Manager is used to manage databases
func New ¶
func New(cfg *config.TemporalConfig, opts Options) (*Manager, error)
New is used to init our connection to a database, and return a manager struct
func (*Manager) RunMigrations ¶ added in v1.0.6
func (dbm *Manager) RunMigrations()
RunMigrations runs all migrations
type PrintLogger ¶
type PrintLogger struct {
// contains filtered or unexported fields
}
PrintLogger wraps a single logFunc to implement the Logger interface
func NewZapLogger ¶
func NewZapLogger(level LogLevel, l *zap.SugaredLogger) *PrintLogger
NewZapLogger wraps a zap logger in a PrintLogger
func (*PrintLogger) Print ¶
func (p *PrintLogger) Print(args ...interface{})
Print logs the given message
Click to show internal directories.
Click to hide internal directories.