database

package
v0.0.0-...-226c3a4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 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)

Init 初始化数据库

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