Package-level declarations

Types

Link copied to clipboard
interface Action<R>
Link copied to clipboard

Superclass for paged actions where the response can be auto-marshalled

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Http4kConnectAction(val docs: String = "")

Marker attached to all actions to drive the client code generation.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Http4kConnectApiClient
Link copied to clipboard
abstract class NonNullAutoMarshalledAction<R : Any>(clazz: KClass<R>, autoMarshalling: AutoMarshalling) : Action<Result<R, RemoteFailure>>
Link copied to clipboard
abstract class NullableAutoMarshalledAction<R : Any>(clazz: KClass<R>, json: AutoMarshalling) : Action<Result<R?, RemoteFailure>>
Link copied to clipboard
interface Paged<out Token, out ItemType> : Iterable<ItemType>

Represents a Paged response

Link copied to clipboard

Superclass for all Paged actions

Link copied to clipboard
abstract class PlainTextAction : Action<Result<String, RemoteFailure>>
Link copied to clipboard
data class RemoteFailure(val method: Method, val uri: Uri, val status: Status, val message: String? = null)
Link copied to clipboard
abstract class Result4kAction<R, T : Action<R>>(action: T) : Action<Result<R, RemoteFailure>>

Transparent Action adapter from standard -> Result4k monad

Link copied to clipboard
abstract class ResultAction<R, T : Action<R>>(action: T) : Action<Result<R>>

Transparent Action adapter from standard -> Kotlin Result monad

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> kClass(): KClass<T>
Link copied to clipboard
fun <T> Result<T, RemoteFailure>.orThrow(): T
Link copied to clipboard

Paginate the response of the passed action