accounts

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapperSvc

type MapperSvc interface {
	MapAccount(ctx context.Context, acc *database.Account) *v1.Account
}

type Service

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

func NewService

func NewService(
	cfg *ServiceConfig,
) *Service

func (*Service) EnsureDefaultAccountsExist added in v0.2.0

func (s *Service) EnsureDefaultAccountsExist(
	ctx context.Context,
) error

func (*Service) EnsureDefaultExists added in v0.2.0

func (s *Service) EnsureDefaultExists(
	_ context.Context,
	tx *gorm.DB,
	updatedAcc *database.Account,
) error

func (*Service) GetAccountByID

func (s *Service) GetAccountByID(ctx context.Context, id int32) (*database.Account, error)

func (*Service) GetAllAccounts

func (s *Service) GetAllAccounts(ctx context.Context) ([]*database.Account, error)

func (*Service) GetDefaultAccount added in v0.2.0

func (s *Service) GetDefaultAccount(ctx context.Context, accountType gomoneypbv1.AccountType) (*database.Account, error)

type ServiceConfig

type ServiceConfig struct {
	MapperSvc       MapperSvc
	DefaultCurrency string
}

Jump to

Keyboard shortcuts

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