account

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: GPL-3.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountHandlerImpl

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

func NewAccountHandler

func NewAccountHandler(store types.AccountStore, logger *slog.Logger) *AccountHandlerImpl

func (*AccountHandlerImpl) CreateAccount

func (h *AccountHandlerImpl) CreateAccount(c fiber.Ctx) error

func (*AccountHandlerImpl) DeleteAccount

func (h *AccountHandlerImpl) DeleteAccount(c fiber.Ctx) error

func (*AccountHandlerImpl) GetAccountById

func (h *AccountHandlerImpl) GetAccountById(c fiber.Ctx) error

func (*AccountHandlerImpl) GetAccounts

func (h *AccountHandlerImpl) GetAccounts(c fiber.Ctx) error

func (*AccountHandlerImpl) UpdateAccount

func (h *AccountHandlerImpl) UpdateAccount(c fiber.Ctx) error

type CreateAccountPayload

type CreateAccountPayload struct {
	Name          string           `json:"name"`
	Description   string           `json:"description"`
	Tax_shelter   types.TaxShelter `json:"tax_shelter"`
	Institution   string           `json:"institution"`
	Is_deprecated bool             `json:"is_deprecated"`
}

func (CreateAccountPayload) Validate

func (p CreateAccountPayload) Validate() error

type DeleteAccountByIdParams

type DeleteAccountByIdParams struct {
	Id int `json:"id"`
}

func (DeleteAccountByIdParams) Validate

func (p DeleteAccountByIdParams) Validate() error

type GetAccountByIdParams

type GetAccountByIdParams struct {
	Id int `json:"id"`
}

func (GetAccountByIdParams) Validate

func (p GetAccountByIdParams) Validate() error

type GetAccountsQuery

type GetAccountsQuery struct {
	Ids           []int            `json:"ids"`
	Tax_shelter   types.TaxShelter `json:"tax_shelter"`
	Institution   string           `json:"institution"`
	Is_deprecated string           `json:"is_deprecated"`

	types.PaginationQuery
}

func (GetAccountsQuery) Validate

func (q GetAccountsQuery) Validate() error

type PostgresAccountStore

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

func NewPostgresAccountStore

func NewPostgresAccountStore(postgresDb *pgxpool.Pool, logger *slog.Logger) *PostgresAccountStore

func (*PostgresAccountStore) CreateAccount

func (s *PostgresAccountStore) CreateAccount(ctx context.Context, a *types.Account) (types.Account, error)

func (*PostgresAccountStore) DeleteAccount

func (s *PostgresAccountStore) DeleteAccount(ctx context.Context, userId, accountId int) (types.Account, error)

func (*PostgresAccountStore) GetAccountById

func (s *PostgresAccountStore) GetAccountById(ctx context.Context, userId int, accountId int) (types.Account, error)

func (*PostgresAccountStore) GetAccountByName

func (s *PostgresAccountStore) GetAccountByName(ctx context.Context, name string, userId int) (types.Account, error)

func (*PostgresAccountStore) GetAccounts

func (*PostgresAccountStore) UpdateAccount

func (s *PostgresAccountStore) UpdateAccount(ctx context.Context, account *types.Account) (types.Account, error)

type UpdateAccountByIdParams

type UpdateAccountByIdParams struct {
	Id int `json:"id"`
}

func (UpdateAccountByIdParams) Validate

func (p UpdateAccountByIdParams) Validate() error

type UpdateAccountPayload

type UpdateAccountPayload struct {
	Name          string           `json:"name"`
	Description   string           `json:"description"`
	Tax_shelter   types.TaxShelter `json:"tax_shelter"`
	Institution   string           `json:"institution"`
	Is_deprecated bool             `json:"is_deprecated"`
}

func (UpdateAccountPayload) Validate

func (p UpdateAccountPayload) Validate() error

Jump to

Keyboard shortcuts

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