repository

package
v0.0.0-...-cf27996 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paginate

func Paginate(page, perPage int) func(db *gorm.DB) *gorm.DB

Types

type TransaksiRepository

type TransaksiRepository interface {
	CreateTransaksi(transaksi entity.Transaksi) (entity.Transaksi, error)
	GetTransaksiById(transaksiId string) (entity.Transaksi, error)
	GetAllTransaksi(ownerId string) ([]entity.Transaksi, error) // can be used for komunal, if admin ownerId = NULL
	UpdateTransaksi(transaksi entity.Transaksi) (entity.Transaksi, error)
	DeleteTransaksi(transaksiId entity.Transaksi) error
}

func NewTransaksiRepository

func NewTransaksiRepository(db *gorm.DB) TransaksiRepository

type UserRepository

type UserRepository interface {
	RegisterUser(ctx context.Context, tx *gorm.DB, user entity.User) (entity.User, error)
	GetUserById(ctx context.Context, tx *gorm.DB, userId string) (entity.User, error)
	CheckEmail(ctx context.Context, tx *gorm.DB, email string) (entity.User, bool, error)
}

func NewUserRepository

func NewUserRepository(db *gorm.DB) UserRepository

Jump to

Keyboard shortcuts

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