faraday/fiat/customprices.go
Elle Mouton 66ad73ad87
fiat: add customprice impl of fiatBackend
This commit adds a new implementation of the fiatBackend interface which
uses user provided prices data.
2021-08-27 16:08:42 +02:00

18 lines
321 B
Go

package fiat
import (
"context"
"time"
)
// customPrices implements the fiatBackend interface.
type customPrices struct {
entries []*Price
}
// rawPriceData returns the custom price point entries.
func (c *customPrices) rawPriceData(_ context.Context, _,
_ time.Time) ([]*Price, error) {
return c.entries, nil
}