Packages

package api

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. api
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package internal
  2. package openapi

Type Members

  1. type BodyCodec[A] = HttpCodec[api.CodecType.Body, A]
  2. sealed trait CodecType extends AnyRef
  3. sealed trait Combiner[L, R] extends AnyRef

    A combiner is a type class responsible for combining invariant type parameters.

    A combiner is a type class responsible for combining invariant type parameters. It is used to compose the parameters of the zio.http.api.HttpCodec data type.

  4. trait CombinerLowPriority1 extends CombinerLowPriority2
  5. trait CombinerLowPriority2 extends CombinerLowPriority3
  6. trait CombinerLowPriority3 extends CombinerLowPriority4
  7. trait CombinerLowPriority4 extends AnyRef
  8. sealed trait Doc extends AnyRef

    A Doc models documentation for an endpoint or input.

  9. sealed trait EndpointError extends Exception
  10. trait EndpointExecutor[+MI, +MO, +Ids] extends AnyRef

    A zio.http.api.EndpointExecutor is responsible for taking an endpoint invocation, and executing this invocation, returning the final result, or failing with some kind of RPC error.

  11. trait EndpointLocator extends AnyRef
  12. final case class EndpointRegistry[-MI, +MO, +Ids] extends EndpointLocator with Product with Serializable
  13. final case class EndpointSpec[Input, Output](input: HttpCodec[RequestType, Input], output: HttpCodec[ResponseType, Output], doc: Doc) extends Product with Serializable

    An zio.http.api.EndpointSpec represents an API endpoint for the HTTP protocol.

    An zio.http.api.EndpointSpec represents an API endpoint for the HTTP protocol. Every API has an input, which comes from a combination of the HTTP path, query string parameters, and headers, and an output, which is the data computed by the handler of the API.

    MiddlewareInput : Example: A subset of HttpCodec[Input] that doesn't give access to Input MiddlewareOutput: Example: A subset of Out[Output] that doesn't give access to Output Input: Example: Int Output: Example: User

    As zio.http.api.EndpointSpec is a purely declarative encoding of an endpoint, it is possible to use this model to generate a zio.http.App (by supplying a handler for the endpoint), to generate OpenAPI documentation, to generate a type-safe Scala client for the endpoint, and possibly, to generate client libraries in other programming languages.

  14. sealed trait Endpoints[-R, +E, AllIds] extends AnyRef

    Represents a collection of API endpoints that all have handlers.

  15. type HeaderCodec[A] = HttpCodec[Header, A]
  16. trait HeaderCodecs extends AnyRef
  17. sealed trait HttpCodec[-AtomTypes, Value] extends AnyRef

    A zio.http.api.HttpCodec represents a codec for a part of an HTTP request.

    A zio.http.api.HttpCodec represents a codec for a part of an HTTP request. HttpCodec the HTTP protocol, these parts may be the unconsumed portion of the HTTP path (a route codec), the query string parameters (a query codec), the request headers (a header codec), or the request body (a body codec).

    A HttpCodec is a purely declarative description of an input, and therefore, it can be used to generate documentation, clients, and client libraries.

    HttpCodecs are a bit like invertible multi-channel parsers.

  18. final case class Invocation[Id, A, B](api: EndpointSpec[A, B], input: A) extends Product with Serializable
  19. type MethodCodec[A] = HttpCodec[Method, A]
  20. sealed trait Middleware[-R, I, O] extends AnyRef

    A Middleware represents the implementation of a MiddlewareSpec, intercepting parts of the request, and appending to the response.

  21. final case class MiddlewareSpec[MiddlewareIn, MiddlewareOut](middlewareIn: HttpCodec[Header with Query with Method, MiddlewareIn], middlewareOut: HttpCodec[Header, MiddlewareOut]) extends Product with Serializable
  22. type QueryCodec[A] = HttpCodec[Query, A]
  23. type RouteCodec[A] = HttpCodec[Route, A]
  24. sealed trait ServiceSpec[MI, MO, -AllIds] extends AnyRef
  25. type StatusCodec[A] = HttpCodec[Status, A]

Value Members

  1. implicit def string2HttpCodec(string: String): RouteCodec[Unit]
  2. object CodecType
  3. object Combiner extends CombinerLowPriority1
  4. object Doc
  5. object EndpointError extends Serializable
  6. object EndpointExecutor
  7. object EndpointRegistry extends Serializable
  8. object EndpointSpec extends Serializable
  9. object Endpoints
  10. object HeaderCodec extends HeaderCodecs
  11. object HttpCodec extends HeaderCodecs with QueryCodecs with RouteCodecs
  12. object MethodCodec extends MethodCodecs
  13. object Middleware
  14. object MiddlewareSpec extends Serializable
  15. object QueryCodec extends QueryCodecs
  16. object RouteCodec extends RouteCodecs
  17. object ServiceSpec

Inherited from AnyRef

Inherited from Any

Ungrouped