smithy4s
package smithy4s
- Alphabetic
- By Inheritance
- smithy4s
- ExistentialsPlatformCompat
- TypeAliases
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- 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
-
type
Existential[F[_]] = F[_]
- Definition Classes
- ExistentialsPlatformCompat
- trait ExistentialsPlatformCompat extends AnyRef
- type GenLift[F[_]] = AnyRef { type λ[I, E, O, SI, SO] = F[O] }
- 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. -
type
Interpreter[Op[_, _, _, _, _], F[_]] = Transformation[Op, [I, E, O, SI, SO]F[O]]
- Definition Classes
- TypeAliases
- final class Lazy[A] extends AnyRef
-
type
Monadic[Alg[_[_, _, _, _, _]], F[_]] = Alg[[I, E, O, SI, SO]F[O]]
- Definition Classes
- TypeAliases
- abstract class Newtype[A] extends HasId
- case class PayloadPath(segments: List[Segment]) extends Product with Serializable
-
trait
PolyFunction[F[_], G[_]] extends AnyRef
Natural transformation, turning a polymorphic type into another, whilst keeping the type parameter intact.
- 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.
- type Schema[A] = smithy4s.schema.Schema[A]
-
sealed
trait
SchemaIndex extends AnyRef
A map of schemas indexed by tag.
- type Schematic[F[_]] = smithy4s.schema.Schematic[F]
-
trait
Service[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _]] extends Transformable[Alg] with Provider[Alg, Op]
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 (natural transformations) 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
- Op
: an initially encoded version of the finally-encoded interface. Typically, a GADT that acts as a reification of the operations. Passing the reified versions around makes it drastically easier to implement logic generically, without involving metaprogramming.
- case class ShapeId(namespace: String, name: String) extends 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
-
abstract
class
Timestamp extends TimestampPlatformMethods
Platform-agnostic UTC timestamp representation.
Platform-agnostic UTC timestamp representation.
The schematic.TimePlatformCompat trait provides a "nowUTC" method to get the current time.
-
trait
TimestampCompanion extends AnyRef
Trait that is meant to be implemented in platform-specific ways, abstracing over logic that has to do with retrieving time from the system.
- trait TimestampPlatformMethods extends AnyRef
-
trait
Transformable[Alg[_[_, _, _, _, _]]] extends AnyRef
Allows to transform the effect an algebra works against.
-
trait
Transformation[F[_, _, _, _, _], G[_, _, _, _, _]] extends AnyRef
Natural transformation allowing to change the outer type that final interfaces work against.
-
trait
TypeAliases extends AnyRef
- Attributes
- protected
- type UnionSchema[A] = smithy4s.schema.Schema.UnionSchema[A]
- final case class UnsupportedProtocolError(service: HasId, protocolTag: HasId) extends Throwable with Product with Serializable
-
trait
Validator[C, A, B] extends AnyRef
Given a constraint of type C, an Validator can produce a Refinement that allows to go from A to B.
Given a constraint of type C, an Validator can produce a Refinement that allows to go from A to B.
A Validator can be used as a typeclass.
- type Wrapped[F[_], G[_], A] = F[G[A]]
- type ~>[F[_], G[_]] = PolyFunction[F, G]
Value Members
- val Schema: smithy4s.schema.Schema.type
- def checkProtocol[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _]](service: Service[Alg, Op], protocolTag: ShapeTag[_]): Either[UnsupportedProtocolError, Unit]
- val errorTypeHeader: String
- object ByteArray
- object Document extends Serializable
- object Enumeration
- object Existential
- object HintMask
- object Hints
- object Kind5
- object Lazy
- object NumericCompat
- object PayloadPath extends Serializable
- object Refinement
- object SchemaIndex
- object Service
- object ShapeId extends Companion[ShapeId] with Serializable
- object ShapeTag
- object StreamingSchema
-
object
Timestamp extends TimePlatformCompat
The smithy4s.TimePlatformCompat contains all the platform-specific code that has to do with retrieving time from the system, and is provided for the hree platforms (jvm/js/native.)
- object Transformation
- object Validator