repository

package
v0.0.0-...-b093a28 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepositoryImpl

func NewRepositoryImpl(
	config *configs.Secrets,
	db *sqlx.DB,
	influxClient *influxdb2.Client,
) *impl

Types

type Repository

type Repository interface {
	GetLastSync(
		ctx context.Context,
		exchange string,
		pair *models.Symbol,
	) (*models.LastSync, error)
	UpsertLastSync(
		ctx context.Context,
		exchange string,
		pair *models.Symbol,
		lastSyncTime time.Time,
	) error
	UpsertOHLCVData(
		ohlcvData []*models.OHLCVMarketData,
		exchange string,
		pair *models.Symbol,
	)
	GetOHLCVData(
		context context.Context,
		base string,
		quote null.String,
		exchange null.String,
		start time.Time,
		end time.Time,
	) ([]*models.OHLCVMarketData, error)
}

func NewRepository

func NewRepository(
	config *configs.Secrets,
	db *sqlx.DB,
	influxClient *influxdb2.Client,
) Repository

Jump to

Keyboard shortcuts

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