Packages

trait Service[Alg[_[_, _, _, _, _]]] extends FunctorK5[Alg] with HasId

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.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Service
  2. HasId
  3. FunctorK5
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type BiFunctorEndpointCompiler[F[_, _]] = PolyFunction5[Endpoint, [I, E, O, SI, SO](I) => F[E, O]]

    A EndpointCompiler specialised for effects of kind * -> (*, *), like Either or bifunctor IO

  2. type BiFunctorInterpreter[F[_, _]] = PolyFunction5[Operation, [I, E, O, SI, SO]F[E, O]]

    An interpreter specialised for effects of kind * -> (*, *), like Either or bifunctor IO.

  3. type Endpoint[I, E, O, SI, SO] = smithy4s.Endpoint[Operation, I, E, O, SI, SO]

    An endpoint is the set of schemas tied to types associated with an Operation.

    An endpoint is the set of schemas tied to types associated with an Operation. It has a method to wrap the input in an operation instance I => Operation[I, E, O, SI, SO].

    You can think of the endpoint as a "template for an Operation". It contains everything needed to decode/encode operation calls to/from low-level representations (like http requests).

  4. type EndpointCompiler[F[_, _, _, _, _]] = PolyFunction5[Endpoint, [I, E, O, SI, SO](I) => F[I, E, O, SI, SO]]

    A polymorphic function that can take an Endpoint (associated to this service) and produces an handler for it, namely a function that takes the input type of the operation, and produces an effect.

  5. type ErrorAware[F[_, _]] = Alg[[I, E, O, SI, SO]F[E, O]]

    A short-hand for algebras that are specialised for effects of kind * -> (*, *).

    A short-hand for algebras that are specialised for effects of kind * -> (*, *). This is meant to be used in userland, e.g:

    val myService = MyService.ErrorAware[Either]
  6. type FunctorEndpointCompiler[F[_]] = PolyFunction5[Endpoint, [I, E, O, SI, SO](I) => F[O]]

    A EndpointCompiler specialised for effects of kind * -> *, like Try or monofunctor IO

  7. type FunctorInterpreter[F[_]] = PolyFunction5[Operation, [I, E, O, SI, SO]F[O]]

    An interpreter specialised for effects of kind * -> *, like Try or monofunctor IO.

  8. type Impl[F[_]] = Alg[[I, E, O, SI, SO]F[O]]

    A short-hand for algebras that are specialised for effects of kind * -> *.

    A short-hand for algebras that are specialised for effects of kind * -> *.

    NB: this alias should be used in polymorphic implementations. When using the Smithy4s code generator, equivalent aliases that are named after the service are generated (e.g. Weather corresponding to WeatherGen).

  9. type Interpreter[F[_, _, _, _, _]] = PolyFunction5[Operation, F]

    This is a polymorphic function that runs an instance of an operation and produces an effect F.

  10. abstract type Operation[I, E, O, SI, SO]

    A datatype (typically a sealed trait) that reifies an operation call within a service.

    A datatype (typically a sealed trait) that reifies an operation call within a service. It essentially captures the input and type indexes that the operation deals with. It also typically captures an input value.

    It is possible to think of Operation as an "applied Endpoint", or a "call to an Endpoint".

Abstract Value Members

  1. abstract def endpoints: IndexedSeq[Endpoint[_, _, _, _, _]]
  2. abstract def fromPolyFunction[P[_, _, _, _, _]](function: PolyFunction5[Operation, P]): Alg[P]
  3. abstract def hints: Hints
  4. abstract def id: ShapeId
    Definition Classes
    HasId
  5. abstract def input[I, E, O, SI, SO](op: Operation[I, E, O, SI, SO]): I
  6. abstract def mapK5[F[_, _, _, _, _], G[_, _, _, _, _]](alg: Alg[F], function: PolyFunction5[F, G]): Alg[G]
    Definition Classes
    FunctorK5
  7. abstract def ordinal[I, E, O, SI, SO](op: Operation[I, E, O, SI, SO]): Int
  8. abstract def reified: Alg[Operation]
  9. abstract def toPolyFunction[P[_, _, _, _, _]](algebra: Alg[P]): PolyFunction5[Operation, P]
  10. abstract def version: String

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def algebra[F[_, _, _, _, _]](compiler: EndpointCompiler[F]): Alg[F]

    A function that takes an endpoint compiler and produces an Algebra (typically an instance of the generated interfaces), backed by an interpreter.

    A function that takes an endpoint compiler and produces an Algebra (typically an instance of the generated interfaces), backed by an interpreter.

    This is useful for writing generic functions that result in the instantiation of a client instance that abides by the service interface.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. final def bifunctorInterpreter[F[_, _]](compiler: BiFunctorEndpointCompiler[F]): BiFunctorInterpreter[F]

    A bifunctor-specialised version of interpreter

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def endpoint[I, E, O, SI, SO](op: Operation[I, E, O, SI, SO]): Endpoint[I, E, O, SI, SO]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def errorAware[F[_, _]](compiler: BiFunctorEndpointCompiler[F]): ErrorAware[F]

    A monofunctor-specialised version of algebra

  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. final def functorInterpreter[F[_]](compiler: FunctorEndpointCompiler[F]): FunctorInterpreter[F]

    A monofunctor-specialised version of interpreter

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def impl[F[_]](compiler: FunctorEndpointCompiler[F]): Impl[F]

    A monofunctor-specialised version of algebra

  17. final def interpreter[F[_, _, _, _, _]](compiler: EndpointCompiler[F]): Interpreter[F]

    Given a generic way to turn an endpoint into some handling function (like I => F[I, E, O, SI, SO]), this method takes care of the logic necessary to produce an interpreter that takes an Operation associated to the service and routes it to the correct function, returning the result.

  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final val opToEndpoint: PolyFunction5[Operation, Endpoint]
  23. val service: Service[Alg]
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from HasId

Inherited from FunctorK5[Alg]

Inherited from AnyRef

Inherited from Any

Ungrouped