EndpointServerLogicOps
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
- Self type
-
Members list
Value members
Concrete methods
Combine this public endpoint description with a function, which implements the server-side logic. The logic returns a result, which is either an error or a successful output, wrapped in an effect type F
. For secure endpoints, use serverSecurityLogic.
Combine this public endpoint description with a function, which implements the server-side logic. The logic returns a result, which is either an error or a successful output, wrapped in an effect type F
. For secure endpoints, use serverSecurityLogic.
A server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).
Both the endpoint and logic function are considered complete, and cannot be later extended through the returned ServerEndpoint value (except for endpoint meta-data). Secure endpoints allow providing the security logic before all the inputs and outputs are specified.
Attributes
Like serverLogic, but specialised to the case when the result is always an error (Left
), hence when the logic type can be simplified to I => F[E]
.
Like serverLogic, but specialised to the case when the result is always an error (Left
), hence when the logic type can be simplified to I => F[E]
.
Attributes
Like serverLogic, but specialised to the case when the error type is Unit
(e.g. a fixed status code), and the result of the logic function is an option. A None
is then treated as an error response.
Like serverLogic, but specialised to the case when the error type is Unit
(e.g. a fixed status code), and the result of the logic function is an option. A None
is then treated as an error response.
Attributes
Like serverLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.
Like serverLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.
Attributes
Same as serverLogic, but requires E
to be a throwable, and converts failed effects of type E
to endpoint errors.
Same as serverLogic, but requires E
to be a throwable, and converts failed effects of type E
to endpoint errors.
Attributes
Like serverLogic, but specialised to the case when the result is always a success (Right
), hence when the logic type can be simplified to I => F[O]
.
Like serverLogic, but specialised to the case when the result is always a success (Right
), hence when the logic type can be simplified to I => F[O]
.
Attributes
Combine this endpoint description with a function, which implements the security logic of the endpoint.
Combine this endpoint description with a function, which implements the security logic of the endpoint.
Subsequently, the endpoint inputs and outputs can be extended (for error outputs, new variants can be added, but they cannot be arbitrarily extended). Then the main server logic can be provided, given a function which accepts as arguments the result of the security logic and the remaining input. The final result is then a ServerEndpoint.
A complete server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).
An example use-case is defining an endpoint with fully-defined errors, and with security logic built-in. Such an endpoint can be then extended by multiple other endpoints, by specifying different inputs, outputs and the main logic.
Attributes
Like serverSecurityLogic, but specialised to the case when the result is always an error (Left
), hence when the logic type can be simplified to A => F[E]
.
Like serverSecurityLogic, but specialised to the case when the result is always an error (Left
), hence when the logic type can be simplified to A => F[E]
.
Attributes
Like serverSecurityLogic, but specialised to the case when the error type is Unit
(e.g. a fixed status code), and the result of the logic function is an option. A None
is then treated as an error response.
Like serverSecurityLogic, but specialised to the case when the error type is Unit
(e.g. a fixed status code), and the result of the logic function is an option. A None
is then treated as an error response.
Attributes
Like serverSecurityLogicWithOutput, but specialised to the case when the error type is Unit
(e.g. a fixed status code), and the result of the logic function is an option. A None
is then treated as an error response.
Like serverSecurityLogicWithOutput, but specialised to the case when the error type is Unit
(e.g. a fixed status code), and the result of the logic function is an option. A None
is then treated as an error response.
Attributes
Like serverSecurityLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.
Like serverSecurityLogic, but specialised to the case when the logic function is pure, that is doesn't have any side effects.
Attributes
Like serverSecurityLogicWithOutput, but specialised to the case when the logic function is pure, that is doesn't have any side effects.
Like serverSecurityLogicWithOutput, but specialised to the case when the logic function is pure, that is doesn't have any side effects.
Attributes
Same as serverSecurityLogic, but requires E
to be a throwable, and converts failed effects of type E
to endpoint errors.
Same as serverSecurityLogic, but requires E
to be a throwable, and converts failed effects of type E
to endpoint errors.
Attributes
Same as serverSecurityLogicWithOutput, but requires E
to be a throwable, and converts failed effects of type E
to endpoint errors.
Same as serverSecurityLogicWithOutput, but requires E
to be a throwable, and converts failed effects of type E
to endpoint errors.
Attributes
Like serverSecurityLogic, but specialised to the case when the result is always a success (Right
), hence when the logic type can be simplified to A => F[PRINCIPAL]
.
Like serverSecurityLogic, but specialised to the case when the result is always a success (Right
), hence when the logic type can be simplified to A => F[PRINCIPAL]
.
Attributes
Like serverSecurityLogicWithOutput, but specialised to the case when the result is always a success (Right
), hence when the logic type can be simplified to A => F[(O, PRINCIPAL)]
.
Like serverSecurityLogicWithOutput, but specialised to the case when the result is always a success (Right
), hence when the logic type can be simplified to A => F[(O, PRINCIPAL)]
.
Attributes
Like serverSecurityLogic, but allows the security function to contribute to the overall output of the endpoint. A value for the complete output O
defined so far has to be provided. The value PRINCIPAL
will be propagated as an input to the regular logic.
Like serverSecurityLogic, but allows the security function to contribute to the overall output of the endpoint. A value for the complete output O
defined so far has to be provided. The value PRINCIPAL
will be propagated as an input to the regular logic.