Documentation ¶
Index ¶
- Variables
- func BuildRangeCode() chan string
- func CollectMetadataFromLog(path string) (chan *model.Metadata, error)
- func CollectMetadataFromSina(codes []string) ([]*model.Metadata, error)
- func CompleteTaskToRepository(date string, metadata, stock, day, week int64) error
- func DeleteMetadataByDate(db *mongo.Client, code, date string, timeout time.Duration) (int64, error)
- func FetchMetadataFromSina(today time.Time, delay bool) (string, int64, error)
- func InsertMetadataMany(db *mongo.Client, metadata []*model.Metadata, timeout time.Duration) (int64, error)
- func PushMetadataToRepository(date string) (int64, int64, int64, int64, error)
- func RunScheduler()
- func SelectMetadataRange(db *mongo.Client, offset, limit int64, date string, lastID string, ...) ([]*model.Metadata, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoStockCode = fmt.Errorf("no exist stock code in Sina API") ErrNoStockData = fmt.Errorf("no stock data") )
View Source
var CodeList = []string{
"sh688***",
"sh605***",
"sh603***",
"sh601***",
"sh600***",
"sz300***",
"sz0030**",
"sz002***",
"sz000***",
}
View Source
var DefaultCronSpec = "05 17 * * MON,TUE,WED,THU,FRI"
Functions ¶
func BuildRangeCode ¶
func BuildRangeCode() chan string
func CollectMetadataFromLog ¶
func CollectMetadataFromSina ¶
func DeleteMetadataByDate ¶
func FetchMetadataFromSina ¶
func InsertMetadataMany ¶
func RunScheduler ¶
func RunScheduler()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.