17 lines
463 B
Go
17 lines
463 B
Go
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, symbol string, interval string, startMillis, endMillis int64) ([]*entity.Kline, error)
|
||
}
|