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)
Content copied to clipboard
Class representing an endpoint template. Valid template structures:
Link copied to clipboard
Link copied to clipboard
typealias EndpointQueryParameter = EndpointPart<EndpointRegion.QueryParameters>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class EndpointUnknownArgumentException @InternalKrosstalkApi constructor(methodName: String, endpointTemplate: Endpoint, missingParam: String, knownParams: Set<String>) : KrosstalkException
Content copied to clipboard
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>)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard