Peter Kurfer
4c2aa968d2
- support config file - support reading checks, server definition and endpoint definitions from env
20 lines
390 B
Go
20 lines
390 B
Go
package grammar
|
|
|
|
type Call struct {
|
|
Module string `parser:"(@Module'.')?"`
|
|
Name string `parser:"@Ident"`
|
|
Params []Param `parser:"'(' @@? ( ',' @@ )*')'"`
|
|
}
|
|
|
|
type Filters struct {
|
|
Chain []Call `parser:"@@ ('->' @@)*"`
|
|
}
|
|
|
|
type Check struct {
|
|
Initiator *Call `parser:"@@"`
|
|
Validators *Filters `parser:"( '=>' @@)?"`
|
|
}
|
|
|
|
type Script struct {
|
|
Checks []Check `parser:"(@@';'?)*"`
|
|
}
|