db

package
v0.0.0-...-da789b0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(
	NewConfig,
	NewGormDB,
)

Functions

func NewGormDB

func NewGormDB(config Config, cache bucket.Bucket) (*gorm.DB, error)

Types

type Config

type Config struct {
	Driver string `yaml:"driver"`
	DSN    string `yaml:"dsn"`
}

func NewConfig

func NewConfig(provider config.Provider) (Config, error)

func NewDefaultConfig

func NewDefaultConfig() Config

type Logger

type Logger struct {
}

func (Logger) Debug

func (l Logger) Debug(ctx context.Context, msg string, opts ...interface{})

func (Logger) Error

func (l Logger) Error(ctx context.Context, msg string, opts ...interface{})

func (Logger) Info

func (l Logger) Info(ctx context.Context, msg string, opts ...interface{})

func (Logger) LogMode

func (l Logger) LogMode(logger.LogLevel) logger.Interface

func (Logger) Trace

func (l Logger) Trace(ctx context.Context, begin time.Time, f func() (string, int64), err error)

func (Logger) Warn

func (l Logger) Warn(ctx context.Context, msg string, opts ...interface{})

Jump to

Keyboard shortcuts

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