mocks

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository struct {
	mock.Mock
}

AccountRepository is a mock implementation of domain.AccountRepository.

func (*AccountRepository) Create

func (m *AccountRepository) Create(ctx context.Context, tenantID string, input domain.CreateAccountInput) (*domain.Account, error)

func (*AccountRepository) Delete

func (m *AccountRepository) Delete(ctx context.Context, tenantID, id string) error

func (*AccountRepository) GetByID

func (m *AccountRepository) GetByID(ctx context.Context, tenantID, id string) (*domain.Account, error)

func (*AccountRepository) ListByTenant

func (m *AccountRepository) ListByTenant(ctx context.Context, tenantID string) ([]domain.Account, error)

func (*AccountRepository) ListByUser

func (m *AccountRepository) ListByUser(ctx context.Context, tenantID, userID string) ([]domain.Account, error)

func (*AccountRepository) Update

func (m *AccountRepository) Update(ctx context.Context, tenantID, id string, input domain.UpdateAccountInput) (*domain.Account, error)

func (*AccountRepository) UpdateBalance

func (m *AccountRepository) UpdateBalance(ctx context.Context, tenantID, id string, newBalanceCents int64) error

type AccountService

type AccountService struct {
	mock.Mock
}

AccountService is a mock implementation of domain.AccountService.

func (*AccountService) Create

func (m *AccountService) Create(ctx context.Context, tenantID string, input domain.CreateAccountInput) (*domain.Account, error)

func (*AccountService) Delete

func (m *AccountService) Delete(ctx context.Context, tenantID, id string) error

func (*AccountService) GetByID

func (m *AccountService) GetByID(ctx context.Context, tenantID, id string) (*domain.Account, error)

func (*AccountService) ListByTenant

func (m *AccountService) ListByTenant(ctx context.Context, tenantID string) ([]domain.Account, error)

func (*AccountService) ListByUser

func (m *AccountService) ListByUser(ctx context.Context, tenantID, userID string) ([]domain.Account, error)

func (*AccountService) Update

func (m *AccountService) Update(ctx context.Context, tenantID, id string, input domain.UpdateAccountInput) (*domain.Account, error)

type AdminAuditRepository

type AdminAuditRepository struct {
	mock.Mock
}

AdminAuditRepository is a mock implementation of domain.AdminAuditRepository.

func (*AdminAuditRepository) ListAll

type AdminService

type AdminService struct {
	mock.Mock
}

AdminService is a mock implementation of domain.AdminService.

func (*AdminService) ForceDeleteUser

func (m *AdminService) ForceDeleteUser(ctx context.Context, id string) error

func (*AdminService) GetTenantByID

func (m *AdminService) GetTenantByID(ctx context.Context, id string) (*domain.Tenant, error)

func (*AdminService) GetUserByID

func (m *AdminService) GetUserByID(ctx context.Context, id string) (*domain.User, error)

func (*AdminService) HardDeleteTenant

func (m *AdminService) HardDeleteTenant(ctx context.Context, id, confirmationToken string) error

func (*AdminService) ListAllTenants

func (m *AdminService) ListAllTenants(ctx context.Context, withDeleted bool) ([]domain.Tenant, error)

func (*AdminService) ListAllUsers

func (m *AdminService) ListAllUsers(ctx context.Context) ([]domain.User, error)

func (*AdminService) ListAuditLogs

func (m *AdminService) ListAuditLogs(ctx context.Context, params domain.ListAuditLogsParams) ([]domain.AuditLog, error)

func (*AdminService) RestoreTenant

func (m *AdminService) RestoreTenant(ctx context.Context, id string) error

func (*AdminService) SuspendTenant

func (m *AdminService) SuspendTenant(ctx context.Context, id string) error

func (*AdminService) UpdateTenantPlan

func (m *AdminService) UpdateTenantPlan(ctx context.Context, id string, plan domain.TenantPlan) (*domain.Tenant, error)

type AdminTenantRepository

type AdminTenantRepository struct {
	mock.Mock
}

AdminTenantRepository is a mock implementation of domain.AdminTenantRepository.

func (*AdminTenantRepository) GetByID

func (m *AdminTenantRepository) GetByID(ctx context.Context, id string) (*domain.Tenant, error)

func (*AdminTenantRepository) HardDelete

func (m *AdminTenantRepository) HardDelete(ctx context.Context, id string) error

func (*AdminTenantRepository) ListAll

func (m *AdminTenantRepository) ListAll(ctx context.Context, withDeleted bool) ([]domain.Tenant, error)

func (*AdminTenantRepository) Restore

func (m *AdminTenantRepository) Restore(ctx context.Context, id string) error

func (*AdminTenantRepository) Suspend

func (m *AdminTenantRepository) Suspend(ctx context.Context, id string) error

func (*AdminTenantRepository) UpdatePlan

func (m *AdminTenantRepository) UpdatePlan(ctx context.Context, id string, plan domain.TenantPlan) (*domain.Tenant, error)

type AdminUserRepository

type AdminUserRepository struct {
	mock.Mock
}

AdminUserRepository is a mock implementation of domain.AdminUserRepository.

func (*AdminUserRepository) ForceDelete

func (m *AdminUserRepository) ForceDelete(ctx context.Context, id string) error

