gormfactory

package
v0.0.0-...-90365bb Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustOpenInMem

func MustOpenInMem() *gorm.DB

func Open

func Open(cfg Config) (*gorm.DB, error)

func OpenInMem

func OpenInMem() (*gorm.DB, error)

Types

type Config

type Config struct {
	Type  string `envconfig:"TYPE" default:"sqlite" json:"type"`
	DSN   string `envconfig:"DSN" default:"file::memory:?cache=shared" json:"dsn"`
	Debug bool   `envconfig:"DEBUG" json:"debug"`
}

func (Config) IsZero

func (c Config) IsZero() bool

Jump to

Keyboard shortcuts

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