Super basic NIP file parser
This commit is contained in:
34
pkg/nip/rule.go
Normal file
34
pkg/nip/rule.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package pickit
|
||||
|
||||
const (
|
||||
OperandEqual Operand = "=="
|
||||
OperandGreaterThan Operand = ">"
|
||||
OperandGreaterOrEqualTo Operand = ">="
|
||||
OperandLessThan Operand = "<"
|
||||
OperandLessThanOrEqualTo Operand = "<="
|
||||
OperandNotEqualTo Operand = "!="
|
||||
OperandAnd Operand = "&&"
|
||||
OperandOr Operand = "||"
|
||||
)
|
||||
|
||||
type Rule struct {
|
||||
Properties []Group
|
||||
Stats []Group
|
||||
MaxQuantity []Group
|
||||
}
|
||||
|
||||
type Keyword string
|
||||
type Operand string
|
||||
|
||||
type Comparable struct {
|
||||
Keyword string
|
||||
Comparison Operand
|
||||
ValueInt int
|
||||
ValueString string
|
||||
Operand
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
Comparable []Comparable
|
||||
Operand
|
||||
}
|
||||
Reference in New Issue
Block a user