orm

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orm

type Orm struct {
	*gorm.DB
	// contains filtered or unexported fields
}

Orm - main structure for orm object

func NewMySqlOrm

func NewMySqlOrm(config *OrmConfig) *Orm

NewMySqlOrm - creates a new Orm object with MySQL connection

func NewSQLiteOrm

func NewSQLiteOrm(config *OrmConfig) *Orm

NewSQLiteOrm - creates a new Orm object with SQLite connection

type OrmConfig

type OrmConfig struct {
	OnGCP               bool
	DbName              string
	DbUser              string
	DbPassword          string
	DbHost              string
	DbPort              *int // defaults to 3306
	MaxIdleConns        *int // default to 100
	MaxOpenConns        *int // default to 100
	ConnMaxLifetimeMins *int // defaults to 15
	Logger              *logger.Interface
}

OrmConfig - configuration structure for config values at ORM module

Jump to

Keyboard shortcuts

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