func (*AdminUserRepository) GetByID

func (m *AdminUserRepository) GetByID(ctx context.Context, id string) (*domain.User, error)

func (*AdminUserRepository) ListAll

func (m *AdminUserRepository) ListAll(ctx context.Context) ([]domain.User, error)

type AssetRepository added in v1.14.0

type AssetRepository struct {
	mock.Mock
}

AssetRepository is a mock implementation of domain.AssetRepository.

func (*AssetRepository) Create added in v1.14.0

func (*AssetRepository) Delete added in v1.14.0

func (m *AssetRepository) Delete(ctx context.Context, id string) error

func (*AssetRepository) GetByID added in v1.14.0

func (m *AssetRepository) GetByID(ctx context.Context, id string) (*domain.Asset, error)

func (*AssetRepository) GetByTicker added in v1.14.0

func (m *AssetRepository) GetByTicker(ctx context.Context, ticker string) (*domain.Asset, error)

func (*AssetRepository) GetLastPrice added in v1.14.0

func (m *AssetRepository) GetLastPrice(ctx context.Context, id string) (int64, error)

func (*AssetRepository) List added in v1.14.0

type AuditRepository

type AuditRepository struct {
	mock.Mock
}

AuditRepository is a mock implementation of domain.AuditRepository.

func (*AuditRepository) Create

func (*AuditRepository) ListByEntity

func (m *AuditRepository) ListByEntity(ctx context.Context, tenantID, entityType, entityID string) ([]domain.AuditLog, error)

func (*AuditRepository) ListByTenant

func (m *AuditRepository) ListByTenant(ctx context.Context, tenantID string, params domain.ListAuditLogsParams) ([]domain.AuditLog, error)

type AuthRepository

type AuthRepository struct {
	mock.Mock
}

AuthRepository is a mock implementation of domain.AuthRepository.

func (*AuthRepository) CreateOTPRequest

func (m *AuthRepository) CreateOTPRequest(ctx context.Context, input domain.CreateOTPRequestInput) (*domain.OTPRequest, error)

func (*AuthRepository) DeleteExpiredOTPRequests

func (m *AuthRepository) DeleteExpiredOTPRequests(ctx context.Context) error

func (*AuthRepository) GetActiveOTPRequest

func (m *AuthRepository) GetActiveOTPRequest(ctx context.Context, email string) (*domain.OTPRequest, error)

func (*AuthRepository) MarkOTPUsed

func (m *AuthRepository) MarkOTPUsed(ctx context.Context, id string) error

type AuthService

type AuthService struct {
	mock.Mock
}

AuthService is a mock implementation of domain.AuthService.

func (*AuthService) RefreshToken

func (m *AuthService) RefreshToken(ctx context.Context, refreshToken string) (*domain.TokenPair, error)

func (*AuthService) RequestOTP

func (m *AuthService) RequestOTP(ctx context.Context, email string) error

func (*AuthService) VerifyOTP

func (m *AuthService) VerifyOTP(ctx context.Context, email, code string) (*domain.TokenPair, error)

type CategoryRepository

type CategoryRepository struct {
	mock.Mock
}

CategoryRepository is a mock implementation of domain.CategoryRepository.

func (*CategoryRepository) Create

func (*CategoryRepository) Delete

func (m *CategoryRepository) Delete(ctx context.Context, tenantID, id string) error

func (*CategoryRepository) GetByID

func (m *CategoryRepository) GetByID(ctx context.Context, tenantID, id string) (*domain.Category, error)

func (*CategoryRepository) ListByTenant

func (m *CategoryRepository) ListByTenant(ctx context.Context, tenantID string) ([]domain.Category, error)

func (*CategoryRepository) ListChildren

func (m *CategoryRepository) ListChildren(ctx context.Context, tenantID, parentID string) ([]domain.Category, error)

func (*CategoryRepository) Update

func (m *CategoryRepository) Update(ctx context.Context, tenantID, id string, input domain.UpdateCategoryInput) (*domain.Category, error)

type CategoryService

type CategoryService struct {
	mock.Mock
}

CategoryService is a mock implementation of domain.CategoryService.

func (*CategoryService) Create

func (m *CategoryService) Create(ctx context.Context, tenantID string, input domain.CreateCategoryInput) (*domain.Category, error)

func (*CategoryService) Delete

func (m *CategoryService) Delete(ctx context.Context, tenantID, id string) error

func (*CategoryService) GetByID

func (m *CategoryService) GetByID(ctx context.Context, tenantID, id string) (*domain.Category, error)

func (*CategoryService) ListByTenant

func (m *CategoryService) ListByTenant(ctx context.Context, tenantID string) ([]domain.Category, error)

func (*CategoryService) ListChildren

func (m *CategoryService) ListChildren(ctx context.Context, tenantID, parentID string) ([]domain.Category, error)

func (*CategoryService) Update

func (m *CategoryService) Update(ctx context.Context, tenantID, id string, input domain.UpdateCategoryInput) (*domain.Category, error)

type CurrencyConverter added in v1.14.0

type CurrencyConverter struct {
	mock.Mock
}

CurrencyConverter is a mock implementation of domain.CurrencyConverter.

func (*CurrencyConverter) Convert added in v1.14.0

func (m *CurrencyConverter) Convert(ctx context.Context, amountCents int64, fromCurrency, toCurrency string) (int64, error)

