p

smithy4s

package smithy4s

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

Package Members

  1. package capability
  2. package http
  3. package internals
  4. package kinds
  5. package schema

Type Members

  1. trait Bijection[A, B] extends Function[A, B]

    A bijection is an association of two opposite functions A => B and B => A.

    A bijection is an association of two opposite functions A => B and B => A.

    A bijection MUST abide by the round-tripping property, namely, for all input A :

    bijection.from(bijection(input)) == input

  2. class ByteArray extends AnyRef
  3. final case class ConstraintError(hint: Hint, message: String) extends Throwable with NoStackTrace with Product with Serializable
  4. sealed trait Document extends Product with Serializable

    A json-like free-form structure serving as a model for the Document datatype in smithy.

  5. trait Endpoint[Op[_, _, _, _, _], I, E, O, SI, SO] extends AnyRef

    A representation of a smithy operation.

  6. trait Enumeration[E <: Value] extends Companion[E]
  7. trait Errorable[E] extends AnyRef
  8. trait HasId extends AnyRef
  9. type Hint = Binding
  10. sealed abstract class HintMask extends AnyRef
  11. trait Hints extends AnyRef

    A hint is an arbitrary piece of data that can be added to a schema, at the struct level, or at the field/member level.

    A hint is an arbitrary piece of data that can be added to a schema, at the struct level, or at the field/member level.

    You can think of it as an annotation that can communicate additional information to encoders/decoders (for instance, a change in a label, a regex pattern some string should abide by, a range, etc)

    This Hints interface is a container for hints.

  12. final case class IntEnum() extends Product with Serializable
  13. final class Lazy[A] extends AnyRef
  14. abstract class Newtype[A] extends HasId
  15. case class PayloadPath(segments: List[Segment]) extends Product with Serializable
  16. type PolyFunction[F[_], G[_]] = smithy4s.kinds.PolyFunction[F, G]
  17. trait Protocol[A] extends AnyRef
  18. trait Refinement[A, B] extends AnyRef

    A type-refinement, associated to a runtime-representation of a constraint.

    A type-refinement, associated to a runtime-representation of a constraint.

    Represents the fact that you can go from A to B provided the value of tye A abides by a given Constraint.

  19. trait RefinementProvider[C, A, B] extends AnyRef

    Given a constraint of type C, an RefinementProvider can produce a Refinement that allows to go from A to B.

    Given a constraint of type C, an RefinementProvider can produce a Refinement that allows to go from A to B.

    A RefinementProvider can be used as a typeclass.

  20. type Schema[A] = smithy4s.schema.Schema[A]
  21. trait Service[Alg[_[_, _, _, _, _]]] extends FunctorK5[Alg] with Provider[Alg]

    Generic representation of a service, as a list of "endpoints" (mapping to smithy operations).

    Generic representation of a service, as a list of "endpoints" (mapping to smithy operations).

    This abstraction lets us retrieve all information necessary to the generic implementation of protocols, as well as transform implementations of finally-encoded interfaces into interpreters (polymorphic functions) that operate on initially-encoded GADTs.

    Alg

    : a finally-encoded interface (commonly called algebra) that works against an abstract "effect" that takes 5 type parameters: Input, Error, Output, StreamedInput, StreamedOutput

  22. final case class ShapeId(namespace: String, name: String) extends HasId with Product with Serializable
  23. trait ShapeTag[A] extends HasId

    A tag that can be used as keys for higher-kinded maps

  24. sealed trait StreamingSchema[A] extends AnyRef
  25. trait Surjection[A, B] extends Function[A, Either[String, B]]

    A surjection of a partial function A => Either[String, B] and a total function B => A.

    A surjection of a partial function A => Either[String, B] and a total function B => A.

    A surjection MUST abide by the round-tripping property, namely, for all input A that passes the validation function

    surjection(input).map(surjection.from) == Right(input)

  26. case class Timestamp extends TimestampPlatform with Product with Serializable
  27. trait Transformation[Func, Input, Output] extends AnyRef

    Heterogenous function construct, allows to abstract over various kinds of functions whilst providing an homogenous user experience without the user having to manually lift functions from one kind to the other.

    Heterogenous function construct, allows to abstract over various kinds of functions whilst providing an homogenous user experience without the user having to manually lift functions from one kind to the other.

    // assuming Foo is a code-generated interface
    val fooOption : Foo[Option] = ???
    val toList = new smithy4s.PolyFunction[Option, List]{def apply[A](fa: Option[A]): List[A] = fa.toList}
    val fooList : Foo[List] = foo.transform(toList)

    It is possible to plug arbitrary transformations to mechanism, such as cats.arrow.FunctionK

  28. final case class UnsupportedProtocolError(service: HasId, protocolTag: HasId) extends Throwable with Product with Serializable
  29. type ~>[F[_], G[_]] = smithy4s.kinds.PolyFunction[F, G]

Value Members

  1. val Schema: smithy4s.schema.Schema.type
  2. def checkProtocol[Alg[_[_, _, _, _, _]]](service: Service[Alg], protocolTag: ShapeTag[_]): Either[UnsupportedProtocolError, Unit]
  3. val errorTypeHeader: String
  4. object Bijection
  5. object ByteArray
  6. object Document extends Serializable
  7. object Enumeration
  8. object HintMask
  9. object Hints
  10. object IntEnum extends Companion[IntEnum] with Serializable
  11. object Lazy
  12. object Newtype
  13. object NumericCompat
  14. object PayloadPath extends Serializable
  15. object Refinement
  16. object RefinementProvider
  17. object Service
  18. object ShapeId extends Has[ShapeId] with Serializable
  19. object ShapeTag
  20. object StreamingSchema
  21. object Surjection
  22. object Timestamp extends TimestampCompanionPlatform with Serializable
  23. object Transformation

Inherited from AnyRef

Inherited from Any

Ungrouped