repositories

package
v0.0.0-...-11fa6ca Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() fx.Option

Types

type EStatementRepository

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

func (*EStatementRepository) Aggregate

func (r *EStatementRepository) Aggregate(eStatement *models.EStatement, db *gorm.DB) error

func (*EStatementRepository) AggregateDetail

func (r *EStatementRepository) AggregateDetail(eStatementDetail []models.EStatementDetail, db *gorm.DB) error

func (*EStatementRepository) AggregateMetadata

func (r *EStatementRepository) AggregateMetadata(eStatementMetadata *models.EStatementMetadata, db *gorm.DB) error

func (*EStatementRepository) Begin

func (r *EStatementRepository) Begin() *gorm.DB

func (*EStatementRepository) Bomb

func (r *EStatementRepository) Bomb() error

func (*EStatementRepository) Construct

func (r *EStatementRepository) Construct() interface{}

func (*EStatementRepository) FindAll

func (r *EStatementRepository) FindAll(page, perPage int) ([]models.EStatement, error)

func (*EStatementRepository) FindAllCount

func (r *EStatementRepository) FindAllCount() (int64, error)

func (*EStatementRepository) GetAnomalyTransactions

func (r *EStatementRepository) GetAnomalyTransactions(
	eStatementID uint,
) ([]models.EStatementDetail, error)

func (*EStatementRepository) GetBalance

func (r *EStatementRepository) GetBalance(idEstatement uint, balanceType string) (float64, error)

func (*EStatementRepository) GetDetail

func (r *EStatementRepository) GetDetail(eStatementID uint) ([]models.EStatementDetail, error)

func (*EStatementRepository) GetEStatementByFilename

func (r *EStatementRepository) GetEStatementByFilename(filename string) (*models.EStatement, error)

func (*EStatementRepository) GetHeader

func (r *EStatementRepository) GetHeader(eStatementID uint) (*models.EStatement, error)

func (*EStatementRepository) GetMonthlyBalances

func (r *EStatementRepository) GetMonthlyBalances(eStatementID uint, balanceType string) ([]MonthlyAmount, error)

func (*EStatementRepository) GetMonthlyTopChangeByTransactionType

func (r *EStatementRepository) GetMonthlyTopChangeByTransactionType(
	eStatementID uint,
	transactionType string,
	limit int,
) ([]MonthlyEStatementDetails, error)

func (*EStatementRepository) GetMonthlyTransactionStatsByTransactionType

func (r *EStatementRepository) GetMonthlyTransactionStatsByTransactionType(
	eStatementID uint,
	transactionType, statType string,
) ([]MonthlyAmount, error)

func (*EStatementRepository) GetTopChangeByTransactionType

func (r *EStatementRepository) GetTopChangeByTransactionType(
	eStatementID uint,
	transactionType string,
	limit int,
) ([]models.EStatementDetail, error)

func (*EStatementRepository) GetTotalChangeByCategory

func (r *EStatementRepository) GetTotalChangeByCategory(
	eStatementID uint,
	categoryType string,
) (float64, error)

func (*EStatementRepository) GetTransactionStatsByTransactionType

func (r *EStatementRepository) GetTransactionStatsByTransactionType(
	eStatementID uint,
	transactionType, statType string,
) (float64, error)

func (*EStatementRepository) IsFileAlreadyScanned

func (r *EStatementRepository) IsFileAlreadyScanned(filename string) bool

type MonthlyAmount

type MonthlyAmount struct {
	Date   time.Time `json:"date"`
	Amount float64   `json:"amount"`
}

type MonthlyEStatementDetails

type MonthlyEStatementDetails struct {
	Date   time.Time                 `json:"date"`
	Detail []models.EStatementDetail `json:"e_statement_details"`
}

type UserRepository

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

func (*UserRepository) Construct

func (r *UserRepository) Construct() interface{}

func (*UserRepository) Create

func (r *UserRepository) Create(user *models.User) error

func (*UserRepository) Delete

func (r *UserRepository) Delete(id uint) error

func (*UserRepository) FindAll

func (r *UserRepository) FindAll(
	page int,
	perPage int,
) ([]models.User, error)

func (*UserRepository) FindAllCount

func (r *UserRepository) FindAllCount() (int64, error)

func (*UserRepository) FindByID

func (r *UserRepository) FindByID(id uint) (*models.User, error)

func (*UserRepository) Update

func (r *UserRepository) Update(user *models.User) error

func (*UserRepository) UserPermissions

func (r *UserRepository) UserPermissions(id uint) ([]models.Permission, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