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 }