dao

package
v0.0.0-...-1e16040 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrencyFilter

func CurrencyFilter(currency string) func(db *gorm.DB) *gorm.DB

Types

type CurrencyDAO

type CurrencyDAO interface {
	Save(ctx context.Context, Currency model.Currency) error
}

CurrencyDAO - Currency dao interface

type CurrencyDAOImpl

type CurrencyDAOImpl struct {
}

CurrencyDAOImpl - Currency dao implementation

func NewCurrencyDAO

func NewCurrencyDAO() *CurrencyDAOImpl

NewCurrencyDAO - gets an CurrencyDAOImpl instance

func (*CurrencyDAOImpl) FindCurrencyValueDate

func (pd *CurrencyDAOImpl) FindCurrencyValueDate(ctx context.Context, currency string, dateType string) (time.Time, error)

func (*CurrencyDAOImpl) FindCurrencyValuesByDate

func (pd *CurrencyDAOImpl) FindCurrencyValuesByDate(ctx context.Context, start time.Time, end time.Time, currency string) ([]model.Currency, error)

func (*CurrencyDAOImpl) GetAllCurrenciesWithLatestValue

func (pd *CurrencyDAOImpl) GetAllCurrenciesWithLatestValue(ctx context.Context) ([]model.Currency, error)

func (*CurrencyDAOImpl) Save

func (pd *CurrencyDAOImpl) Save(Currency model.Currency) error

saving data

Jump to

Keyboard shortcuts

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