repo

package
v0.0.0-...-e345738 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module exports dependency

Functions

func NewGormConfig

func NewGormConfig(cfg *config.Config) gorm.Config

NewGormConfig make gormConfig

Types

type Database

type Database struct {
	*gorm.DB
}

Database modal

func NewDatabase

func NewDatabase(cfg *config.Config) *Database

NewDatabase creates a new database instance

type UserRepository

type UserRepository struct {
	*Database
}

UserRepository database structure

func NewUserRepository

func NewUserRepository(db *Database) *UserRepository

NewUserRepository creates a new user repository

func (*UserRepository) WithTx

func (r *UserRepository) WithTx(txHandle *gorm.DB) *UserRepository

WithTx enables repository with transaction

Jump to

Keyboard shortcuts

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