repository

package
v0.0.0-...-cd4e935 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuoteRepo

type QuoteRepo struct {
	Ctx context.Context
	// contains filtered or unexported fields
}

func NewQuoteRepo

func NewQuoteRepo(ctx context.Context, data *data.Data) *QuoteRepo

func (*QuoteRepo) AddQuotation

func (qr *QuoteRepo) AddQuotation(q *models.Quote) error

func (*QuoteRepo) AddQuotePair

func (qr *QuoteRepo) AddQuotePair(from, to string) error

func (*QuoteRepo) GetLastUpdated

func (qr *QuoteRepo) GetLastUpdated(from, to string) (*models.Quote, error)

func (*QuoteRepo) GetQuotation

func (qr *QuoteRepo) GetQuotation(id uuid.UUID) (*models.Quote, error)

func (*QuoteRepo) GetQuotePair

func (qr *QuoteRepo) GetQuotePair(from, to string) (*int32, error)

func (*QuoteRepo) GetQuotePairs

func (qr *QuoteRepo) GetQuotePairs() ([][]string, error)

type Repository

type Repository interface {
	AddQuotePair(from, to string) error
	GetQuotePairs() ([][]string, error)
	AddQuotation(q *models.Quote) error
	GetQuotation(id uuid.UUID) (*models.Quote, error)
	GetLastUpdated(from, to string) (*models.Quote, error)
}

Jump to

Keyboard shortcuts

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