31 lines
607 B
Go
31 lines
607 B
Go
package writers
|
|
|
|
import "_StorBackEnd/pkg/protocol"
|
|
|
|
const HelloRuleName = "sbe_hello"
|
|
|
|
type HelloRule struct {
|
|
// Cmd Nom de la règle
|
|
Cmd string
|
|
|
|
// matcher Permet d'extraire de éléments d'une chaine
|
|
matcher *protocol.RegexMatcher
|
|
}
|
|
|
|
// CreateHelloRule Création d'une instance de HelloRule
|
|
func CreateHelloRule(pattern string) *HelloRule {
|
|
return &HelloRule{
|
|
Cmd: HelloRuleName,
|
|
matcher: protocol.CreateRegexMatcher(pattern),
|
|
}
|
|
}
|
|
|
|
func (rule HelloRule) GetCmd() string {
|
|
return rule.Cmd
|
|
}
|
|
|
|
func (rule HelloRule) Execute(argsData []string) {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|