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[_], A](mappings: (String, ContextRoutes[A, F])*)(implicit evidence$1: Sync[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[_], A](mappings: (String, ContextRoutes[A, F])*)(default: ContextRoutes[A, F])(implicit evidence$2: Sync[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[_], A](mappings: Routable[F, A]*)(default: ContextRoutes[A, F])(implicit evidence$4: Sync[F]): ContextRoutes[A, F]
def of[F[_], A](mappings: Routable[F, A]*)(implicit evidence$3: Sync[F]): ContextRoutes[A, F]