Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovedExpression ¶
type ApprovedExpression struct { Comparison ComparisonOperator `@("==" | ">" | ">=" | "<" | "<=")?` Count int `@Int` }
type BinaryOperator ¶
type BinaryOperator int
const ( BinaryOperatorBoth BinaryOperator = iota BinaryOperatorEither )
func (*BinaryOperator) Capture ¶
func (o *BinaryOperator) Capture(s []string) error
type ComparisonOperator ¶
type ComparisonOperator int
const ( ComparisonOperatorEqual ComparisonOperator = iota ComparisonOperatorLess ComparisonOperatorLessOrEqual ComparisonOperatorGreaterOrEqual ComparisonOperatorGreater )
func (*ComparisonOperator) Capture ¶
func (c *ComparisonOperator) Capture(s []string) error
type Expression ¶
type Expression struct { Left *Term `@@` Right []*OperatorTerm `( @@ )*` }
func NewExpression ¶
func NewExpression(filter string) (*Expression, error)
func (*Expression) BuildFilter ¶
func (e *Expression) BuildFilter() model.MergeReqFilter
type FilterInfo ¶
type FilterInfo struct { Expression string Matcher model.MergeReqFilter Error error }
func BuildFilter ¶
func BuildFilter(filterexpr string) FilterInfo
type Match ¶
type Match struct { Project *StringPattern `"p" @@` RealName *StringPattern `| "n" @@` UserName *StringPattern `| "u" @@` Age *Time `| "a" @@` Activity *Time `| "t" @@` Approved *ApprovedExpression `| "v" @@` ApproverRealName *StringPattern `| "vn" @@` ApproverUserName *StringPattern `| "vu" @@` ReviewerRealName *StringPattern `| "rn" @@` ReviewerUserName *StringPattern `| "ru" @@` State *State `| "s" @("o" | "c" | "m" | "l" | "open" | "closed" | "merged" | "locked")` Status *Status `| "m" @("n" | "u" | "o" | "r" | "new" | "updated" | "old" | "read")` Label *StringPattern `| "l" @@` WIP bool `| @"w"` TargetBranch *StringPattern `| "b" @@` ID *ProjectID `| "i" @@` }
func (*Match) BuildFilter ¶
func (m *Match) BuildFilter() model.MergeReqFilter
type OperatorTerm ¶
type OperatorTerm struct { Operator BinaryOperator `@("&" | "|")` Term *Term `@@` }
type PatternFlag ¶
type PatternFlag int
const ( PatternFlagCaseFold PatternFlag = iota PatternFlagGlob )
func (*PatternFlag) Capture ¶
func (f *PatternFlag) Capture(str []string) error
type Status ¶
type Status int
func (*Status) AsStatus ¶
func (s *Status) AsStatus() model.MergeReqStatus
type String ¶
type StringPattern ¶
type StringPattern struct { Value *String `@@` Flags []*StringPatternFlag `@@*` }
func (*StringPattern) AsString ¶
func (p *StringPattern) AsString() string
func (*StringPattern) HasFlag ¶
func (p *StringPattern) HasFlag(f PatternFlag) bool
type StringPatternFlag ¶
type StringPatternFlag struct {
Flag *PatternFlag `@("/i" | "/g")`
}
type Term ¶
type Term struct { Operator *UnaryOperator `@("!")?` Match *Match `("~" @@` SubExpression *Expression ` | "(" @@ ")")` }
func (*Term) BuildFilter ¶
func (t *Term) BuildFilter() model.MergeReqFilter
type Time ¶
func (*Time) AsDuration ¶
type UnaryOperator ¶
type UnaryOperator int
const (
UnaryOperatorReject UnaryOperator = iota
)
func (*UnaryOperator) Capture ¶
func (o *UnaryOperator) Capture(s []string) error
Click to show internal directories.
Click to hide internal directories.