KtorGenTopLevelFactory

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class KtorGenTopLevelFactory(val name: String = KTORGEN_DEFAULT_NAME)(source)

Whether to generate a top-level function in the same package as the interface.

This function will allow instantiating the implementation by passing an HttpClient.

Example: fun UserRoute(client: HttpClient): UserRoute = UserRouteImpl(httpClient = client)

Parameters

name

The name of the function to generate. Defaults to the interface name.

Properties

Link copied to clipboard