2022-02-15 11:37:31 +01:00
|
|
|
package rules
|
|
|
|
|
|
|
|
import "_StorBackEnd/pkg/protocol"
|
|
|
|
|
|
|
|
type HelloRule struct {
|
2022-02-15 11:57:25 +01:00
|
|
|
cmd string
|
|
|
|
matcher *protocol.RegexMatcher
|
2022-02-15 11:37:31 +01:00
|
|
|
}
|
|
|
|
|
2022-02-15 11:57:25 +01:00
|
|
|
func Create(cmd string, pattern string) *HelloRule {
|
|
|
|
h := new(HelloRule)
|
|
|
|
h.cmd = cmd
|
|
|
|
h.matcher = protocol.CreateRegexMatcher(pattern)
|
|
|
|
|
|
|
|
return h
|
2022-02-15 11:37:31 +01:00
|
|
|
}
|
|
|
|
|
2022-02-15 11:57:25 +01:00
|
|
|
func (rule HelloRule) execute(data string) {
|
2022-02-15 11:37:31 +01:00
|
|
|
//TODO implement me
|
|
|
|
panic("implement me")
|
|
|
|
}
|