type IdempotencyStore

type IdempotencyStore struct {
	mock.Mock
}

IdempotencyStore is a mock implementation of domain.IdempotencyStore.

func (*IdempotencyStore) Get

func (*IdempotencyStore) SetLocked

func (m *IdempotencyStore) SetLocked(ctx context.Context, key string, ttl time.Duration) (bool, error)

func (*IdempotencyStore) SetResponse

func (m *IdempotencyStore) SetResponse(ctx context.Context, key string, resp domain.CachedResponse, ttl time.Duration) error

type InvestmentService added in v1.14.0

type InvestmentService struct {
	mock.Mock
}

InvestmentService is a mock implementation of domain.InvestmentService.

func (*InvestmentService) CancelIncome added in v1.14.0

func (m *InvestmentService) CancelIncome(ctx context.Context, tenantID, eventID string) (*domain.PositionIncomeEvent, error)

func (*InvestmentService) CreateAsset added in v1.14.0

func (m *InvestmentService) CreateAsset(ctx context.Context, input domain.CreateAssetInput) (*domain.Asset, error)

func (*InvestmentService) CreatePosition added in v1.14.0

func (m *InvestmentService) CreatePosition(ctx context.Context, tenantID string, in domain.CreatePositionInput) (*domain.Position, error)

func (*InvestmentService) DeleteAsset added in v1.14.0

func (m *InvestmentService) DeleteAsset(ctx context.Context, id string) error

func (*InvestmentService) DeletePosition added in v1.14.0

func (m *InvestmentService) DeletePosition(ctx context.Context, tenantID, id string) error

func (*InvestmentService) DeleteTenantAssetConfig added in v1.14.0

func (m *InvestmentService) DeleteTenantAssetConfig(ctx context.Context, tenantID, assetID string) error

func (*InvestmentService) GetAssetByID added in v1.14.0

func (m *InvestmentService) GetAssetByID(ctx context.Context, id string) (*domain.Asset, error)

func (*InvestmentService) GetAssetWithTenantConfig added in v1.14.0

func (m *InvestmentService) GetAssetWithTenantConfig(ctx context.Context, tenantID, id string) (*domain.Asset, error)

func (*InvestmentService) GetPortfolioSummary added in v1.14.0

func (m *InvestmentService) GetPortfolioSummary(ctx context.Context, tenantID string) (*domain.PortfolioSummary, error)

func (*InvestmentService) GetPosition added in v1.14.0

func (m *InvestmentService) GetPosition(ctx context.Context, tenantID, id string) (*domain.Position, error)

func (*InvestmentService) GetTenantAssetConfig added in v1.14.0

func (m *InvestmentService) GetTenantAssetConfig(ctx context.Context, tenantID, assetID string) (*domain.TenantAssetConfig, error)

func (*InvestmentService) ListAssets added in v1.14.0

func (m *InvestmentService) ListAssets(ctx context.Context, params domain.ListAssetsParams) ([]domain.Asset, error)

func (*InvestmentService) ListIncomeEvents added in v1.15.0

func (m *InvestmentService) ListIncomeEvents(ctx context.Context, tenantID, status string) ([]domain.PositionIncomeEvent, error)

func (*InvestmentService) ListPositions added in v1.14.0

func (m *InvestmentService) ListPositions(ctx context.Context, tenantID string) ([]domain.Position, error)

func (*InvestmentService) ListPositionsByAccount added in v1.15.0

func (m *InvestmentService) ListPositionsByAccount(ctx context.Context, tenantID, accountID string) ([]domain.Position, error)

func (*InvestmentService) ListTenantAssetConfigs added in v1.14.0

func (m *InvestmentService) ListTenantAssetConfigs(ctx context.Context, tenantID string) ([]domain.TenantAssetConfig, error)

func (*InvestmentService) MarkIncomeReceived added in v1.14.0

func (m *InvestmentService) MarkIncomeReceived(ctx context.Context, tenantID, eventID string) (*domain.PositionIncomeEvent, error)

func (*InvestmentService) TakeSnapshot added in v1.14.0

func (m *InvestmentService) TakeSnapshot(ctx context.Context, tenantID string) (*domain.PortfolioSnapshot, error)

func (*InvestmentService) UpdatePosition added in v1.14.0

func (m *InvestmentService) UpdatePosition(ctx context.Context, tenantID, id string, in domain.UpdatePositionInput) (*domain.Position, error)

func (*InvestmentService) UpsertTenantAssetConfig added in v1.14.0

func (m *InvestmentService) UpsertTenantAssetConfig(ctx context.Context, tenantID string, input domain.UpsertTenantAssetConfigInput) (*domain.TenantAssetConfig, error)

type InvoiceCloser added in v1.11.0

type InvoiceCloser struct {
	mock.Mock
}

InvoiceCloser is a mock implementation of domain.InvoiceCloser.

func (*InvoiceCloser) CloseInvoice added in v1.11.0

func (m *InvoiceCloser) CloseInvoice(ctx context.Context, tenantID, accountID string, closingDate time.Time) (domain.CloseInvoiceResult, error)

type Mailer

type Mailer struct {
	mock.Mock
}

Mailer is a mock implementation of domain.Mailer.

