scraper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateFormat = "2006-01-02"
)

Variables

This section is empty.

Functions

func PriceRecordstoCsv

func PriceRecordstoCsv(records []*models.Record) (string, error)

Types

type ApiResponse

type ApiResponse struct {
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type Scrape

type Scrape struct {
	models.BaseModel
	Source    string
	Symbol    string
	StartDate string
	EndDate   string
	Currency  string
}

func (*Scrape) TableName

func (*Scrape) TableName() string

type Scraper

type Scraper interface {
	GetSymbolData(symbol string, startDate, endDate time.Time) (<-chan *SymbolPrice, error)
}

type SymbolPrice

type SymbolPrice struct {
	models.BaseModel
	Date  string
	Close float64
}

func (*SymbolPrice) TableName

func (*SymbolPrice) TableName() string

Jump to

Keyboard shortcuts

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