utils

package
v0.0.0-...-d12e3b2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvOrDefault

func GetEnvOrDefault(key, defaultValue string) string

Helper function to get environment variable or return default

func MapOperator

func MapOperator(op string) (string, error)

func NewContextWithTimeout

func NewContextWithTimeout(baseCtx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

func ParseDateToISO

func ParseDateToISO(date string) (time.Time, error)

func ParseFilterValue

func ParseFilterValue(field string, value interface{}, operator string) (interface{}, error)

func ParseTimeout

func ParseTimeout(envVar string, defaultValue time.Duration) time.Duration

Helper function to parse a timeout duration from environment variable (in milliseconds)

func RecalculateAllBalancesService

func RecalculateAllBalancesService(db *mongo.Database, ctx context.Context)

func UpdateAccountBalanceOnTransaction

func UpdateAccountBalanceOnTransaction(ctx context.Context, db *mongo.Database, transaction models.Transaction, changeFactor float64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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