ContextRouter

class Object
trait Matchable
class Any

Type members

Classlikes

object Routable
Companion:
class
sealed trait Routable[F[_], A]
Companion:
object
final class Segment[F[_], A, B](val run: (A, Segment) => OptionT[F, B])
Companion:
object
object Segment
Companion:
class

Value members

Concrete methods

def apply[F[_] : Monad, A](mappings: (String, ContextRoutes[A, F])*): ContextRoutes[A, F]

Defines an ContextRoutes based on list of mappings.

Defines an ContextRoutes based on list of mappings.

See also:

define

def define[F[_] : Monad, A](mappings: (String, ContextRoutes[A, F])*)(default: ContextRoutes[A, F]): ContextRoutes[A, F]

Defines an ContextRoutes based on list of mappings and a default Service to be used when none in the list match incoming requests.

Defines an ContextRoutes based on list of mappings and a default Service to be used when none in the list match incoming requests.

The mappings are processed in descending order (longest first) of prefix length.

def dynamic[F[_] : Sync, A](mappings: Routable[F, A]*)(default: ContextRoutes[A, F]): ContextRoutes[A, F]
def of[F[_] : Sync, A](mappings: Routable[F, A]*): ContextRoutes[A, F]