repositories

package
v0.0.0-...-a797973 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BankAccounts

type BankAccounts struct {
	DB database.IHandler
}

func (*BankAccounts) Create

func (ba *BankAccounts) Create(account *models.BankAccount) error

func (*BankAccounts) DeleteByID

func (ba *BankAccounts) DeleteByID(id string) error

func (*BankAccounts) ExistsByID

func (ba *BankAccounts) ExistsByID(id string) (bool, error)

func (*BankAccounts) GetAllByBudgetID

func (ba *BankAccounts) GetAllByBudgetID(budgetID string) ([]*models.BankAccount, error)

func (*BankAccounts) GetByID

func (ba *BankAccounts) GetByID(id string) (*models.BankAccount, error)

func (*BankAccounts) Update

func (ba *BankAccounts) Update(account *models.BankAccount) error

type Budgets

type Budgets struct {
	DB database.IHandler
}

func (*Budgets) Create

func (b *Budgets) Create(budget *models.Budget) error

func (*Budgets) DeleteByID

func (b *Budgets) DeleteByID(id string) error

func (*Budgets) ExistsByID

func (b *Budgets) ExistsByID(id string) (bool, error)

func (*Budgets) ExistsByUserIDAndName

func (b *Budgets) ExistsByUserIDAndName(userID, name string) (bool, error)

func (*Budgets) GetAllByUserAccountID

func (b *Budgets) GetAllByUserAccountID(userAccountID string) ([]*models.Budget, error)

func (*Budgets) GetByID

func (b *Budgets) GetByID(id string) (*models.Budget, error)

func (*Budgets) GetByUserIDAndName

func (b *Budgets) GetByUserIDAndName(userAccountID, name string) (*models.Budget, error)

func (*Budgets) Update

func (b *Budgets) Update(budget *models.Budget) error

type IBankAccounts

type IBankAccounts interface {
	ExistsByID(id string) (bool, error)
	GetAllByBudgetID(budgetID string) ([]*models.BankAccount, error)
	GetByID(id string) (*models.BankAccount, error)
	Create(bankAccount *models.BankAccount) error
	DeleteByID(id string) error
	Update(bankAccount *models.BankAccount) error
}

type IBudgets

type IBudgets interface {
	GetAllByUserAccountID(userAccountID string) ([]*models.Budget, error)
	ExistsByID(id string) (bool, error)
	ExistsByUserIDAndName(userID, name string) (bool, error)
	GetByID(id string) (*models.Budget, error)
	GetByUserIDAndName(userAccountID, name string) (*models.Budget, error)
	Create(budget *models.Budget) error
	DeleteByID(id string) error
	Update(budget *models.Budget) error
}

type IUserAccounts

type IUserAccounts interface {
	ExistsByID(id string) (bool, error)
	ExistsByUsername(username string) (bool, error)
	GetByID(id string) (*models.UserAccount, error)
	GetByUsername(username string) (*models.UserAccount, error)
	Create(userAccount *models.UserAccount) error
	DeleteByID(id string) error
	Update(userAccount *models.UserAccount) error
}

type UserAccounts

type UserAccounts struct {
	DB database.IHandler
}

func (*UserAccounts) Create

func (ua *UserAccounts) Create(userAccount *models.UserAccount) error

func (*UserAccounts) DeleteByID

func (ua *UserAccounts) DeleteByID(id string) error

func (*UserAccounts) ExistsByID

func (ua *UserAccounts) ExistsByID(id string) (bool, error)

func (*UserAccounts) ExistsByUsername

func (ua *UserAccounts) ExistsByUsername(username string) (bool, error)

func (*UserAccounts) GetByID

func (ua *UserAccounts) GetByID(id string) (*models.UserAccount, error)

func (*UserAccounts) GetByUsername

func (ua *UserAccounts) GetByUsername(username string) (*models.UserAccount, error)

func (*UserAccounts) Update

func (ua *UserAccounts) Update(userAccount *models.UserAccount) error

Jump to

Keyboard shortcuts

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