gitee.com/quant1x/engine@v1.8.4/factors/dataset_minutes.go (about)

     1  package factors
     2  
     3  import (
     4  	"context"
     5  	"gitee.com/quant1x/engine/cache"
     6  	"gitee.com/quant1x/engine/datasource/base"
     7  	"gitee.com/quant1x/gotdx/quotes"
     8  )
     9  
    10  // DataMinutes 分时数据
    11  type DataMinutes struct {
    12  	Manifest
    13  }
    14  
    15  func init() {
    16  	summary := __mapDataSets[BaseMinutes]
    17  	_ = cache.Register(&DataMinutes{Manifest: Manifest{DataSummary: summary}})
    18  }
    19  
    20  func (this *DataMinutes) Clone(date string, code string) DataSet {
    21  	summary := __mapDataSets[BaseMinutes]
    22  	var dest = DataMinutes{
    23  		Manifest: Manifest{
    24  			DataSummary: summary,
    25  			Date:        date,
    26  			Code:        code,
    27  		},
    28  	}
    29  	return &dest
    30  }
    31  
    32  func (this *DataMinutes) Init(ctx context.Context, date string) error {
    33  	_ = ctx
    34  	_ = date
    35  	return nil
    36  }
    37  
    38  func (this *DataMinutes) Update(date string) {
    39  	base.UpdateMinutes(this.GetSecurityCode(), date)
    40  }
    41  
    42  func (this *DataMinutes) Repair(date string) {
    43  	this.Update(date)
    44  }
    45  
    46  func (this *DataMinutes) Increase(snapshot quotes.Snapshot) {
    47  	_ = snapshot
    48  	//TODO implement me
    49  	panic("implement me")
    50  
    51  }
    52  
    53  func (this *DataMinutes) Print(code string, date ...string) {
    54  	_ = code
    55  	_ = date
    56  	//TODO implement me
    57  	panic("implement me")
    58  }