Mixin

smithy4s.Service.Mixin
trait Mixin[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _]] extends Service[Alg]

Attributes

Graph
Supertypes
trait Service[Alg]
trait HasId
trait FunctorK5[Alg]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

type Operation[I, E, O, SI, SO] = Op[I, E, O, SI, SO]

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.

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".

Type parameters

E:

the error type associated to the operation (typically represented as a sealed-trait)

I:

the input of the operation

O:

the output of the operation

SI:

the streamed input of an operation. Operations can have unary components and streamed components. For instance, an http call can send headers (unary I) and a stream of bytes (streamed SI) to the server.

SO:

the streamed output of the operation.

Attributes

Inherited types

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

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

Attributes

Inherited from:
Service
type BiFunctorInterpreter[F[_, _]] = Interpreter[<none>]

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

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

Attributes

Inherited from:
Service
type Endpoint[I, E, O, SI, SO] = Endpoint[Operation, I, E, O, SI, SO]

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].

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).

Attributes

Inherited from:
Service
type EndpointCompiler[F[_, _, _, _, _]] = PolyFunction5[Endpoint, <none>]

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.

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.

Attributes

Inherited from:
Service
type ErrorAware[F[_, _]] = BiFunctorAlgebra[Alg, F]

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

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] 

Attributes

Inherited from:
Service

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

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

Attributes

Inherited from:
Service
type FunctorInterpreter[F[_]] = Interpreter[<none>]

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

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

Attributes

Inherited from:
Service
type Impl[F[_]] = FunctorAlgebra[Alg, F]

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).

Attributes

Inherited from:
Service
type Interpreter[F[_, _, _, _, _]] = PolyFunction5[Operation, F]

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

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

Attributes

Inherited from:
Service

Value members

Inherited methods

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.

Attributes

Inherited from:
Service

A bifunctor-specialised version of interpreter

A bifunctor-specialised version of interpreter

Attributes

Inherited from:
Service
def endpoint[I, E, O, SI, SO](op: Op[I, E, O, SI, SO]): Endpoint[I, E, O, SI, SO]

Attributes

Inherited from:
Service
def endpoints: IndexedSeq[Endpoint[Operation, _, _, _, _, _]]

Attributes

Inherited from:
Service
final def errorAware[F[_, _]](compiler: BiFunctorEndpointCompiler[F]): ErrorAware[F]

A monofunctor-specialised version of algebra

A monofunctor-specialised version of algebra

Attributes

Inherited from:
Service
def fromPolyFunction[P[_, _, _, _, _]](function: PolyFunction5[Operation, P]): Alg[P]

Attributes

Inherited from:
Service

A monofunctor-specialised version of interpreter

A monofunctor-specialised version of interpreter

Attributes

Inherited from:
Service
def hints: Hints

Attributes

Inherited from:
Service
def id: ShapeId

Attributes

Inherited from:
HasId
final def impl[F[_]](compiler: FunctorEndpointCompiler[F]): Impl[F]

A monofunctor-specialised version of algebra

A monofunctor-specialised version of algebra

Attributes

Inherited from:
Service
def input[I, E, O, SI, SO](op: Op[I, E, O, SI, SO]): I

Attributes

Inherited from:
Service
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.

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.

Attributes

Inherited from:
Service
def mapK5[F[_, _, _, _, _], G[_, _, _, _, _]](alg: Alg[F], function: PolyFunction5[F, G]): Alg[G]

Attributes

Inherited from:
FunctorK5
def ordinal[I, E, O, SI, SO](op: Op[I, E, O, SI, SO]): Int

Attributes

Inherited from:
Service
def reified: Alg[Operation]

Attributes

Inherited from:
Service
def toPolyFunction[P[_, _, _, _, _]](algebra: Alg[P]): PolyFunction5[Operation, P]

Attributes

Inherited from:
Service

Attributes

Inherited from:
Service

Inherited fields

Attributes

Inherited from:
Service
val service: Service[Alg]

Attributes

Inherited from:
Service

Implicits

Implicits

implicit val serviceInstance: Service[Alg]