database

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDB

func OpenDB(config *config.Database, logger hclog.Logger) (domain.Repository, error)

Types

type GormLoggerAdapter

type GormLoggerAdapter struct {
	// contains filtered or unexported fields
}

func (*GormLoggerAdapter) Error

func (g *GormLoggerAdapter) Error(ctx context.Context, s string, i ...interface{})

func (*GormLoggerAdapter) Info

func (g *GormLoggerAdapter) Info(ctx context.Context, s string, i ...interface{})

func (*GormLoggerAdapter) LogMode

func (g *GormLoggerAdapter) LogMode(level logger.LogLevel) logger.Interface

func (*GormLoggerAdapter) Trace

func (g *GormLoggerAdapter) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)

func (*GormLoggerAdapter) Warn

func (g *GormLoggerAdapter) Warn(ctx context.Context, s string, i ...interface{})

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func (*Postgres) DB

func (s *Postgres) DB() *gorm.DB

func (*Postgres) Lock

func (s *Postgres) Lock() error

func (*Postgres) Unlock

func (s *Postgres) Unlock() error

func (*Postgres) UnlockErr

func (s *Postgres) UnlockErr(prevErr error) error

type Sqlite

type Sqlite struct {
	// contains filtered or unexported fields
}

func (*Sqlite) DB

func (s *Sqlite) DB() *gorm.DB

func (*Sqlite) Lock

func (s *Sqlite) Lock() error

func (*Sqlite) Unlock

func (s *Sqlite) Unlock() error

func (*Sqlite) UnlockErr

func (s *Sqlite) UnlockErr(prevErr error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL