db

package
v0.0.0-...-6d5e59d Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func New

func New(opts Option) (*gorm.DB, error)

New Open initialize db session based on opts.

Types

type Option

type Option struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	LogFile  string `yaml:"logFile"`
}

func (*Option) Valid

func (opts *Option) Valid() []error

Jump to

Keyboard shortcuts

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