mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-02 05:50:25 +08:00
实现WAF
This commit is contained in:
30
internal/waf/checkpoints/option_options.go
Normal file
30
internal/waf/checkpoints/option_options.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package checkpoints
|
||||
|
||||
import "github.com/iwind/TeaGo/maps"
|
||||
|
||||
type OptionsOption struct {
|
||||
Name string
|
||||
Code string
|
||||
Value string // default value
|
||||
IsRequired bool
|
||||
Size int
|
||||
Comment string
|
||||
RightLabel string
|
||||
Validate func(value string) (ok bool, message string)
|
||||
Options []maps.Map
|
||||
}
|
||||
|
||||
func NewOptionsOption(name string, code string) *OptionsOption {
|
||||
return &OptionsOption{
|
||||
Name: name,
|
||||
Code: code,
|
||||
}
|
||||
}
|
||||
|
||||
func (this *OptionsOption) Type() string {
|
||||
return "options"
|
||||
}
|
||||
|
||||
func (this *OptionsOption) SetOptions(options []maps.Map) {
|
||||
this.Options = options
|
||||
}
|
||||
Reference in New Issue
Block a user