Types
KeyValueTuple = tuple[key: string, value: string]
- Source Edit
PatternCallback = proc (pattern: string; value: string): int {....gcsafe, raises: [].}
- Source Edit
SegmentedPath = object data*: seq[string] patterns*: uint64
- Source Edit
Procs
proc `$`(seg: SegmentedPath): string {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `<`(s1, s2: SegmentedPath): bool {....raises: [], tags: [RootEffect], forbids: [].}
- Source Edit
proc `==`(s1, s2: SegmentedPath): bool {....raises: [], tags: [RootEffect], forbids: [].}
- Source Edit
proc createPath(upath: string; values: openArray[KeyValueTuple]): string {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc getPairs(spath: SegmentedPath; vpath: SegmentedPath): seq[KeyValueTuple] {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc getPatterns(spath: SegmentedPath): seq[string] {....raises: [], tags: [], forbids: [].}
- Returns all the patterns in path spath. Source Edit
proc init(st: typedesc[SegmentedPath]; request: HttpMethod; upath: string): RestResult[ SegmentedPath] {....raises: [].}
- Source Edit
proc init(st: typedesc[SegmentedPath]; request: HttpMethod; upath: string; patternCb: PatternCallback): SegmentedPath {....raises: [].}
- Source Edit
proc init(st: typedesc[SegmentedPath]; upath: string): RestResult[SegmentedPath] {. ...raises: [].}
- Source Edit
proc init(st: typedesc[SegmentedPath]; upath: string; patternCb: PatternCallback): SegmentedPath {. ...raises: [].}
- Source Edit
proc isEqual(spath1, spath2: SegmentedPath): bool {....raises: [], tags: [], forbids: [].}
- Returns true if both path has equal patterns (number of patterns are equal, and pattern names are equal). Source Edit
proc patternsCount(spath: SegmentedPath): int {....raises: [], tags: [], forbids: [].}
- Returns number of patterns inside path spath. Source Edit
proc rewritePath(spath: SegmentedPath; dpath: SegmentedPath; vpath: SegmentedPath): SegmentedPath {....raises: [], tags: [], forbids: [].}
- Source Edit
Iterators
iterator indexes(spath: SegmentedPath): int {....raises: [], tags: [], forbids: [].}
- Iterate over all patterns indexes in path spath. Source Edit
iterator keys(spath: SegmentedPath): string {....raises: [], tags: [], forbids: [].}
- Iterate over all patterns in path spath. Source Edit
iterator pairs(spath: SegmentedPath; vpath: SegmentedPath): KeyValueTuple {. ...raises: [], tags: [], forbids: [].}
- Source Edit
Templates
template hasPatterns(spath: SegmentedPath): bool {..}
- Source Edit
template isPattern(spath: SegmentedPath; pos: int): bool {..}
- Source Edit
Exports
-
RestBadRequestError, RestServerMetricsTypes, RestCommunicationError, ResponseContentBody, RestServerMetrics, ByteChar, RestDefect, response, RestKeyValueTuple, redirect, RestApiResponseKind, response, error, response, RestApiResponse, RestResult, redirect, redirect, RestEncodingError, response, RestRedirectionError, error, response, error, RestApiError, RestResponseError, ContentBody, raiseRestDnsResolveError, RestServerMetricsType, init, RestDecodingError, RestDnsResolveError, RestError, response