Package com.rnett.krosstalk.endpoint

Contains the endpoint template and resolution classes.

Endpoint represents a template from @KrosstalkEndpoint, with parameters and optional segments. Client plugins do not need to work with it, it is all handled internally.

EndpointResolveTree provides a tree based URL resolver based on an endpoint, that can extract parameter values and handle optionals. This is used by Endpoint.resolve, which is generally how server plugins do method resolution. See the Ktor server plugin for an example of how resolution can be handled.

Types

Link copied to clipboard
data class Endpoint(urlParts: EndpointRegion.UrlParts, queryParameters: EndpointRegion.QueryParameters)

Class representing an endpoint template. Valid template structures:

Link copied to clipboard
sealed class EndpointPart<in L : EndpointRegion>
Link copied to clipboard
Link copied to clipboard
sealed class EndpointRegion
Link copied to clipboard
sealed class EndpointResolveTree
Link copied to clipboard
class EndpointUnknownArgumentException @InternalKrosstalkApi constructor(methodName: String, endpointTemplate: Endpoint, missingParam: String, knownParams: Set<String>) : KrosstalkException

An unknown parameter was used in an @KrosstalkEndpoint template.

Link copied to clipboard
Link copied to clipboard
data class ResolveEndpoint(urlParts: List<ResolveUrlPart>, queryParams: Map<String, ResolveQueryParam>)
Link copied to clipboard
sealed class ResolveQueryParam
Link copied to clipboard
sealed class ResolveUrlPart
Link copied to clipboard
data class UrlRequest(urlParts: List<String>, queryParams: Map<String, String>)