blockchain/internal/domain/repository/data_source.go

24 lines
533 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package repository
import (
"blockchain/internal/domain/entity"
"context"
)
type DataSourceRepository interface {
GetSymbols(ctx context.Context) ([]*entity.Symbol, error)
KlineDownloader
}
type KlineDownloader interface {
// FetchHistoryKline 抓歷史K線資料startMillis=0 表示從最早endMillis=0 表示到最新
FetchHistoryKline(ctx context.Context, param QueryKline) ([]*entity.Kline, error)
}
type QueryKline struct {
Symbol string
Interval string
StartUnixNano int64
EndUnixNano int64
}