package raw
- Alphabetic
- Public
- All
Type Members
- sealed abstract class AbstractMapping[V] extends PartialFunction[String, V]
- abstract class AbstractMappingCompanion[M[V] <: AbstractMapping[V]] extends AnyRef
-
sealed
trait
HttpBody extends AnyRef
Value used to represent HTTP body.
Value used to represent HTTP body. Also used as direct encoding of Body parameter in CustomBody methods. Types that have encoding to JsonValue automatically have encoding to HttpBody with
application/json
media type. There is also a specialized encoding provided forUnit
which returns empty HTTP body when writing and ignores the body when reading. - trait HttpBodyLowPrio extends AnyRef
- final case class HttpCall(pathParams: List[PlainValue], metadata: HttpMethodMetadata[_]) extends RestMethodCall with Product with Serializable
- final case class HttpErrorException(code: Int, payload: com.avsystem.commons.OptArg[String] = OptArg.Empty, cause: Throwable = null) extends RuntimeException with NoStackTrace with Product with Serializable
-
final
class
HttpMethod extends AbstractValueEnum
Enum representing HTTP methods.
- final case class HttpMethodMetadata[T](name: String, methodTag: HttpMethodTag, bodyTypeTag: BodyTypeTag, parametersMetadata: RestParametersMetadata, bodyParams: List[ParamMetadata[_]], formBody: Boolean, requestAdjusters: List[RequestAdjuster], responseAdjusters: List[ResponseAdjuster], responseType: HttpResponseType[T]) extends RestMethodMetadata[T] with Product with Serializable
-
final
case class
HttpResponseType[T]() extends Product with Serializable
Typeclass used during RestMetadata materialization to determine whether a real method is a valid HTTP method.
Typeclass used during RestMetadata materialization to determine whether a real method is a valid HTTP method. Usually this means that the result must be a type wrapped into something that captures asynchronous computation, e.g.
Future
. Because REST framework core tries to be agnostic about this asynchronous wrapper (not everyone likesFuture
s), there are no default implicits provided for HttpResponseType. They must be provided externally.For example, FutureRestImplicits introduces an instance of HttpResponseType for
Future[T]
, for arbitrary typeT
. For RestMetadata materialization this means that every method which returns aFuture
is considered a valid HTTP method. FutureRestImplicits is injected into materialization of RestMetadata through one of the base companion classes, e.g. DefaultRestApiCompanion. SeeMacroInstances
for more information on injection of implicits.- Annotations
- @implicitNotFound( ... )
-
final
case class
IMapping[V](entries: com.avsystem.commons.ISeq[(String, V)]) extends AbstractMapping[V] with Product with Serializable
A version of Mapping which is case-insensitive when looking up values by key.
-
final
case class
JsonValue(value: String) extends AnyVal with Product with Serializable
Value used as encoding of Body parameters of JsonBody methods.
-
final
case class
Mapping[V](entries: com.avsystem.commons.ISeq[(String, V)]) extends AbstractMapping[V] with Product with Serializable
Represents an immutable, ordered sequence of key-value pairs with textual keys.
Represents an immutable, ordered sequence of key-value pairs with textual keys. Mapping additionally holds a lazy initialized map which allows fast lookup by key. When looking up values by key, duplicate entries are dropped and only the last value for given key is returned.
Mappings have O(1) prepend, append and concatenation operations.
- final case class ParamMetadata[T](name: String) extends TypedMetadata[T] with Product with Serializable
- final case class PathName(value: PlainValue) extends PathPatternElement with Product with Serializable
- final case class PathParam(param: PathParamMetadata[_]) extends PathPatternElement with Product with Serializable
- final case class PathParamMetadata[T](name: String, pathAnnot: Path) extends TypedMetadata[T] with Product with Serializable
- sealed trait PathPatternElement extends AnyRef
-
final
case class
PlainValue(value: String) extends AnyVal with Product with Serializable
Value used as encoding of Path, Header and Query parameters as well as Body parameters of FormBody methods.
- final case class PrefixCall(pathParams: List[PlainValue], metadata: PrefixMetadata[_]) extends RestMethodCall with Product with Serializable
- final case class PrefixMetadata[T](name: String, methodTag: Prefix, parametersMetadata: RestParametersMetadata, requestAdjusters: List[RequestAdjuster], responseAdjusters: List[ResponseAdjuster], result: RestMetadata.Lazy[T]) extends RestMethodMetadata[T] with Product with Serializable
-
trait
RawRest extends AnyRef
- Annotations
- @methodTag( ... ) @methodTag( ... )
- final case class ResolvedCall(root: RestMetadata[_], prefixes: List[PrefixCall], finalCall: HttpCall) extends Product with Serializable
-
final
case class
RestMetadata[T](prefixMethods: List[PrefixMetadata[_]], httpGetMethods: List[HttpMethodMetadata[_]], httpBodyMethods: List[HttpMethodMetadata[_]]) extends Product with Serializable
- Annotations
- @implicitNotFound( ... ) @methodTag( ... ) @methodTag( ... )
- sealed abstract class RestMethodCall extends AnyRef
- sealed abstract class RestMethodMetadata[T] extends TypedMetadata[T]
-
final
case class
RestParameters(path: List[PlainValue] = Nil, headers: IMapping[PlainValue] = IMapping.empty, query: Mapping[PlainValue] = Mapping.empty, cookies: Mapping[PlainValue] = Mapping.empty) extends Product with Serializable
Aggregates serialized path, header and query parameters of an HTTP request.
- final case class RestParametersMetadata(pathParams: List[PathParamMetadata[_]], headerParams: List[ParamMetadata[_]], queryParams: List[ParamMetadata[_]], cookieParams: List[ParamMetadata[_]]) extends Product with Serializable
- final case class RestRequest(method: HttpMethod, parameters: RestParameters, body: HttpBody) extends Product with Serializable
- final case class RestResponse(code: Int, headers: IMapping[PlainValue], body: HttpBody) extends Product with Serializable
- trait RestResponseLowPrio extends AnyRef
Value Members
- object AbstractMapping
- object HttpBody extends HttpBodyLowPrio
- object HttpMethod extends AbstractValueEnumCompanion[HttpMethod] with Serializable
- object HttpResponseType extends Serializable
- object IMapping extends AbstractMappingCompanion[IMapping] with Serializable
- object JsonValue extends (String) ⇒ JsonValue with Serializable
- object Mapping extends AbstractMappingCompanion[Mapping] with Serializable
- object PlainValue extends (String) ⇒ PlainValue with Serializable
- object RawRest extends RawRpcCompanion[RawRest]
- object RestMetadata extends RpcMetadataCompanion[RestMetadata] with Serializable
- object RestParameters extends Serializable
- object RestResponse extends RestResponseLowPrio with Serializable