Documentation
¶
Index ¶
- func DefaultCanReadDate() string
- func DefaultCanUpdateDate() string
- func RegisterCacheLoader(key string, loader CacheLoader)
- func SwitchDate(date string)
- type Cache1D
- func (this *Cache1D[T]) Apply(merge func(code string, local *T) (updated bool))
- func (this *Cache1D[T]) Get(securityCode string, date ...string) *T
- func (this *Cache1D[T]) Length() int
- func (this *Cache1D[T]) LoadCache(date string)
- func (this *Cache1D[T]) ReplaceCache()
- func (this *Cache1D[T]) Set(securityCode string, newValue T)
- type CacheLoader
- type Feature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCanReadDate ¶ added in v1.12.0
func DefaultCanReadDate() string
DefaultCanReadDate 获取默认可以读缓存文件的日期
func DefaultCanUpdateDate ¶ added in v1.12.0
func DefaultCanUpdateDate() string
DefaultCanUpdateDate 获取默认可以更新缓存文件的日期
func RegisterCacheLoader ¶ added in v1.12.0
func RegisterCacheLoader(key string, loader CacheLoader)
func SwitchDate ¶ added in v1.12.0
func SwitchDate(date string)
Types ¶
type Cache1D ¶
type Cache1D[T Feature] struct { Key string // 缓存关键字 Date string // 日期 // contains filtered or unexported fields }
Cache1D 每天1个证券代码1条数据
type CacheLoader ¶ added in v1.12.0
type CacheLoader interface { // LoadCache 加载指定日期的缓存 LoadCache(date string) }
CacheLoader 缓存加载器
Click to show internal directories.
Click to hide internal directories.