net.ivoah.vial

package net.ivoah.vial

Members list

Type members

Classlikes

case class Cookie(name: String, value: String, domain: Option[String], expires: Option[Instant], httpOnly: Option[Boolean], maxAge: Option[Int], partitioned: Option[Boolean], path: Option[String], sameSite: Option[SameSite])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Request(method: String, path: String, headers: Map[String, Seq[String]], params: Map[String, String], body: Array[Byte])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Request

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Request.type
case class Response(data: IterableOnce[Array[Byte]], headers: Map[String, Seq[String]], cookies: Seq[Cookie], statusCode: Int)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Response

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Response.type
case class Router(routes: PartialFunction[(String, String, Request), Response])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum SameSite(val value: String)

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Server(router: Router, listen: (String, Int) | String)(implicit logger: String => Unit)

Main entry point of a vial application.

Main entry point of a vial application.

Takes either a host/port combo, or the path to a unix domain socket.

Value parameters

listen

host and port pair to bind to, or path for unix socket.

router

the router to use

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete fields

val BUFFER_SIZE: Int

Extensions

Extensions

extension [K, V](map: Map[K, V])
def expect[T1](p1: K)(fn: T1 => Response): Response
def expect[T1, T2](p1: K, p2: K)(fn: (T1, T2) => Response): Response
def expect[T1, T2, T3](p1: K, p2: K, p3: K)(fn: (T1, T2, T3) => Response): Response
def expect[T1, T2, T3, T4](p1: K, p2: K, p3: K, p4: K)(fn: (T1, T2, T3, T4) => Response): Response
def expect[T1, T2, T3, T4, T5](p1: K, p2: K, p3: K, p4: K, p5: K)(fn: (T1, T2, T3, T4, T5) => Response): Response