databases

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is a provider set for wire

Functions

func NewMariaDB

func NewMariaDB(o *Options) (*sqlx.DB, error)

NewMariaDB init mariadb client

func NewMongoDB

func NewMongoDB(cfg *config.Config) (*mongo.Client, error)

NewMongoDB init mongodb client

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 serve caller to create an Options

Jump to

Keyboard shortcuts

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