func (*Mailer) SendOTP

func (m *Mailer) SendOTP(ctx context.Context, to, code string) error

type MasterPurchaseRepository added in v1.10.0

type MasterPurchaseRepository struct {
	mock.Mock
}

MasterPurchaseRepository is a mock implementation of domain.MasterPurchaseRepository.

func (*MasterPurchaseRepository) Create added in v1.10.0

func (*MasterPurchaseRepository) Delete added in v1.10.0

func (m *MasterPurchaseRepository) Delete(ctx context.Context, tenantID, id string) error

func (*MasterPurchaseRepository) GetByID added in v1.10.0

func (m *MasterPurchaseRepository) GetByID(ctx context.Context, tenantID, id string) (*domain.MasterPurchase, error)

func (*MasterPurchaseRepository) IncrementPaidInstallments added in v1.10.0

func (m *MasterPurchaseRepository) IncrementPaidInstallments(ctx context.Context, tenantID, id string) error

func (*MasterPurchaseRepository) ListByAccount added in v1.10.0

func (m *MasterPurchaseRepository) ListByAccount(ctx context.Context, tenantID, accountID string) ([]domain.MasterPurchase, error)

func (*MasterPurchaseRepository) ListByTenant added in v1.10.0

func (m *MasterPurchaseRepository) ListByTenant(ctx context.Context, tenantID string) ([]domain.MasterPurchase, error)

func (*MasterPurchaseRepository) ListPendingClose added in v1.10.0

func (m *MasterPurchaseRepository) ListPendingClose(ctx context.Context, tenantID string, cutoffDate time.Time) ([]domain.MasterPurchase, error)

func (*MasterPurchaseRepository) Update added in v1.10.0

type MasterPurchaseService added in v1.10.0

type MasterPurchaseService struct {
	mock.Mock
}

MasterPurchaseService is a mock implementation of domain.MasterPurchaseService.

func (*MasterPurchaseService) Create added in v1.10.0

func (*MasterPurchaseService) Delete added in v1.10.0

func (m *MasterPurchaseService) Delete(ctx context.Context, tenantID, id string) error

func (*MasterPurchaseService) GetByID added in v1.10.0

func (m *MasterPurchaseService) GetByID(ctx context.Context, tenantID, id string) (*domain.MasterPurchase, error)

func (*MasterPurchaseService) ListByAccount added in v1.10.0

func (m *MasterPurchaseService) ListByAccount(ctx context.Context, tenantID, accountID string) ([]domain.MasterPurchase, error)

func (*MasterPurchaseService) ListByTenant added in v1.10.0

func (m *MasterPurchaseService) ListByTenant(ctx context.Context, tenantID string) ([]domain.MasterPurchase, error)

func (*MasterPurchaseService) ProjectInstallments added in v1.10.0

func (*MasterPurchaseService) Update added in v1.10.0

type PortfolioSnapshotRepository added in v1.15.0

type PortfolioSnapshotRepository struct {
	mock.Mock
}

PortfolioSnapshotRepository is a mock implementation of domain.PortfolioSnapshotRepository.

func (*PortfolioSnapshotRepository) Create added in v1.15.0

func (*PortfolioSnapshotRepository) GetByDate added in v1.15.0

func (*PortfolioSnapshotRepository) ListByTenant added in v1.15.0

func (m *PortfolioSnapshotRepository) ListByTenant(ctx context.Context, tenantID string) ([]domain.PortfolioSnapshot, error)

type PositionIncomeEventRepository added in v1.14.0

type PositionIncomeEventRepository struct {
	mock.Mock
}

PositionIncomeEventRepository is a mock implementation of domain.PositionIncomeEventRepository.

func (*PositionIncomeEventRepository) Create added in v1.14.0

func (*PositionIncomeEventRepository) GetByID added in v1.14.0

func (*PositionIncomeEventRepository) ListByTenant added in v1.15.0

func (*PositionIncomeEventRepository) ListPending added in v1.15.0

func (*PositionIncomeEventRepository) UpdateStatus added in v1.14.0

func (m *PositionIncomeEventRepository) UpdateStatus(ctx context.Context, tenantID, id string, status domain.ReceivableStatus, receivedAt *time.Time) (*domain.PositionIncomeEvent, error)

type PositionRepository added in v1.14.0

type PositionRepository struct {
	mock.Mock
}

PositionRepository is a mock implementation of domain.PositionRepository.

func (*PositionRepository) Create added in v1.14.0

func (*PositionRepository) Delete added in v1.14.0

func (m *PositionRepository) Delete(ctx context.Context, tenantID, id string) error

func (*PositionRepository) GetByID added in v1.14.0

func (m *PositionRepository) GetByID(ctx context.Context, tenantID, id string) (*domain.Position, error)

func (*PositionRepository) ListByAccount added in v1.15.0

func (m *PositionRepository) ListByAccount(ctx context.Context, tenantID, accountID string) ([]domain.Position, error)

func (*PositionRepository) ListByTenant added in v1.14.0

func (m *PositionRepository) ListByTenant(ctx context.Context, tenantID string) ([]domain.Position, error)

func (*PositionRepository) ListDueIncome added in v1.15.0

func (m *PositionRepository) ListDueIncome(ctx context.Context, before time.Time) ([]domain.Position, error)

