Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class GenerateKotlin a where
- generateKotlin :: a -> [Text]
- generateKotlin' :: a -> Text
- generateKotlinForDefDataClass :: KotlinType a => Proxy a -> [Text]
- generateKotlinForDefDataClass' :: KotlinClass -> [Text]
- defKotlinImports :: Text
- generateKotlinForAPIClass :: Text -> [Text] -> [Text]
- generateKotlinForAPI :: (HasForeign LangKotlin KotlinClass api, GenerateList KotlinClass (Foreign KotlinClass api)) => Proxy api -> [Text]
- generateKotlinForAPIWith :: (HasForeign LangKotlin KotlinClass api, GenerateList KotlinClass (Foreign KotlinClass api)) => KotlinOptions -> Proxy api -> [Text]
- data KotlinOptions = KotlinOptions {}
- defKotlinOptions :: KotlinOptions
- data UrlPrefix
Documentation
class GenerateKotlin a where Source #
generateKotlin :: a -> [Text] Source #
generateKotlin' :: a -> Text Source #
Instances
GenerateKotlin KotlinField Source # | |
Defined in Servant.Kotlin.Internal.Generate generateKotlin :: KotlinField -> [Text] Source # generateKotlin' :: KotlinField -> Text Source # | |
GenerateKotlin KotlinFields Source # | |
Defined in Servant.Kotlin.Internal.Generate generateKotlin :: KotlinFields -> [Text] Source # generateKotlin' :: KotlinFields -> Text Source # | |
GenerateKotlin KotlinDataClass Source # | |
Defined in Servant.Kotlin.Internal.Generate generateKotlin :: KotlinDataClass -> [Text] Source # | |
GenerateKotlin KotlinExClass Source # | |
Defined in Servant.Kotlin.Internal.Generate generateKotlin :: KotlinExClass -> [Text] Source # generateKotlin' :: KotlinExClass -> Text Source # | |
GenerateKotlin KotlinPrimitiveClass Source # | |
Defined in Servant.Kotlin.Internal.Generate | |
GenerateKotlin KotlinClass Source # | |
Defined in Servant.Kotlin.Internal.Generate generateKotlin :: KotlinClass -> [Text] Source # generateKotlin' :: KotlinClass -> Text Source # |
generateKotlinForDefDataClass :: KotlinType a => Proxy a -> [Text] Source #
generateKotlinForAPI :: (HasForeign LangKotlin KotlinClass api, GenerateList KotlinClass (Foreign KotlinClass api)) => Proxy api -> [Text] Source #
Generate Kotlin code for the API with default options. Returns a list of Kotlin functions to query your Servant API from Kotlin.
generateKotlinForAPIWith :: (HasForeign LangKotlin KotlinClass api, GenerateList KotlinClass (Foreign KotlinClass api)) => KotlinOptions -> Proxy api -> [Text] Source #
Generate Kotlin code for the API with custom options.
data KotlinOptions Source #
Options to configure how code is generated.
KotlinOptions | |
|
defKotlinOptions :: KotlinOptions Source #
Default options for generating Kotlin code. The default options are: > { urlPrefix = Static "" > , emptyResponseKotlinTypes = [ toKotlinType NoContent ] > , stringKotlinTypes = [ toKotlinType "" ] > }