Documentation
¶
Index ¶
- func CreatePool(url string) (*pgxpool.Pool, error)
- func NewCategoryRepository(pool *pgxpool.Pool) *categoryRepository
- func NewMonthCategoryRepository(pool *pgxpool.Pool) *monthCategoryRepository
- func NewMonthRepository(pool *pgxpool.Pool) *monthRepository
- func NewPayeeRepository(pool *pgxpool.Pool) *payeeRepository
- type AccountRepository
- func (r *AccountRepository) Create(ctx context.Context, id beans.ID, name beans.Name, budgetID beans.ID) error
- func (r *AccountRepository) Get(ctx context.Context, id beans.ID) (*beans.Account, error)
- func (r *AccountRepository) GetForBudget(ctx context.Context, budgetID beans.ID) ([]*beans.Account, error)
- type BudgetRepository
- func (r *BudgetRepository) Create(ctx context.Context, tx beans.Tx, id beans.ID, name beans.Name, ...) error
- func (r *BudgetRepository) DB(tx beans.Tx) *db.Queries
- func (r *BudgetRepository) Get(ctx context.Context, id beans.ID) (*beans.Budget, error)
- func (r *BudgetRepository) GetBudgetsForUser(ctx context.Context, userID beans.ID) ([]*beans.Budget, error)
- type TransactionRepository
- func (r *TransactionRepository) Create(ctx context.Context, transaction *beans.Transaction) error
- func (r *TransactionRepository) Get(ctx context.Context, id beans.ID) (*beans.Transaction, error)
- func (r *TransactionRepository) GetForBudget(ctx context.Context, budgetID beans.ID) ([]*beans.Transaction, error)
- func (r *TransactionRepository) GetIncomeBetween(ctx context.Context, budgetID beans.ID, begin beans.Date, end beans.Date) (beans.Amount, error)
- func (r *TransactionRepository) Update(ctx context.Context, transaction *beans.Transaction) error
- type Tx
- type TxManager
- type UserRepository
- func (r *UserRepository) Create(ctx context.Context, id beans.ID, username beans.Username, ...) error
- func (r *UserRepository) Exists(ctx context.Context, username beans.Username) (bool, error)
- func (r *UserRepository) Get(ctx context.Context, id beans.ID) (*beans.User, error)
- func (r *UserRepository) GetByUsername(ctx context.Context, username beans.Username) (*beans.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCategoryRepository ¶
func NewMonthRepository ¶
func NewPayeeRepository ¶
Types ¶
type AccountRepository ¶
type AccountRepository struct {
// contains filtered or unexported fields
}
func NewAccountRepository ¶
func NewAccountRepository(pool *pgxpool.Pool) *AccountRepository
func (*AccountRepository) GetForBudget ¶
type BudgetRepository ¶
type BudgetRepository struct {
// contains filtered or unexported fields
}
func NewBudgetRepository ¶
func NewBudgetRepository(pool *pgxpool.Pool) *BudgetRepository
func (*BudgetRepository) GetBudgetsForUser ¶
type TransactionRepository ¶
type TransactionRepository struct {
// contains filtered or unexported fields
}
func NewTransactionRepository ¶
func NewTransactionRepository(pool *pgxpool.Pool) *TransactionRepository
func (*TransactionRepository) Create ¶
func (r *TransactionRepository) Create(ctx context.Context, transaction *beans.Transaction) error
func (*TransactionRepository) Get ¶
func (r *TransactionRepository) Get(ctx context.Context, id beans.ID) (*beans.Transaction, error)
func (*TransactionRepository) GetForBudget ¶
func (r *TransactionRepository) GetForBudget(ctx context.Context, budgetID beans.ID) ([]*beans.Transaction, error)
func (*TransactionRepository) GetIncomeBetween ¶
func (*TransactionRepository) Update ¶
func (r *TransactionRepository) Update(ctx context.Context, transaction *beans.Transaction) error
type TxManager ¶
type TxManager struct {
// contains filtered or unexported fields
}
func NewTxManager ¶
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(pool *pgxpool.Pool) *UserRepository
func (*UserRepository) Create ¶
func (r *UserRepository) Create(ctx context.Context, id beans.ID, username beans.Username, passwordHash beans.PasswordHash) error
func (*UserRepository) GetByUsername ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.