currency

package
v0.0.0-...-28981a6 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PairNotFoundError = errors.New("currency pair not found")
)

Functions

This section is empty.

Types

type PostgresRepository

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

func NewPostgresRepository

func NewPostgresRepository(
	repo *pgxpool.Pool,
	logger *zerolog.Logger,
) *PostgresRepository

func (*PostgresRepository) GetExchangeRate

func (r *PostgresRepository) GetExchangeRate(ctx context.Context, from, to string) (float64, error)

func (*PostgresRepository) UpdateExchangeRate

func (r *PostgresRepository) UpdateExchangeRate(ctx context.Context, er *entity.ExchangeRate) error

func (*PostgresRepository) Upsert

Jump to

Keyboard shortcuts

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