gorm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2018 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

func GetConnection() *gorm.DB

GetConnection manage a pool of session TODO

func InitGormRepo

func InitGormRepo()

InitGormRepo initialises a Gorm backend backed by SQLite

func InitGormTestRepo

func InitGormTestRepo(sqliteFileAbsPath string)

InitGormTestRepo is a convenience method to ease Unit Test implementation

func WithUserRoles

func WithUserRoles(user *model.User)

WithUserRoles retrieves the roles stored as object in gorm and stores a string array of roles ID to ease JSON serialisation and manipulation by the front User must have been preloaded with the underlying roles

Types

This section is empty.

Jump to

Keyboard shortcuts

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