mock

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListCurrenciesDelegate

type ListCurrenciesDelegate func(context.Context) ([]types.Currency, error)

type ListSourcesDelegate

type ListSourcesDelegate func(context.Context) ([]types.Source, error)

type SaveExchangeRateDelegate

type SaveExchangeRateDelegate func(context.Context, *types.ExchangeRate) error

type Storage

type Storage struct {
	SaveExchangeRateFn SaveExchangeRateDelegate
	RateAsOfFn         RateAsOfDelegate
	ListSourcesFn      ListSourcesDelegate
	ListCurrenciesFn   ListCurrenciesDelegate
}

func (*Storage) ListCurrencies

func (m *Storage) ListCurrencies(ctx context.Context) ([]types.Currency, error)

func (*Storage) ListSources

func (m *Storage) ListSources(ctx context.Context) ([]types.Source, error)

func (*Storage) RateAsOf

func (m *Storage) RateAsOf(
	ctx context.Context,
	query *types.RateQuery,
	at time.Time,
) (*types.Page[*types.ExchangeRate], error)

func (*Storage) SaveExchangeRate

func (m *Storage) SaveExchangeRate(ctx context.Context, rate *types.ExchangeRate) error

Jump to

Keyboard shortcuts

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