result.go 916 B

12345678910111213141516171819202122232425262728293031
  1. package scheme
  2. const PROCESSOR_KIND_MATCH = "match"
  3. const PROCESSOR_KIND_NOT_MATCH = "not_match"
  4. const PROCESSOR_KIND_EQUAL = "equal"
  5. type MatchProcessor struct {
  6. Expression string `json:"expression" yaml:"expression"`
  7. Count int `json:"count" yaml:"count"`
  8. }
  9. type NotMatchProcessor struct {
  10. Expression string `json:"expression" yaml:"expression"`
  11. }
  12. type EqualProcessor struct {
  13. Content string `json:"content" yaml:"content"`
  14. }
  15. type Processor struct {
  16. Kind string `json:"kind" yaml:"kind"`
  17. KindMatch MatchProcessor `json:"kind_match" yaml:"kind_match"`
  18. KindNotMatch NotMatchProcessor `json:"kind_not_match" yaml:"kind_not_match"`
  19. KindEqual EqualProcessor `json:"kind_equal" yaml:"kind_equal"`
  20. }
  21. type Result struct {
  22. Code int `json:"code" yaml:"code"`
  23. Stdout []Processor `json:"stdout" yaml:"stdout"`
  24. Stderr []Processor `json:"stderr" yaml:"stderr"`
  25. }