database

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost        = "0.0.0.0"
	DefaultPort        = 5432
	DefaultDbName      = "postgres"
	DefaultUser        = "postgres"
	DefaultPassword    = "password"
	DefaultSSLMode     = "allow"
	DefaultLogLevel    = "info"
	DefaultAutoMigrate = false
)

Variables

This section is empty.

Functions

func InitiateModuleAndSchema added in v0.1.1

func InitiateModuleAndSchema(scope string, schema ...interface{}) fx.Option

Types

type Config

type Config struct {
	Host        string
	Port        int
	DBName      string
	User        string
	Password    string
	SSLMode     string
	LogLevel    string
	AutoMigrate bool
}

type Module added in v0.1.8

type Module struct {
	// contains filtered or unexported fields
}

func (*Module) GetDB added in v0.1.8

func (m *Module) GetDB() *gorm.DB

GETTERS ---------------------------------------------------------

func (*Module) Migrate added in v0.1.8

func (m *Module) Migrate(schema ...interface{})

type Params

type Params struct {
	fx.In

	Lifecycle fx.Lifecycle
	Logger    *zap.Logger
}

Jump to

Keyboard shortcuts

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