database

package
v0.0.0-...-9a0c271 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

ProviderSet wire注册器

Functions

func New

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

New 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)

NewOptions 获取配置信息

Jump to

Keyboard shortcuts

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