Documentation ¶
Index ¶
- type Account
- type Budget
- type Category
- type CategoryGroup
- type CreateAccountParams
- type CreateBudgetParams
- type CreateCategoryGroupParams
- type CreateCategoryParams
- type CreatePayeeParams
- type CreateSessionParams
- type CreateTransactionParams
- type CreateUserParams
- type CreateVerifyEmailsParams
- type DBTX
- type DeletePayeeParams
- type GetAccountParams
- type GetBudgetAccountParams
- type GetBudgetAccountRow
- type GetBudgetDetailsParams
- type GetBudgetParams
- type GetPendingVerifyEmailsParams
- type GetVerifyEmailsParams
- type Payee
- type Querier
- type Queries
- func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)
- func (q *Queries) CreateBudget(ctx context.Context, arg CreateBudgetParams) (Budget, error)
- func (q *Queries) CreateCategory(ctx context.Context, arg CreateCategoryParams) (Category, error)
- func (q *Queries) CreateCategoryGroup(ctx context.Context, arg CreateCategoryGroupParams) (CategoryGroup, error)
- func (q *Queries) CreatePayee(ctx context.Context, arg CreatePayeeParams) (Payee, error)
- func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
- func (q *Queries) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) CreateVerifyEmails(ctx context.Context, arg CreateVerifyEmailsParams) (VerifyEmail, error)
- func (q *Queries) DeleteAccount(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteAccounts(ctx context.Context, budgetID uuid.UUID) error
- func (q *Queries) DeleteBudget(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteBudgets(ctx context.Context, ownerUsername string) error
- func (q *Queries) DeleteCategories(ctx context.Context, categoryGroupID uuid.UUID) error
- func (q *Queries) DeleteCategory(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteCategoryGroup(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteCategoryGroups(ctx context.Context, budgetID uuid.UUID) error
- func (q *Queries) DeletePayee(ctx context.Context, arg DeletePayeeParams) error
- func (q *Queries) DeleteTransaction(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteUser(ctx context.Context, username string) error
- func (q *Queries) DeleteUserSessions(ctx context.Context, username string) error
- func (q *Queries) DeleteVerifyEmails(ctx context.Context, username string) error
- func (q *Queries) GetAccount(ctx context.Context, arg GetAccountParams) (Account, error)
- func (q *Queries) GetAccounts(ctx context.Context, budgetID uuid.UUID) ([]Account, error)
- func (q *Queries) GetBudget(ctx context.Context, arg GetBudgetParams) (Budget, error)
- func (q *Queries) GetBudgetAccount(ctx context.Context, arg GetBudgetAccountParams) (GetBudgetAccountRow, error)
- func (q *Queries) GetBudgetDetails(ctx context.Context, arg GetBudgetDetailsParams) (Budget, error)
- func (q *Queries) GetBudgets(ctx context.Context, ownerUsername string) ([]Budget, error)
- func (q *Queries) GetCategories(ctx context.Context, categoryGroupID uuid.UUID) ([]Category, error)
- func (q *Queries) GetCategory(ctx context.Context, id uuid.UUID) (Category, error)
- func (q *Queries) GetCategoryGroup(ctx context.Context, id uuid.UUID) (CategoryGroup, error)
- func (q *Queries) GetCategoryGroupsByBudgetId(ctx context.Context, budgetID uuid.UUID) ([]CategoryGroup, error)
- func (q *Queries) GetPayeeById(ctx context.Context, id uuid.UUID) (Payee, error)
- func (q *Queries) GetPayees(ctx context.Context, budgetID uuid.UUID) ([]Payee, error)
- func (q *Queries) GetPendingVerifyEmails(ctx context.Context, arg GetPendingVerifyEmailsParams) ([]VerifyEmail, error)
- func (q *Queries) GetSession(ctx context.Context, id uuid.UUID) (Session, error)
- func (q *Queries) GetTransactions(ctx context.Context, budgetID uuid.UUID) ([]Transaction, error)
- func (q *Queries) GetTransactionsById(ctx context.Context, id uuid.UUID) (Transaction, error)
- func (q *Queries) GetTransactionsView(ctx context.Context, budgetID uuid.UUID) ([]TransactionsView, error)
- func (q *Queries) GetTransactionsViewById(ctx context.Context, id uuid.UUID) (TransactionsView, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)
- func (q *Queries) GetUserById(ctx context.Context, id uuid.UUID) (User, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) GetUsers(ctx context.Context) ([]User, error)
- func (q *Queries) GetVerifyEmails(ctx context.Context, arg GetVerifyEmailsParams) (VerifyEmail, error)
- func (q *Queries) UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error)
- func (q *Queries) UpdateCategory(ctx context.Context, arg UpdateCategoryParams) (Category, error)
- func (q *Queries) UpdateCategoryGroup(ctx context.Context, arg UpdateCategoryGroupParams) (CategoryGroup, error)
- func (q *Queries) UpdateCodeUsed(ctx context.Context, code string) (VerifyEmail, error)
- func (q *Queries) UpdatePayee(ctx context.Context, arg UpdatePayeeParams) (Payee, error)
- func (q *Queries) UpdateTransaction(ctx context.Context, arg UpdateTransactionParams) (Transaction, error)
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SQLStore
- func (s *SQLStore) CreateUserTx(ctx context.Context, arg CreateUserParams, ...) (User, error)
- func (s *SQLStore) DeleteBudgetTx(ctx context.Context, budgetId uuid.UUID) error
- func (s *SQLStore) DeleteCategoryGroupTx(ctx context.Context, categoryGroupId uuid.UUID) error
- func (s *SQLStore) DeleteUserTx(ctx context.Context, userArg UserParams, budgetIds []uuid.UUID, ...) error
- func (s *SQLStore) UpdateUserTx(ctx context.Context, arg UpdateUserParams, ...) (User, error)
- type Session
- type Store
- type Transaction
- type TransactionsView
- type UpdateAccountParams
- type UpdateCategoryGroupParams
- type UpdateCategoryParams
- type UpdatePayeeParams
- type UpdateTransactionParams
- type UpdateUserParams
- type User
- type UserParams
- type UserTxResult
- type VerifyEmail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID uuid.UUID `json:"id"` BudgetID uuid.UUID `json:"budget_id"` Name string `json:"name"` Type string `json:"type"` Closed bool `json:"closed"` Note pgtype.Text `json:"note"` Balance int32 `json:"balance"` ClearedBalance int32 `json:"cleared_balance"` UnclearedBalance int32 `json:"uncleared_balance"` LastReconciledAt time.Time `json:"last_reconciled_at"` }
type CategoryGroup ¶
type CreateAccountParams ¶
type CreateBudgetParams ¶
type CreateCategoryParams ¶
type CreatePayeeParams ¶
type CreateSessionParams ¶
type CreateTransactionParams ¶
type CreateTransactionParams struct { AccountID uuid.UUID `json:"account_id"` Date pgtype.Date `json:"date"` PayeeID uuid.UUID `json:"payee_id"` CategoryID pgtype.UUID `json:"category_id"` Memo pgtype.Text `json:"memo"` Amount int32 `json:"amount"` Cleared bool `json:"cleared"` Reconciled bool `json:"reconciled"` }
type CreateUserParams ¶
type DeletePayeeParams ¶
type GetAccountParams ¶
type GetBudgetAccountParams ¶
type GetBudgetAccountRow ¶
type GetBudgetAccountRow struct { ID uuid.UUID `json:"id"` OwnerUsername string `json:"owner_username"` Name string `json:"name"` CurrencyCode string `json:"currency_code"` ID_2 uuid.UUID `json:"id_2"` BudgetID uuid.UUID `json:"budget_id"` Name_2 string `json:"name_2"` Type string `json:"type"` Closed bool `json:"closed"` Note pgtype.Text `json:"note"` Balance int32 `json:"balance"` ClearedBalance int32 `json:"cleared_balance"` UnclearedBalance int32 `json:"uncleared_balance"` LastReconciledAt time.Time `json:"last_reconciled_at"` }
type GetBudgetDetailsParams ¶
type GetBudgetParams ¶
type GetVerifyEmailsParams ¶
type Querier ¶
type Querier interface { CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error) CreateBudget(ctx context.Context, arg CreateBudgetParams) (Budget, error) CreateCategory(ctx context.Context, arg CreateCategoryParams) (Category, error) CreateCategoryGroup(ctx context.Context, arg CreateCategoryGroupParams) (CategoryGroup, error) CreatePayee(ctx context.Context, arg CreatePayeeParams) (Payee, error) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) CreateVerifyEmails(ctx context.Context, arg CreateVerifyEmailsParams) (VerifyEmail, error) DeleteAccount(ctx context.Context, id uuid.UUID) error DeleteAccounts(ctx context.Context, budgetID uuid.UUID) error DeleteBudget(ctx context.Context, id uuid.UUID) error DeleteBudgets(ctx context.Context, ownerUsername string) error DeleteCategories(ctx context.Context, categoryGroupID uuid.UUID) error DeleteCategory(ctx context.Context, id uuid.UUID) error DeleteCategoryGroup(ctx context.Context, id uuid.UUID) error DeleteCategoryGroups(ctx context.Context, budgetID uuid.UUID) error DeletePayee(ctx context.Context, arg DeletePayeeParams) error DeleteTransaction(ctx context.Context, id uuid.UUID) error DeleteUser(ctx context.Context, username string) error DeleteUserSessions(ctx context.Context, username string) error DeleteVerifyEmails(ctx context.Context, username string) error GetAccount(ctx context.Context, arg GetAccountParams) (Account, error) GetAccounts(ctx context.Context, budgetID uuid.UUID) ([]Account, error) GetBudget(ctx context.Context, arg GetBudgetParams) (Budget, error) GetBudgetAccount(ctx context.Context, arg GetBudgetAccountParams) (GetBudgetAccountRow, error) GetBudgetDetails(ctx context.Context, arg GetBudgetDetailsParams) (Budget, error) GetBudgets(ctx context.Context, ownerUsername string) ([]Budget, error) GetCategories(ctx context.Context, categoryGroupID uuid.UUID) ([]Category, error) GetCategory(ctx context.Context, id uuid.UUID) (Category, error) GetCategoryGroup(ctx context.Context, id uuid.UUID) (CategoryGroup, error) GetCategoryGroupsByBudgetId(ctx context.Context, budgetID uuid.UUID) ([]CategoryGroup, error) GetPayeeById(ctx context.Context, id uuid.UUID) (Payee, error) GetPayees(ctx context.Context, budgetID uuid.UUID) ([]Payee, error) GetPendingVerifyEmails(ctx context.Context, arg GetPendingVerifyEmailsParams) ([]VerifyEmail, error) GetSession(ctx context.Context, id uuid.UUID) (Session, error) GetTransactions(ctx context.Context, budgetID uuid.UUID) ([]Transaction, error) GetTransactionsById(ctx context.Context, id uuid.UUID) (Transaction, error) GetTransactionsView(ctx context.Context, budgetID uuid.UUID) ([]TransactionsView, error) GetTransactionsViewById(ctx context.Context, id uuid.UUID) (TransactionsView, error) GetUserByEmail(ctx context.Context, email string) (User, error) GetUserById(ctx context.Context, id uuid.UUID) (User, error) GetUserByUsername(ctx context.Context, username string) (User, error) GetUsers(ctx context.Context) ([]User, error) GetVerifyEmails(ctx context.Context, arg GetVerifyEmailsParams) (VerifyEmail, error) UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error) UpdateCategory(ctx context.Context, arg UpdateCategoryParams) (Category, error) UpdateCategoryGroup(ctx context.Context, arg UpdateCategoryGroupParams) (CategoryGroup, error) UpdateCodeUsed(ctx context.Context, code string) (VerifyEmail, error) UpdatePayee(ctx context.Context, arg UpdatePayeeParams) (Payee, error) UpdateTransaction(ctx context.Context, arg UpdateTransactionParams) (Transaction, error) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateAccount ¶
func (*Queries) CreateBudget ¶
func (*Queries) CreateCategory ¶
func (*Queries) CreateCategoryGroup ¶
func (q *Queries) CreateCategoryGroup(ctx context.Context, arg CreateCategoryGroupParams) (CategoryGroup, error)
func (*Queries) CreatePayee ¶
func (*Queries) CreateSession ¶
func (*Queries) CreateTransaction ¶
func (q *Queries) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error)
func (*Queries) CreateUser ¶
func (*Queries) CreateVerifyEmails ¶
func (q *Queries) CreateVerifyEmails(ctx context.Context, arg CreateVerifyEmailsParams) (VerifyEmail, error)
func (*Queries) DeleteAccount ¶
func (*Queries) DeleteAccounts ¶
func (*Queries) DeleteBudget ¶
func (*Queries) DeleteBudgets ¶
func (*Queries) DeleteCategories ¶
func (*Queries) DeleteCategory ¶
func (*Queries) DeleteCategoryGroup ¶
func (*Queries) DeleteCategoryGroups ¶
func (*Queries) DeletePayee ¶
func (q *Queries) DeletePayee(ctx context.Context, arg DeletePayeeParams) error
func (*Queries) DeleteTransaction ¶
func (*Queries) DeleteUser ¶
func (*Queries) DeleteUserSessions ¶
func (*Queries) DeleteVerifyEmails ¶
func (*Queries) GetAccount ¶
func (*Queries) GetAccounts ¶
func (*Queries) GetBudgetAccount ¶
func (q *Queries) GetBudgetAccount(ctx context.Context, arg GetBudgetAccountParams) (GetBudgetAccountRow, error)
func (*Queries) GetBudgetDetails ¶
func (*Queries) GetBudgets ¶
func (*Queries) GetCategories ¶
func (*Queries) GetCategory ¶
func (*Queries) GetCategoryGroup ¶
func (*Queries) GetCategoryGroupsByBudgetId ¶
func (*Queries) GetPayeeById ¶
func (*Queries) GetPendingVerifyEmails ¶
func (q *Queries) GetPendingVerifyEmails(ctx context.Context, arg GetPendingVerifyEmailsParams) ([]VerifyEmail, error)
func (*Queries) GetSession ¶
func (*Queries) GetTransactions ¶
func (*Queries) GetTransactionsById ¶
func (*Queries) GetTransactionsView ¶
func (*Queries) GetTransactionsViewById ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserById ¶
func (*Queries) GetUserByUsername ¶
func (*Queries) GetVerifyEmails ¶
func (q *Queries) GetVerifyEmails(ctx context.Context, arg GetVerifyEmailsParams) (VerifyEmail, error)
func (*Queries) UpdateAccount ¶
func (*Queries) UpdateCategory ¶
func (*Queries) UpdateCategoryGroup ¶
func (q *Queries) UpdateCategoryGroup(ctx context.Context, arg UpdateCategoryGroupParams) (CategoryGroup, error)
func (*Queries) UpdateCodeUsed ¶
func (*Queries) UpdatePayee ¶
func (*Queries) UpdateTransaction ¶
func (q *Queries) UpdateTransaction(ctx context.Context, arg UpdateTransactionParams) (Transaction, error)
func (*Queries) UpdateUser ¶
type SQLStore ¶
type SQLStore struct { *Queries // contains filtered or unexported fields }
func (*SQLStore) CreateUserTx ¶
func (s *SQLStore) CreateUserTx(ctx context.Context, arg CreateUserParams, fn func(createdUser UserParams) error) (User, error)
Database transaction for creating a user.
func (*SQLStore) DeleteBudgetTx ¶
Database transaction for deleting a budget.
func (*SQLStore) DeleteCategoryGroupTx ¶
Database transaction for deleting category group
func (*SQLStore) DeleteUserTx ¶
func (s *SQLStore) DeleteUserTx(ctx context.Context, userArg UserParams, budgetIds []uuid.UUID, fn func(deleteUser UserParams) error) error
Database transaction for deleting a user
func (*SQLStore) UpdateUserTx ¶
func (s *SQLStore) UpdateUserTx(ctx context.Context, arg UpdateUserParams, fn func(createdUser UserParams) error) (User, error)
Database transaction for updating a user
type Session ¶
type Session struct { ID uuid.UUID `json:"id"` Username string `json:"username"` RefreshToken string `json:"refresh_token"` UserAgent string `json:"user_agent"` ClientIp string `json:"client_ip"` IsBlocked bool `json:"is_blocked"` ExpiresAt time.Time `json:"expires_at"` CreatedAt time.Time `json:"created_at"` }
type Store ¶
type Store interface { Querier CreateUserTx(ctx context.Context, arg CreateUserParams, fn func(createdUser UserParams) error) (User, error) UpdateUserTx(ctx context.Context, arg UpdateUserParams, fn func(createdUser UserParams) error) (User, error) DeleteUserTx(ctx context.Context, userArg UserParams, budgetIds []uuid.UUID, afterDeleteFn func(deleteUser UserParams) error) error DeleteBudgetTx(ctx context.Context, budgetId uuid.UUID) error DeleteCategoryGroupTx(ctx context.Context, categoryGroupId uuid.UUID) error }
type Transaction ¶
type Transaction struct { ID uuid.UUID `json:"id"` AccountID uuid.UUID `json:"account_id"` Date pgtype.Date `json:"date"` PayeeID uuid.UUID `json:"payee_id"` CategoryID pgtype.UUID `json:"category_id"` Memo pgtype.Text `json:"memo"` Amount int32 `json:"amount"` Approved bool `json:"approved"` Cleared bool `json:"cleared"` Reconciled bool `json:"reconciled"` }
type TransactionsView ¶
type TransactionsView struct { ID uuid.UUID `json:"id"` AccountID uuid.UUID `json:"account_id"` AccountName string `json:"account_name"` BudgetID uuid.UUID `json:"budget_id"` Date pgtype.Date `json:"date"` PayeeID uuid.UUID `json:"payee_id"` PayeeName string `json:"payee_name"` CategoryID pgtype.UUID `json:"category_id"` CategoryName string `json:"category_name"` Memo pgtype.Text `json:"memo"` Amount int32 `json:"amount"` Approved bool `json:"approved"` Cleared bool `json:"cleared"` Reconciled bool `json:"reconciled"` }
type UpdateAccountParams ¶
type UpdateAccountParams struct { ID uuid.UUID `json:"id"` BudgetID uuid.UUID `json:"budget_id"` Name pgtype.Text `json:"name"` Type pgtype.Text `json:"type"` Closed pgtype.Bool `json:"closed"` Note pgtype.Text `json:"note"` Balance pgtype.Int4 `json:"balance"` ClearedBalance pgtype.Int4 `json:"cleared_balance"` UnclearedBalance pgtype.Int4 `json:"uncleared_balance"` LastReconciledAt pgtype.Timestamptz `json:"last_reconciled_at"` }
type UpdateCategoryParams ¶
type UpdatePayeeParams ¶
type UpdateTransactionParams ¶
type UpdateTransactionParams struct { ID uuid.UUID `json:"id"` AccountID pgtype.UUID `json:"account_id"` Date pgtype.Date `json:"date"` PayeeID pgtype.UUID `json:"payee_id"` CategoryID pgtype.UUID `json:"category_id"` Memo pgtype.Text `json:"memo"` Amount pgtype.Int4 `json:"amount"` Approved pgtype.Bool `json:"approved"` Cleared pgtype.Bool `json:"cleared"` Reconciled pgtype.Bool `json:"reconciled"` }
type UpdateUserParams ¶
type UserParams ¶
Parameter with just a username and email
type UserTxResult ¶
type UserTxResult struct {
User User
}
Click to show internal directories.
Click to hide internal directories.