package codec
- Alphabetic
- By Inheritance
- codec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait Alternator[L, R] extends AnyRef
A alternator is a type class responsible for combining invariant type parameters using an either.
A alternator is a type class responsible for combining invariant type parameters using an either. It is used to compose parameters of the zio.http.codec.HttpCodec data type.
- trait AlternatorLowPriority1 extends AlternatorLowPriority2
- trait AlternatorLowPriority2 extends AlternatorLowPriority3
- trait AlternatorLowPriority3 extends AnyRef
- final case class BinaryCodecWithSchema[A](codec: BinaryCodec[A], schema: Schema[A]) extends Product with Serializable
- sealed trait Combiner[L, R] extends AnyRef
A combiner is a type class responsible for combining invariant type parameters using a tuple.
A combiner is a type class responsible for combining invariant type parameters using a tuple. It is used to compose the parameters of the zio.http.codec.HttpCodec data type.
- trait CombinerLowPriority1 extends CombinerLowPriority2
- trait CombinerLowPriority2 extends CombinerLowPriority3
- trait CombinerLowPriority3 extends CombinerLowPriority4
- trait CombinerLowPriority4 extends CombinerLowPriority5
- trait CombinerLowPriority5 extends CombinerLowPriority6
- trait CombinerLowPriority6 extends AnyRef
- type ContentCodec[A] = HttpCodec[Content, A]
- sealed trait Doc extends AnyRef
A
Docmodels documentation for an endpoint or input. - type HeaderCodec[A] = HttpCodec[codec.HttpCodecType.Header, A]
- sealed trait HttpCodec[-AtomTypes, Value] extends AnyRef
A zio.http.codec.HttpCodec represents a codec for a part of an HTTP request.
A zio.http.codec.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.
- sealed trait HttpCodecError extends Exception with NoStackTrace with Product with Serializable
- sealed trait HttpCodecType extends AnyRef
- final case class HttpContentCodec[A](choices: ListMap[MediaType, BinaryCodecWithSchema[A]]) extends Product with Serializable
- type MethodCodec[A] = HttpCodec[codec.HttpCodecType.Method, A]
- sealed trait PathCodec[A] extends AnyRef
A codec for paths, which consists of segments, where each segment may be a literal, an integer, a long, a string, a UUID, or the trailing path.
A codec for paths, which consists of segments, where each segment may be a literal, an integer, a long, a string, a UUID, or the trailing path.
import zio.http.endpoint.PathCodec._ val pathCodec = empty / "users" / int("user-id") / "posts" / string("post-id")
- type QueryCodec[A] = HttpCodec[Query, A]
- sealed abstract class RichTextCodec[A] extends AnyRef
A
RichTextCodecis a more compositional version ofTextCodec, which has similar power to traditional parser combinators / pretty printers.A
RichTextCodecis a more compositional version ofTextCodec, which has similar power to traditional parser combinators / pretty printers. Although slower than the simpler text codecs, they can be utilized to parse structured information in HTTP headers, which in turn allows generating much better error messages and documentation than otherwise possible. - sealed trait SegmentCodec[A] extends AnyRef
- sealed trait SimpleCodec[Input, Output] extends PartialFunction[Input, Output]
A simple codec is either equal to a given value, or unconstrained within a domain of values.
A simple codec is either equal to a given value, or unconstrained within a domain of values. There are no other possibilities.
- type StatusCodec[A] = HttpCodec[codec.HttpCodecType.Status, A]
- sealed trait TextCodec[A] extends PartialFunction[String, A]
A zio.http.codec.TextCodec defines a codec for a text fragment.
A zio.http.codec.TextCodec defines a codec for a text fragment. The text fragment can be decoded into a value, or the value can be encoded into a text fragment.
Unlike parsers, text codecs operate on entire fragments. They do not consume input and leave remainders. Also unlike parsers, text codecs do not fail with error messages, but rather, simply return None if they do not succeed in decoding from a given text fragment. Finally, unlike ordinary parsers, text codecs are fully invertible, and can therefore be used in client generation.
Value Members
- object Alternator extends AlternatorLowPriority1
- object BinaryCodecWithSchema extends Serializable
- object Combiner extends CombinerLowPriority1
- object ContentCodec extends ContentCodecs
- object Doc
- object HeaderCodec extends HeaderCodecs
- object HttpCodec extends ContentCodecs with HeaderCodecs with MethodCodecs with QueryCodecs with StatusCodecs
- object HttpCodecError extends Serializable
- object HttpCodecType
- object HttpContentCodec extends Serializable
- object MethodCodec extends MethodCodecs
- object PathCodec
- object QueryCodec extends QueryCodecs
- object RichTextCodec
- object SegmentCodec
- object SimpleCodec
- object StatusCodec extends StatusCodecs
- object TextCodec