database

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(New, NewOptions)

Functions

func New

func New(o *Options) (*gorm.DB, error)

New 初始化数据库

Types

type Options

type Options struct {
	URL   string `yaml:"url"`
	Debug bool
}

Options is configuration of database

func NewOptions

func NewOptions(v *viper.Viper, logger *zap.Logger) (*Options, error)

Jump to

Keyboard shortcuts

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