func (*PositionRepository) Update added in v1.14.0

type PositionSnapshotRepository added in v1.15.0

type PositionSnapshotRepository struct {
	mock.Mock
}

PositionSnapshotRepository is a mock implementation of domain.PositionSnapshotRepository.

func (*PositionSnapshotRepository) Create added in v1.15.0

func (*PositionSnapshotRepository) ListByPosition added in v1.15.0

func (m *PositionSnapshotRepository) ListByPosition(ctx context.Context, tenantID, positionID string) ([]domain.PositionSnapshot, error)

func (*PositionSnapshotRepository) ListByTenantSince added in v1.15.0

func (m *PositionSnapshotRepository) ListByTenantSince(ctx context.Context, tenantID string, since time.Time) ([]domain.PositionSnapshot, error)

type Querier

type Querier struct {
	mock.Mock
}

Querier is an autogenerated mock type for the Querier type

func (*Querier) AdminForceDeleteUser

func (m *Querier) AdminForceDeleteUser(ctx context.Context, id string) error

func (*Querier) AdminGetTenantByID

func (m *Querier) AdminGetTenantByID(ctx context.Context, id string) (sqlc.Tenant, error)

func (*Querier) AdminGetUserByID

func (m *Querier) AdminGetUserByID(ctx context.Context, id string) (sqlc.User, error)

func (*Querier) AdminHardDeleteTenant

func (m *Querier) AdminHardDeleteTenant(ctx context.Context, id string) error

func (*Querier) AdminListAllAuditLogs

func (m *Querier) AdminListAllAuditLogs(ctx context.Context, arg sqlc.AdminListAllAuditLogsParams) ([]sqlc.AuditLog, error)

func (*Querier) AdminListAllTenants

func (m *Querier) AdminListAllTenants(ctx context.Context, withDeleted bool) ([]sqlc.Tenant, error)

func (*Querier) AdminListAllUsers

func (m *Querier) AdminListAllUsers(ctx context.Context) ([]sqlc.User, error)

func (*Querier) AdminRestoreTenant

func (m *Querier) AdminRestoreTenant(ctx context.Context, id string) error

func (*Querier) AdminSuspendTenant

func (m *Querier) AdminSuspendTenant(ctx context.Context, id string) error

func (*Querier) AdminUpdateTenantPlan

func (m *Querier) AdminUpdateTenantPlan(ctx context.Context, arg sqlc.AdminUpdateTenantPlanParams) (sqlc.Tenant, error)

func (*Querier) CreateAccount

func (m *Querier) CreateAccount(ctx context.Context, arg sqlc.CreateAccountParams) (sqlc.Account, error)

func (*Querier) CreateAsset added in v1.13.0

func (m *Querier) CreateAsset(ctx context.Context, arg sqlc.CreateAssetParams) (sqlc.Asset, error)

func (*Querier) CreateAuditLog

func (m *Querier) CreateAuditLog(ctx context.Context, arg sqlc.CreateAuditLogParams) (sqlc.AuditLog, error)

func (*Querier) CreateCategory

func (m *Querier) CreateCategory(ctx context.Context, arg sqlc.CreateCategoryParams) (sqlc.Category, error)

func (*Querier) CreateMasterPurchase added in v1.10.0

func (m *Querier) CreateMasterPurchase(ctx context.Context, arg sqlc.CreateMasterPurchaseParams) (sqlc.MasterPurchase, error)

func (*Querier) CreateOTPRequest

func (m *Querier) CreateOTPRequest(ctx context.Context, arg sqlc.CreateOTPRequestParams) (sqlc.OtpRequest, error)

func (*Querier) CreatePortfolioSnapshot added in v1.15.0

func (m *Querier) CreatePortfolioSnapshot(ctx context.Context, arg sqlc.CreatePortfolioSnapshotParams) (sqlc.PortfolioSnapshot, error)

func (*Querier) CreatePosition added in v1.15.0

func (m *Querier) CreatePosition(ctx context.Context, arg sqlc.CreatePositionParams) (sqlc.Position, error)

func (*Querier) CreatePositionIncomeEvent added in v1.15.0

func (m *Querier) CreatePositionIncomeEvent(ctx context.Context, arg sqlc.CreatePositionIncomeEventParams) (sqlc.PositionIncomeEvent, error)

func (*Querier) CreatePositionSnapshot added in v1.15.0

func (m *Querier) CreatePositionSnapshot(ctx context.Context, arg sqlc.CreatePositionSnapshotParams) (sqlc.PositionSnapshot, error)

func (*Querier) CreateTenant

func (m *Querier) CreateTenant(ctx context.Context, arg sqlc.CreateTenantParams) (sqlc.Tenant, error)

func (*Querier) CreateTransaction

func (m *Querier) CreateTransaction(ctx context.Context, arg sqlc.CreateTransactionParams) (sqlc.Transaction, error)

func (*Querier) CreateUser

func (m *Querier) CreateUser(ctx context.Context, arg sqlc.CreateUserParams) (sqlc.User, error)

func (*Querier) DeleteAsset added in v1.13.0

func (m *Querier) DeleteAsset(ctx context.Context, id string) error

func (*Querier) DeleteExpiredOTPs

func (m *Querier) DeleteExpiredOTPs(ctx context.Context) error

