Index
Modules:
mummy
,
mummy/common
,
mummy/internal
,
routers
.
API symbols
`$`:
mummy: proc `$`(request: Request): string
mummy: proc `$`(websocket: WebSocket): string
`[]=`:
common: proc `[]=`(pathParams: var PathParams; key, value: string)
`[]`:
common: proc `[]`(pathParams: PathParams; key: string): string
addRoute:
routers: proc addRoute(router: var Router; httpMethod, route: string | static string; handler: RequestHandler)
BinaryMessage:
mummy: MessageKind.BinaryMessage
close:
mummy: proc close(server: Server)
mummy: proc close(websocket: WebSocket)
CloseEvent:
mummy: WebSocketEvent.CloseEvent
contains:
common: proc contains(pathParams: PathParams; key: string): bool
convertToHandler:
routers: converter convertToHandler(router: Router): RequestHandler
currentExceptionAsMummyError:
internal: template currentExceptionAsMummyError(): untyped
DebugLevel:
common: LogLevel.DebugLevel
delete:
routers: proc delete(router: var Router; route: string | static string; handler: RequestHandler)
echoLogger:
common: proc echoLogger(level: LogLevel; args: varargs[string])
encodeFrameHeader:
internal: proc encodeFrameHeader(opcode: uint8; payloadLen: int): string
encodeHeaders:
internal: proc encodeHeaders(statusCode: int; headers: HttpHeaders): string
ErrorEvent:
mummy: WebSocketEvent.ErrorEvent
ErrorLevel:
common: LogLevel.ErrorLevel
get:
routers: proc get(router: var Router; route: string | static string; handler: RequestHandler)
getOrDefault:
common: proc getOrDefault(pathParams: PathParams; key, default: string): string
head:
routers: proc head(router: var Router; route: string | static string; handler: RequestHandler)
Http10:
common: HttpVersion.Http10
Http11:
common: HttpVersion.Http11
HttpVersion:
common: enum HttpVersion
InfoLevel:
common: LogLevel.InfoLevel
LogHandler:
common: type LogHandler
LogLevel:
common: enum LogLevel
Message:
mummy: object Message
MessageEvent:
mummy: WebSocketEvent.MessageEvent
MessageKind:
mummy: enum MessageKind
MummyError:
common: object MummyError
newServer:
mummy: proc newServer(handler: RequestHandler; websocketHandler: WebSocketHandler = nil; logHandler: LogHandler = nil; workerThreads = max(countProcessors() * 10, 1); maxHeadersLen = 8 * 1024; maxBodyLen = 1024 * 1024; maxMessageLen = 64 * 1024): Server
OpenEvent:
mummy: WebSocketEvent.OpenEvent
options:
routers: proc options(router: var Router; route: string | static string; handler: RequestHandler)
patch:
routers: proc patch(router: var Router; route: string | static string; handler: RequestHandler)
PathParams:
common: type PathParams
Ping:
mummy: MessageKind.Ping
Pong:
mummy: MessageKind.Pong
post:
routers: proc post(router: var Router; route: string | static string; handler: RequestHandler)
put:
routers: proc put(router: var Router; route: string | static string; handler: RequestHandler)
Request:
mummy: type Request
RequestErrorHandler:
routers: type RequestErrorHandler
RequestHandler:
mummy: type RequestHandler
RequestObj:
mummy: object RequestObj
respond:
mummy: proc respond(request: Request; statusCode: int; headers: sink HttpHeaders = emptyHttpHeaders(); body: sink string = "")
responded:
mummy: proc responded(request: Request): bool
Router:
routers: object Router
send:
mummy: proc send(websocket: WebSocket; data: sink string; kind = TextMessage)
serve:
mummy: proc serve(server: Server; port: Port; address = "localhost")
Server:
mummy: type Server
strictParseHex:
internal: proc strictParseHex(s: openArray[char]): int
strictParseInt:
internal: proc strictParseInt(s: openArray[char]): int
TextMessage:
mummy: MessageKind.TextMessage
toBase:
common: converter toBase(pathParams: var PathParams): var seq[(string, string)]
common: converter toBase(pathParams: PathParams): lent seq[(string, string)]
toHandler:
routers: proc toHandler(router: Router): RequestHandler
toHexWithoutLeadingZeroes:
internal: proc toHexWithoutLeadingZeroes(i: int): string
upgradeToWebSocket:
mummy: proc upgradeToWebSocket(request: Request): WebSocket
waitUntilReady:
mummy: proc waitUntilReady(server: Server; timeout: float = 10.0)
WebSocket:
mummy: object WebSocket
WebSocketEvent:
mummy: enum WebSocketEvent
WebSocketHandler:
mummy: type WebSocketHandler