LivePath
class LivePath[A] extends LiveRoute[A, A]A route whose parameters are its path values, extended with /.
Start from live, add segments with /, and add query parameters with query or
queryOptional. A LiveView.Routed on a path receives the path values as
its parameters, as in (live / "items" / PathCodec.int("id")) -> ItemLiveView().
Type parameters
Athe values decoded from the path,
Unitwhen it has none
Defined by scalive.LivePath. View source (scalive/api/src/scalive/routing/LiveRouting.scala:600-660)
Methods4
/
def /[B, Out](that: zio.http.codec.PathCodec[B])(using combiner: zio.http.codec.Combiner.WithOut[A, B, Out]): LivePath[Out]Appends path segments, as in live / "projects" / PathCodec.string("project").
A literal string matches itself; a codec such as PathCodec.int("id") decodes one segment and
adds its value to the path values.
Defined by scalive.LivePath./. View source (scalive/api/src/scalive/routing/LiveRouting.scala:608-609)
params
def params[Params](codec: LiveParamsCodec[A, Params]): LiveRoute[A, Params]Decodes the route's values into another parameter type that can still build links.
Defined by scalive.LivePath.params. View source (scalive/api/src/scalive/routing/LiveRouting.scala:658-659)
query
def query[Query](codec: zio.http.codec.package.QueryCodec[Query])[Out](using combiner: zio.http.codec.Combiner.WithOut[A, Query, Out]): LiveRoute[A, Out]Adds query parameters to the parameters a routed LiveView receives.
The LiveView receives the path values and the decoded query together. This form takes a ZIO HTTP query codec.
Defined by scalive.LivePath.query. View source (scalive/api/src/scalive/routing/LiveRouting.scala:616-621)
def query[Query](name: String)(using schema: zio.schema.Schema[Query])[Out](using combiner: zio.http.codec.Combiner.WithOut[A, Query, Out]): LiveRoute[A, Out]Adds query parameters to the parameters a routed LiveView receives.
This form adds one required parameter, as in query[Int]("page").
Defined by scalive.LivePath.query. View source (scalive/api/src/scalive/routing/LiveRouting.scala:627-633)
def query[Query](using schema: zio.schema.Schema[Query])[Out](using combiner: zio.http.codec.Combiner.WithOut[A, Query, Out]): LiveRoute[A, Out]Adds query parameters to the parameters a routed LiveView receives.
This form derives the parameters from the fields of Query's schema.
Defined by scalive.LivePath.query. View source (scalive/api/src/scalive/routing/LiveRouting.scala:650-655)
queryOptional
def queryOptional[Query](name: String)(using schema: zio.schema.Schema[Query])[Out](using combiner: zio.http.codec.Combiner.WithOut[A, Option[Query], Out]): LiveRoute[A, Out]Adds an optional query parameter, which decodes to None when it is absent, as in
queryOptional[String]("q").
Defined by scalive.LivePath.queryOptional. View source (scalive/api/src/scalive/routing/LiveRouting.scala:638-644)