func (*Querier) DeleteMasterPurchase added in v1.10.0

func (m *Querier) DeleteMasterPurchase(ctx context.Context, arg sqlc.DeleteMasterPurchaseParams) error

func (*Querier) GetAccountByID

func (m *Querier) GetAccountByID(ctx context.Context, arg sqlc.GetAccountByIDParams) (sqlc.Account, error)

func (*Querier) GetActiveOTPByEmail

func (m *Querier) GetActiveOTPByEmail(ctx context.Context, email string) (sqlc.OtpRequest, error)

func (*Querier) GetAssetByID added in v1.13.0

func (m *Querier) GetAssetByID(ctx context.Context, id string) (sqlc.Asset, error)

func (*Querier) GetAssetByTicker added in v1.13.0

func (m *Querier) GetAssetByTicker(ctx context.Context, ticker string) (sqlc.Asset, error)

func (*Querier) GetAssetWithTenantConfig added in v1.13.0

func (*Querier) GetCategoryByID

func (m *Querier) GetCategoryByID(ctx context.Context, arg sqlc.GetCategoryByIDParams) (sqlc.Category, error)

func (*Querier) GetMasterPurchaseByID added in v1.10.0

func (m *Querier) GetMasterPurchaseByID(ctx context.Context, arg sqlc.GetMasterPurchaseByIDParams) (sqlc.MasterPurchase, error)

func (*Querier) GetPortfolioSnapshotByDate added in v1.15.0

func (m *Querier) GetPortfolioSnapshotByDate(ctx context.Context, arg sqlc.GetPortfolioSnapshotByDateParams) (sqlc.PortfolioSnapshot, error)

func (*Querier) GetPositionByID added in v1.15.0

func (m *Querier) GetPositionByID(ctx context.Context, arg sqlc.GetPositionByIDParams) (sqlc.Position, error)

func (*Querier) GetPositionIncomeEventByID added in v1.15.0

func (m *Querier) GetPositionIncomeEventByID(ctx context.Context, arg sqlc.GetPositionIncomeEventByIDParams) (sqlc.PositionIncomeEvent, error)

func (*Querier) GetPositionSnapshotByID added in v1.15.0

func (m *Querier) GetPositionSnapshotByID(ctx context.Context, arg sqlc.GetPositionSnapshotByIDParams) (sqlc.PositionSnapshot, error)

func (*Querier) GetTenantAssetConfigByAssetID added in v1.13.0

func (m *Querier) GetTenantAssetConfigByAssetID(ctx context.Context, arg sqlc.GetTenantAssetConfigByAssetIDParams) (sqlc.TenantAssetConfig, error)

func (*Querier) GetTenantByID

func (m *Querier) GetTenantByID(ctx context.Context, id string) (sqlc.Tenant, error)

func (*Querier) GetTransactionByID

func (m *Querier) GetTransactionByID(ctx context.Context, arg sqlc.GetTransactionByIDParams) (sqlc.Transaction, error)

func (*Querier) GetUserByEmail

func (m *Querier) GetUserByEmail(ctx context.Context, email string) (sqlc.User, error)

func (*Querier) GetUserByID

func (m *Querier) GetUserByID(ctx context.Context, arg sqlc.GetUserByIDParams) (sqlc.User, error)

func (*Querier) IncrementPaidInstallments added in v1.10.0

func (m *Querier) IncrementPaidInstallments(ctx context.Context, arg sqlc.IncrementPaidInstallmentsParams) (sqlc.MasterPurchase, error)

func (*Querier) ListAccountsByTenant

func (m *Querier) ListAccountsByTenant(ctx context.Context, tenantID string) ([]sqlc.Account, error)

func (*Querier) ListAccountsByUser

func (m *Querier) ListAccountsByUser(ctx context.Context, arg sqlc.ListAccountsByUserParams) ([]sqlc.Account, error)

func (*Querier) ListAssets added in v1.13.0

func (m *Querier) ListAssets(ctx context.Context) ([]sqlc.Asset, error)

func (*Querier) ListAuditLogsByEntity

func (m *Querier) ListAuditLogsByEntity(ctx context.Context, arg sqlc.ListAuditLogsByEntityParams) ([]sqlc.AuditLog, error)

func (*Querier) ListAuditLogsByTenant

func (m *Querier) ListAuditLogsByTenant(ctx context.Context, arg sqlc.ListAuditLogsByTenantParams) ([]sqlc.AuditLog, error)

func (*Querier) ListCategoriesByTenant

func (m *Querier) ListCategoriesByTenant(ctx context.Context, tenantID string) ([]sqlc.Category, error)

func (*Querier) ListChildCategories

func (m *Querier) ListChildCategories(ctx context.Context, arg sqlc.ListChildCategoriesParams) ([]sqlc.Category, error)

func (*Querier) ListMasterPurchasesByAccount added in v1.10.0

func (m *Querier) ListMasterPurchasesByAccount(ctx context.Context, arg sqlc.ListMasterPurchasesByAccountParams) ([]sqlc.MasterPurchase, error)

func (*Querier) ListMasterPurchasesByTenant added in v1.10.0

func (m *Querier) ListMasterPurchasesByTenant(ctx context.Context, tenantID string) ([]sqlc.MasterPurchase, error)

