Documentation ¶
Index ¶
Constants ¶
View Source
const (
RuleSubNewStock = engineBaseRule + 0 // 次新股
)
Variables ¶
View Source
var ( ErrAlreadyExists = errors.New("rule is already exists") // 规则已经存在 ErrExecuteFailed = errors.New("rule execute failed") // 规则执行失败 )
Functions ¶
func PrintRuleList ¶ added in v0.5.6
func PrintRuleList()
func RegisterFunc ¶ added in v0.5.6
RegisterFunc 注册规则回调函数
Types ¶
type Rule ¶
type Rule interface { // Kind 类型 Kind() Kind // Name 名称 Name() string // Exec 执行, 返回nil即为成功 Exec(snapshot models.QuoteSnapshot) error }
Rule 规则接口
type RuleSubNew ¶ added in v0.5.6
type RuleSubNew struct{}
func (RuleSubNew) Exec ¶ added in v0.5.6
func (r RuleSubNew) Exec(snapshot models.QuoteSnapshot) error
func (RuleSubNew) Kind ¶ added in v0.5.6
func (r RuleSubNew) Kind() Kind
func (RuleSubNew) Name ¶ added in v0.5.6
func (r RuleSubNew) Name() string
Click to show internal directories.
Click to hide internal directories.