repository

package
v0.0.0-...-3467a1f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type RepositoryImpl

type RepositoryImpl struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *sqlx.DB) *RepositoryImpl

func (*RepositoryImpl) UserRepo

func (r *RepositoryImpl) UserRepo() model.UserRepo

func (*RepositoryImpl) WithTransaction

func (r *RepositoryImpl) WithTransaction(ctx context.Context, fn model.TxFunc) error

type TxFn

type TxFn func(tx *sqlx.Tx) error

TxFn is a function that will be called with an initialized `Transaction` object that can be used for executing statements and queries against a database.

type UserRepo

type UserRepo RepositoryImpl

func NewUserRepo

func NewUserRepo(db *sqlx.DB) *UserRepo

func (*UserRepo) GetList

func (s *UserRepo) GetList(ctx context.Context, option model.GetUserOption) ([]model.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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