persistence

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterModel

func RegisterModel(models ...interface{})

RegisterModel

Types

type OrmContext

type OrmContext struct {
	Context orm.Ormer
}

func InitPostgresOrm

func InitPostgresOrm(config PostgresConfig) (context OrmContext, err error)

Initialize

func InitSqliteOrm

func InitSqliteOrm(config SqliteConfig) (context OrmContext, err error)

type PostgresConfig

type PostgresConfig struct {
	UserName string

	Password string
	Host     string
	Port     int
	DbName   string
	MaxIdle  int
	MaxConn  int
	InitDb   bool
}

type SqliteConfig

type SqliteConfig struct {
	Database string
}

Jump to

Keyboard shortcuts

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