ContextRoutes
Attributes
- Source
- ContextRoutes.scala
- Graph
-
- Supertypes
- Self type
-
ContextRoutes.type
Members list
Value members
Concrete methods
Lifts a function into an ContextRoutes.
Lifts a function into an ContextRoutes. The application of run
is suspended in F
to permit more efficient combination of routes via SemigroupK
.
Type parameters
- F
-
the effect of the ContextRoutes
- T
-
the type of the context info in the ContextRequest accepted by the ContextRoutes
Value parameters
- run
-
the function to lift
Attributes
- Returns
-
an ContextRoutes that wraps
run
- Source
- ContextRoutes.scala
The empty service (all requests fallthrough).
The empty service (all requests fallthrough).
Type parameters
- T
-
- ignored.
Attributes
- Returns
- Source
- ContextRoutes.scala
Lifts an effectful Response into an ContextRoutes.
Lifts an effectful Response into an ContextRoutes.
Type parameters
- F
-
the effect of the ContextRoutes
Value parameters
- fr
-
the effectful Response to lift
Attributes
- Returns
-
an ContextRoutes that always returns
fr
- Source
- ContextRoutes.scala
Transforms an ContextRequest on its input.
Transforms an ContextRequest on its input. The application of the transformed function is suspended in F
to permit more efficient combination of routes via SemigroupK
.
Type parameters
- F
-
the base effect of the ContextRoutes
- T
-
the type of the context info in the ContextRequest accepted by the ContextRoutes
Value parameters
- f
-
a function to apply to the ContextRequest
- fa
-
the ContextRoutes to transform
Attributes
- Returns
-
An ContextRoutes whose input is transformed by
f
before being applied tofa
- Source
- ContextRoutes.scala
Lifts a partial function into an ContextRoutes.
Lifts a partial function into an ContextRoutes. The application of the partial function is suspended in F
to permit more efficient combination of authed services via SemigroupK
.
Type parameters
- F
-
the base effect of the ContextRoutes
- T
-
the type of the context info in the ContextRequest accepted by the ContextRoutes
Value parameters
- pf
-
the partial function to lift
Attributes
- Returns
-
An ContextRoutes that returns some Response in an
OptionT[F, *]
whereverpf
is defined, anOptionT.none
wherever it is not - Source
- ContextRoutes.scala
Lifts a Response into an ContextRoutes.
Lifts a Response into an ContextRoutes.
Type parameters
- F
-
the base effect of the ContextRoutes
- T
-
the type of the context info in the ContextRequest accepted by the ContextRoutes
Value parameters
- r
-
the Response to lift
Attributes
- Returns
-
an ContextRoutes that always returns
r
in effectOptionT[F, *]
- Source
- ContextRoutes.scala
Lifts a partial function into an ContextRoutes.
Lifts a partial function into an ContextRoutes. The application of the partial function is not suspended in F
, unlike of. This allows for less constraints when not combining many routes.
Type parameters
- F
-
the base effect of the ContextRoutes
- T
-
the type of the context info in the ContextRequest accepted by the ContextRoutes
Value parameters
- pf
-
the partial function to lift
Attributes
- Returns
-
A ContextRoutes that returns some Response in an
OptionT[F, *]
whereverpf
is defined, anOptionT.none
wherever it is not - Source
- ContextRoutes.scala
Converts a ContextRoutes to HttpRoutes.
Converts a ContextRoutes to HttpRoutes. It uses a Monoid.empty
to supply a value for the emptyContext. The application of routes
is suspended in F
to permit more efficient combination of routes via SemigroupK
.
Type parameters
- F
-
the effect of the ContextRoutes
- T
-
the type of the context info in the ContextRequest accepted by the ContextRoutes
Value parameters
- routes
-
the ContextRoutes to transform
Attributes
- Returns
-
an ContextRoutes that wraps
run
- Source
- ContextRoutes.scala
Converts a ContextRoutes to HttpRoutes.
Converts a ContextRoutes to HttpRoutes. The application of routes
is suspended in F
to permit more efficient combination of routes via SemigroupK
.
Type parameters
- F
-
the effect of the ContextRoutes
- T
-
the type of the context info in the ContextRequest accepted by the ContextRoutes.
Value parameters
- emptyContext
-
the empty context
- routes
-
the ContextRoutes to transform
Attributes
- Returns
-
an ContextRoutes that wraps
run
- Source
- ContextRoutes.scala