github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/checkpoints/param_option.go (about)

     1  package checkpoints
     2  
     3  type KeyValue struct {
     4  	Name  string `json:"name"`
     5  	Value string `json:"value"`
     6  }
     7  
     8  type ParamOptions struct {
     9  	Options []*KeyValue `json:"options"`
    10  }
    11  
    12  func NewParamOptions() *ParamOptions {
    13  	return &ParamOptions{}
    14  }
    15  
    16  func (this *ParamOptions) AddParam(name string, value string) {
    17  	this.Options = append(this.Options, &KeyValue{
    18  		Name:  name,
    19  		Value: value,
    20  	})
    21  }