AuthedRoutes

object AuthedRoutes
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[T, F[_]](run: ContextRequest[F, T] => OptionT[F, Response[F]])(implicit F: Monad[F]): AuthedRoutes[T, F]

Lifts a function into an AuthedRoutes. The application of run is suspended in F to permit more efficient combination of routes via SemigroupK.

Lifts a function into an AuthedRoutes. The application of run is suspended in F to permit more efficient combination of routes via SemigroupK.

Type Params
F

the effect of the AuthedRoutes

T

the type of the auth info in the AuthedRequest accepted by the AuthedRoutes

Value Params
run

the function to lift

Returns

an AuthedRoutes that wraps run

def empty[T, F[_]](implicit evidence$1: Applicative[F]): AuthedRoutes[T, F]

The empty service (all requests fallthrough).

The empty service (all requests fallthrough).

Type Params
T
  • ignored.
def of[T, F[_]](pf: PartialFunction[ContextRequest[F, T], F[Response[F]]])(implicit FA: Monad[F]): AuthedRoutes[T, F]

Lifts a partial function into an AuthedRoutes. The application of the partial function is suspended in F to permit more efficient combination of authed services via SemigroupK.

Lifts a partial function into an AuthedRoutes. The application of the partial function is suspended in F to permit more efficient combination of authed services via SemigroupK.

Type Params
F

the base effect of the AuthedRoutes

Value Params
pf

the partial function to lift

Returns

An AuthedRoutes that returns some Response in an OptionT[F, *] wherever pf is defined, an OptionT.none wherever it is not