domain

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a requested resource is not found
	ErrNotFound = errors.New("resource not found")
	// ErrAlreadyExists is returned when trying to create a resource that already exists
	ErrAlreadyExists = errors.New("resource already exists")
	// ErrValidation is returned when input validation fails
	ErrValidation = errors.New("validation error")
	// ErrUnauthorized is returned when a user is not authorized to perform an action
	ErrUnauthorized = errors.New("unauthorized")
	// ErrForbidden is returned when a user is not allowed to perform an action
	ErrForbidden = errors.New("forbidden")
	// ErrStripeOnboardingIncomplete is returned when a user attempts to
	// withdraw without completing Stripe Connect onboarding
	ErrStripeOnboardingIncomplete = errors.New("stripe connect onboarding not completed")
)

Common domain errors

View Source
var (
	// ErrDepositAmountExceedsMaxSafeInt Account errors
	// Deprecated: Use account.ErrDepositAmountExceedsMaxSafeInt directly.
	ErrDepositAmountExceedsMaxSafeInt = account.ErrDepositAmountExceedsMaxSafeInt
	// Deprecated: Use account.ErrTransactionAmountMustBePositive directly.
	ErrTransactionAmountMustBePositive = account.ErrTransactionAmountMustBePositive
	// Deprecated: Use account.ErrInsufficientFunds directly.
	ErrInsufficientFunds = account.ErrInsufficientFunds
	// Deprecated: Use account.ErrAccountNotFound directly.
	ErrAccountNotFound = account.ErrAccountNotFound
	// Deprecated: Use account.ErrInvalidCurrencyCode directly.
	ErrInvalidCurrencyCode = common.ErrInvalidCurrencyCode
	// Deprecated: Use account.ErrUserUnauthorized directly.
	ErrUserUnauthorized = user.ErrUserUnauthorized

	// Currency-related errors
	// Deprecated: Use exchange.ErrProviderUnavailable directly.
	ErrExchangeRateUnavailable = exchange.ErrProviderUnavailable
	// Deprecated: Use exchange.ErrUnsupportedPair directly.
	ErrUnsupportedCurrencyPair = exchange.ErrUnsupportedPair
)

Error aliases for backward compatibility

Functions

func NewMoney deprecated added in v1.3.0

func NewMoney(amount float64, currencyCode money.Code) (m *money.Money, err error)

Deprecated: use money.New

Types

type Account

type Account = account.Account

Account and related Account is an alias for account.Account Deprecated: Use account.Account directly.

type ConversionInfo

type ConversionInfo = exchange.RateInfo

ConversionInfo is an alias for exchange.RateInfo Deprecated: Use exchange.RateInfo directly.

type ExchangeRate

type ExchangeRate = exchange.RateInfo

ExchangeRate is an alias for exchange.RateInfo Deprecated: Use exchange.RateInfo directly.

type Transaction

type Transaction = account.Transaction

Transaction represents a financial transaction in the system. Deprecated: Use account.Transaction directly.

type User

type User = user.User

User and related

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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