func (*Querier) ListPendingIncomeEvents added in v1.15.0

func (m *Querier) ListPendingIncomeEvents(ctx context.Context, tenantID string) ([]sqlc.PositionIncomeEvent, error)

func (*Querier) ListPendingMasterPurchasesByClosingDay added in v1.10.0

func (m *Querier) ListPendingMasterPurchasesByClosingDay(ctx context.Context, arg sqlc.ListPendingMasterPurchasesByClosingDayParams) ([]sqlc.MasterPurchase, error)

func (*Querier) ListPortfolioSnapshots added in v1.15.0

func (m *Querier) ListPortfolioSnapshots(ctx context.Context, tenantID string) ([]sqlc.PortfolioSnapshot, error)

func (*Querier) ListPositionIncomeEventsByTenant added in v1.15.0

func (m *Querier) ListPositionIncomeEventsByTenant(ctx context.Context, tenantID string) ([]sqlc.PositionIncomeEvent, error)

func (*Querier) ListPositionSnapshotsByPosition added in v1.15.0

func (m *Querier) ListPositionSnapshotsByPosition(ctx context.Context, arg sqlc.ListPositionSnapshotsByPositionParams) ([]sqlc.PositionSnapshot, error)

func (*Querier) ListPositionSnapshotsByTenantSince added in v1.15.0

func (m *Querier) ListPositionSnapshotsByTenantSince(ctx context.Context, arg sqlc.ListPositionSnapshotsByTenantSinceParams) ([]sqlc.PositionSnapshot, error)

func (*Querier) ListPositionsByAccount added in v1.15.0

func (m *Querier) ListPositionsByAccount(ctx context.Context, arg sqlc.ListPositionsByAccountParams) ([]sqlc.Position, error)

func (*Querier) ListPositionsByTenant added in v1.15.0

func (m *Querier) ListPositionsByTenant(ctx context.Context, tenantID string) ([]sqlc.Position, error)

func (*Querier) ListPositionsDueIncome added in v1.15.0

func (m *Querier) ListPositionsDueIncome(ctx context.Context, nextIncomeAt pgtype.Timestamptz) ([]sqlc.Position, error)

func (*Querier) ListTenantAssetConfigs added in v1.13.0

func (m *Querier) ListTenantAssetConfigs(ctx context.Context, tenantID string) ([]sqlc.TenantAssetConfig, error)

func (*Querier) ListTenants

func (m *Querier) ListTenants(ctx context.Context) ([]sqlc.Tenant, error)

func (*Querier) ListTransactionsByTenant

func (m *Querier) ListTransactionsByTenant(ctx context.Context, arg sqlc.ListTransactionsByTenantParams) ([]sqlc.Transaction, error)

func (*Querier) ListUsersByTenant

func (m *Querier) ListUsersByTenant(ctx context.Context, tenantID string) ([]sqlc.User, error)

func (*Querier) MarkOTPUsed

func (m *Querier) MarkOTPUsed(ctx context.Context, id string) error

func (*Querier) SoftDeleteAccount

func (m *Querier) SoftDeleteAccount(ctx context.Context, arg sqlc.SoftDeleteAccountParams) error

func (*Querier) SoftDeleteCategory

func (m *Querier) SoftDeleteCategory(ctx context.Context, arg sqlc.SoftDeleteCategoryParams) error

func (*Querier) SoftDeletePosition added in v1.15.0

func (m *Querier) SoftDeletePosition(ctx context.Context, arg sqlc.SoftDeletePositionParams) error

func (*Querier) SoftDeleteTenant

func (m *Querier) SoftDeleteTenant(ctx context.Context, id string) error

func (*Querier) SoftDeleteTenantAssetConfig added in v1.13.0

func (m *Querier) SoftDeleteTenantAssetConfig(ctx context.Context, arg sqlc.SoftDeleteTenantAssetConfigParams) error

func (*Querier) SoftDeleteTransaction

func (m *Querier) SoftDeleteTransaction(ctx context.Context, arg sqlc.SoftDeleteTransactionParams) error

func (*Querier) SoftDeleteUser

func (m *Querier) SoftDeleteUser(ctx context.Context, arg sqlc.SoftDeleteUserParams) error

func (*Querier) UpdateAccount

func (m *Querier) UpdateAccount(ctx context.Context, arg sqlc.UpdateAccountParams) (sqlc.Account, error)

func (*Querier) UpdateAccountBalance

func (m *Querier) UpdateAccountBalance(ctx context.Context, arg sqlc.UpdateAccountBalanceParams) error

func (*Querier) UpdateCategory

func (m *Querier) UpdateCategory(ctx context.Context, arg sqlc.UpdateCategoryParams) (sqlc.Category, error)

func (*Querier) UpdateIncomeEventStatus added in v1.15.0

func (m *Querier) UpdateIncomeEventStatus(ctx context.Context, arg sqlc.UpdateIncomeEventStatusParams) (sqlc.PositionIncomeEvent, error)

func (*Querier) UpdateMasterPurchase added in v1.10.0

func (m *Querier) UpdateMasterPurchase(ctx context.Context, arg sqlc.UpdateMasterPurchaseParams) (sqlc.MasterPurchase, error)

func (*Querier) UpdatePosition added in v1.15.0

