smithy4s
package smithy4s
- Alphabetic
- By Inheritance
- smithy4s
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
Type Members
- 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
- class ByteArray extends AnyRef
- final case class ConstraintError(hint: Hint, message: String) extends Throwable with NoStackTrace with Product with Serializable
- sealed trait Document extends Product with Serializable
A json-like free-form structure serving as a model for the Document datatype in smithy.
- trait Endpoint[Op[_, _, _, _, _], I, E, O, SI, SO] extends AnyRef
A representation of a smithy operation.
- trait Enumeration[E <: Value] extends Companion[E]
- trait Errorable[E] extends AnyRef
- trait HasId extends AnyRef
- type Hint = Binding
- sealed abstract class HintMask extends AnyRef
- 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. - final case class IntEnum() extends Product with Serializable
- final class Lazy[A] extends AnyRef
- abstract class Newtype[A] extends HasId
- case class PayloadPath(segments: List[Segment]) extends Product with Serializable
- trait Protocol[A] extends AnyRef
- 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.
- 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.
- type Schema[A] = smithy4s.schema.Schema[A]
- trait Service[Alg[_[_, _, _, _, _]]] extends FunctorK5[Alg] with HasId
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.
- final case class ShapeId(namespace: String, name: String) extends HasId with Product with Serializable
- trait ShapeTag[A] extends HasId
A tag that can be used as keys for higher-kinded maps
- sealed trait StreamingSchema[A] extends AnyRef
- 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)
- case class Timestamp extends TimestampPlatform with Product with Serializable
- 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
- final case class UnsupportedProtocolError(service: HasId, protocolTag: HasId) extends Throwable with Product with Serializable
- type ~>[F[_], G[_]] = PolyFunction[F, G]
Value Members
- val Schema: smithy4s.schema.Schema.type
- def checkProtocol[Alg[_[_, _, _, _, _]]](service: Service[Alg], protocolTag: ShapeTag[_]): Either[UnsupportedProtocolError, Unit]
- val errorTypeHeader: String
- object Bijection
- object ByteArray
- object Document extends Serializable
- object Enumeration
- object HintMask
- object Hints
- object IntEnum extends Companion[IntEnum] with Serializable
- object Lazy
- object Newtype
- object NumericCompat
- object PayloadPath extends Serializable
- object Refinement
- object RefinementProvider
- object Service
- object ShapeId extends Has[ShapeId] with Serializable
- object ShapeTag
- object StreamingSchema
- object Surjection
- object Timestamp extends TimestampCompanionPlatform with Serializable
- object Transformation