Documentation ¶
Index ¶
- Constants
- Variables
- func BlockFilename(ns ...string) string
- func CacheId(code string) string
- func CacheIdPath(code string) string
- func CheckFilepath(filename string) error
- func CorrectDate(date string) string
- func FileExist(path string) bool
- func GetBkPath() string
- func GetCache(fullCode string) *os.File
- func GetDayPath() string
- func GetInfoPath() string
- func GetKLineFilename(fullCode string) stringdeprecated
- func GetSnapshotPath() string
- func GetTickPath() string
- func GetXdxrPath() string
- func GetZxgFile() string
- func KLineFilename(code string) string
- func KLinePath(fc string) (string, string, int)
- func LastDate() time.Timedeprecated
- func SnapshotFilename(code string) string
- func TickFilename(code string, date string) string
- func Today() string
- func UpdateTickStartDate(date string)
- func XdxrFilename(code string) string
- type CacheType
- type FastCache
Constants ¶
View Source
const ( DAY_PATH = "day" // 日线路径 INFO_PATH = "info" // 信息路径 TICK_PATH = "tick" // tick路径 XDXR_PATH = "xdxr" // 除权除息路径 BLOCK_PATH = "bk" // 板块数据 SNAPSHOT_PATH = "snapshot" // 快照数据路径 )
Variables ¶
View Source
var (
// TickStartDate 最早的时间
TickStartDate = "20220101"
)
Functions ¶
func CacheIdPath ¶ added in v0.7.6
CacheIdPath code从后保留3位, 市场缩写+从头到倒数第3的代码, 确保每个目录只有000~999个代码
func GetKLineFilename
deprecated
func SnapshotFilename ¶ added in v0.8.16
SnapshotFilename snapshot缓存路径
func TickFilename ¶ added in v0.7.4
TickFilename tick文件比较多, 目录结构${tick}/${YYYY}/${YYYYMMDD}/${CacheIdPath}
func UpdateTickStartDate ¶ added in v0.8.0
func UpdateTickStartDate(date string)
UpdateTickStartDate 修改tick数据开始下载的日期
Types ¶
type CacheType ¶
type CacheType int
const ( CACHE_CSV CacheType = iota // CSV CACHE_EXCEL CacheType = 1 // EXCEL CACHE_TARS CacheType = 2 // Tencent Tars CACHE_PROTOBUF CacheType = 3 // ProtoBuf )
缓存类型
var ( // CACHE_ROOT_PATH cache路径 CACHE_ROOT_PATH = category.DATA_ROOT_PATH CACHE_TYPE CacheType = CACHE_TARS )
Click to show internal directories.
Click to hide internal directories.