func (m *Querier) UpdatePosition(ctx context.Context, arg sqlc.UpdatePositionParams) (sqlc.Position, error)

func (*Querier) UpdatePositionNextIncome added in v1.15.0

func (m *Querier) UpdatePositionNextIncome(ctx context.Context, arg sqlc.UpdatePositionNextIncomeParams) error

func (*Querier) UpdateTenant

func (m *Querier) UpdateTenant(ctx context.Context, arg sqlc.UpdateTenantParams) (sqlc.Tenant, error)

func (*Querier) UpdateTransaction

func (m *Querier) UpdateTransaction(ctx context.Context, arg sqlc.UpdateTransactionParams) (sqlc.Transaction, error)

func (*Querier) UpdateUser

func (m *Querier) UpdateUser(ctx context.Context, arg sqlc.UpdateUserParams) (sqlc.User, error)

func (*Querier) UpdateUserLastLogin

func (m *Querier) UpdateUserLastLogin(ctx context.Context, id string) error

func (*Querier) UpsertTenantAssetConfig added in v1.13.0

func (m *Querier) UpsertTenantAssetConfig(ctx context.Context, arg sqlc.UpsertTenantAssetConfigParams) (sqlc.TenantAssetConfig, error)

type TenantAssetConfigRepository added in v1.14.0

type TenantAssetConfigRepository struct {
	mock.Mock
}

TenantAssetConfigRepository is a mock implementation of domain.TenantAssetConfigRepository.

func (*TenantAssetConfigRepository) Delete added in v1.14.0

func (m *TenantAssetConfigRepository) Delete(ctx context.Context, tenantID, assetID string) error

func (*TenantAssetConfigRepository) GetByAssetID added in v1.14.0

func (m *TenantAssetConfigRepository) GetByAssetID(ctx context.Context, tenantID, assetID string) (*domain.TenantAssetConfig, error)

func (*TenantAssetConfigRepository) ListByTenant added in v1.14.0

func (m *TenantAssetConfigRepository) ListByTenant(ctx context.Context, tenantID string) ([]domain.TenantAssetConfig, error)

func (*TenantAssetConfigRepository) Upsert added in v1.14.0

type TenantRepository

type TenantRepository struct {
	mock.Mock
}

TenantRepository is a mock implementation of domain.TenantRepository.

func (*TenantRepository) Create

func (*TenantRepository) Delete

func (m *TenantRepository) Delete(ctx context.Context, id string) error

func (*TenantRepository) GetByID

func (m *TenantRepository) GetByID(ctx context.Context, id string) (*domain.Tenant, error)

func (*TenantRepository) List

func (m *TenantRepository) List(ctx context.Context) ([]domain.Tenant, error)

func (*TenantRepository) Update

type TenantService

type TenantService struct {
	mock.Mock
}

TenantService is a mock implementation of domain.TenantService.

func (*TenantService) Create

func (*TenantService) Delete

func (m *TenantService) Delete(ctx context.Context, id string) error

func (*TenantService) GetByID

func (m *TenantService) GetByID(ctx context.Context, id string) (*domain.Tenant, error)

func (*TenantService) InviteUser

func (m *TenantService) InviteUser(ctx context.Context, tenantID string, input domain.CreateUserInput) (*domain.User, error)

func (*TenantService) List

func (m *TenantService) List(ctx context.Context) ([]domain.Tenant, error)

func (*TenantService) Update

type TransactionRepository

type TransactionRepository struct {
	mock.Mock
}

TransactionRepository is a mock implementation of domain.TransactionRepository.

func (*TransactionRepository) Create

func (*TransactionRepository) Delete

func (m *TransactionRepository) Delete(ctx context.Context, tenantID, id string) error

func (*TransactionRepository) GetByID

func (m *TransactionRepository) GetByID(ctx context.Context, tenantID, id string) (*domain.Transaction, error)

func (*TransactionRepository) List

func (*TransactionRepository) Update

type TransactionService

type TransactionService struct {
	mock.Mock
}

TransactionService is a mock implementation of domain.TransactionService.

func (*TransactionService) Create

func (*TransactionService) Delete

func (m *TransactionService) Delete(ctx context.Context, tenantID, id string) error

func (*TransactionService) GetByID

func (m *TransactionService) GetByID(ctx context.Context, tenantID, id string) (*domain.Transaction, error)

func (*TransactionService) List

func (*TransactionService) Update

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is a mock implementation of domain.UserRepository.

func (*UserRepository) Create

func (*UserRepository) Delete

func (m *UserRepository) Delete(ctx context.Context, tenantID, id string) error

func (*UserRepository) GetByEmail

func (m *UserRepository) GetByEmail(ctx context.Context, email string) (*domain.User, error)

func (*UserRepository) GetByID

func (m *UserRepository) GetByID(ctx context.Context, tenantID, id string) (*domain.User, error)

func (*UserRepository) ListByTenant

func (m *UserRepository) ListByTenant(ctx context.Context, tenantID string) ([]domain.User, error)

func (*UserRepository) Update

func (m *UserRepository) Update(ctx context.Context, tenantID, id string, input domain.UpdateUserInput) (*domain.User, error)

func (*UserRepository) UpdateLastLogin

func (m *UserRepository) UpdateLastLogin(ctx context.Context, id string) error

Jump to

Keyboard shortcuts

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