Skip to content

Commit 02c84a1

Browse files
committed
[+] type values [+]
1 parent 3bac06e commit 02c84a1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pkg/tcpserver/rule.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package tcpserver
2+
3+
import "regexp"
4+
5+
// RulesConfiguration from yaml
6+
type RulesConfiguration struct {
7+
Rules []Rule `yaml:"rules"`
8+
}
9+
10+
// Rule to apply to various requests
11+
type Rule struct {
12+
Match string `yaml:"match,omitempty"`
13+
matchRegex *regexp.Regexp
14+
Response string `yaml:"response,omitempty"`
15+
}

0 commit comments

Comments
 (0)