db

package
v0.0.0-...-dc60fe5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	DBName   string
	Username string
	Password string
	Options  []string
	LogLevel string
}

type GORMDatabaseModule

type GORMDatabaseModule struct {
	module.Base
	// contains filtered or unexported fields
}

func NewGORMDatabaseModule

func NewGORMDatabaseModule(name string, options *Options) *GORMDatabaseModule

func (*GORMDatabaseModule) Configure

func (p *GORMDatabaseModule) Configure() error

func (*GORMDatabaseModule) GetDB

func (p *GORMDatabaseModule) GetDB() *gorm.DB

func (*GORMDatabaseModule) Init

type MigrationFunc

type MigrationFunc = func(db *gorm.DB)

type Options

type Options struct {
	Migrations []MigrationFunc
}

Jump to

Keyboard shortcuts

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