presto/servercommon

Source   Edit  

Types

RestRequestError {.pure.} = enum
  Invalid, NotFound, InvalidContentBody, InvalidContentType, Unexpected
Source   Edit  
RestRequestErrorHandler = proc (error: RestRequestError; request: HttpRequestRef): Future[
    HttpResponseRef] {.async: (...raises: [CancelledError]).}
Source   Edit  
RestServerMiddlewareRef = ref object of HttpServerMiddlewareRef
  router*: RestRouter
  errorHandler*: RestRequestErrorHandler
  nextHandler*: HttpProcessCallback2
Source   Edit  
RestServerState {.pure.} = enum
  Closed, Stopped, Running
Source   Edit  

Templates

template chroniclesExpandItIMPL(record: auto; it_name: static string;
                                it: RestApiError) {..}
Source   Edit  
template chroniclesExpandItIMPL[RecordType: tuple](record: RecordType;
    it_name: static string; it: RestApiError; enabled: auto) {..}
Source   Edit  
template chroniclesFormatItIMPL(it: HttpTable): auto {..}
Source   Edit  
template chroniclesFormatItIMPL(it: Option[ContentBody]): auto {..}
Source   Edit