Documentation ¶
Index ¶
- func EvalTagExpr(expr *TagExpr, tags map[string]struct{}, methods map[string]struct{}) bool
- func GetRouteRegexps(routes []RouteInfo, filter *TagExpr) routeRegexps
- func ParseRouteFile(input io.Reader, casePolicy CasePolicy) ([]RouteFileEntry, []RouteError)
- func ProcessRouteFile(files [][]RouteFileEntry, filenames []string, nameSeparator string, ...) ([]RouteInfo, []RouteError)
- func RouteRegexpsToJSON(rrs *routeRegexps, filter *TagExpr) ([]byte, int)
- type CasePolicy
- type InclusionStatus
- type RouteError
- type RouteErrorKind
- type RouteFileEntry
- type RouteInfo
- type RouteWithParents
- type TagExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalTagExpr ¶ added in v0.5.1
func GetRouteRegexps ¶
func ParseRouteFile ¶
func ParseRouteFile(input io.Reader, casePolicy CasePolicy) ([]RouteFileEntry, []RouteError)
func ProcessRouteFile ¶
func ProcessRouteFile(files [][]RouteFileEntry, filenames []string, nameSeparator string, groupObserver func([]RouteWithParents)) ([]RouteInfo, []RouteError)
func RouteRegexpsToJSON ¶
Types ¶
type CasePolicy ¶ added in v0.4.0
type CasePolicy int
const ( AllowUpperCase CasePolicy = iota DisallowUpperCase CasePolicy = iota )
type InclusionStatus ¶ added in v0.5.1
type InclusionStatus int
const ( Include InclusionStatus = iota Exclude InclusionStatus = iota Union InclusionStatus = iota )
type RouteError ¶
type RouteError struct { Kind RouteErrorKind Line int Col int DuplicateName string OtherLine int IOError error Filenames []string }
func ParseRouteFiles ¶
func ParseRouteFiles(inputFiles []string, inputReaders []io.Reader, casePolicy CasePolicy) ([][]RouteFileEntry, []RouteError)
func (RouteError) Error ¶
func (e RouteError) Error() string
type RouteErrorKind ¶
type RouteErrorKind int
const ( MissingNameOrRoute RouteErrorKind = iota DuplicateRouteName RouteErrorKind = iota RootMustStartWithSlash RouteErrorKind = iota OverlappingRoutes RouteErrorKind = iota MisplacedDot RouteErrorKind = iota RouteContainsBadCodePoint RouteErrorKind = iota QuestionMarkInRoute RouteErrorKind = iota HashInRoute RouteErrorKind = iota WhitespaceInRoute RouteErrorKind = iota IllegalCharInParamName RouteErrorKind = iota IllegalBackslashEscape RouteErrorKind = iota IllegalBackslashEscapeInRouteName RouteErrorKind = iota NontabspaceIndentationCharacter RouteErrorKind = iota BadCharacterInMethodName RouteErrorKind = iota MissingCommaBetweenMethodNames RouteErrorKind = iota TwoCommasInSequenceInMethodNames RouteErrorKind = iota IndentLessThanFirstLine RouteErrorKind = iota OnlyNoTrailingSlash RouteErrorKind = iota NoTrailingSlashAfterSlash RouteErrorKind = iota MultipleSlashesInARow RouteErrorKind = iota UpperCaseCharInRoute RouteErrorKind = iota IOError RouteErrorKind = iota EmptyMethodList RouteErrorKind = iota )
type RouteFileEntry ¶
type RouteFileEntry struct {
// contains filtered or unexported fields
}
type RouteWithParents ¶
Click to show internal directories.
Click to hide internal directories.