| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Servant.Kotlin
- generateKotlinForDefDataClass :: KotlinType a => Proxy a -> [Text]
- defKotlinImports :: 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]
- generateKotlinForAPIClass :: Text -> [Text] -> [Text]
- data KotlinOptions = KotlinOptions {}
- data UrlPrefix
- defKotlinOptions :: KotlinOptions
- data Spec = Spec {}
- specsToDir :: [Spec] -> FilePath -> IO ()
- class KotlinType a
- data Proxy k (t :: k) :: forall k. k -> * = Proxy
Documentation
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.
Constructors
| KotlinOptions | |
Fields
| |
defKotlinOptions :: KotlinOptions Source #
Default options for generating Kotlin code. The default options are: > { urlPrefix = Static "" > , emptyResponseKotlinTypes = [ toKotlinType NoContent ] > , stringKotlinTypes = [ toKotlinType "" ] > }
Convenience re-exports from the Kotlin module
class KotlinType a Source #
Instances
| KotlinType Bool Source # | |
| KotlinType Char Source # | |
| KotlinType Double Source # | |
| KotlinType Float Source # | |
| KotlinType Int Source # | |
| KotlinType Int8 Source # | |
| KotlinType Int16 Source # | |
| KotlinType Int32 Source # | |
| KotlinType Int64 Source # | |
| KotlinType () Source # | |
| KotlinType Text Source # | |
| KotlinType UTCTime Source # | |
| KotlinType NoContent Source # | |
| KotlinType a => KotlinType [a] Source # | |
| KotlinType a => KotlinType (Maybe a) Source # | |
| KotlinType v => KotlinType (IntMap v) Source # | |
| (KotlinType a, KotlinType b) => KotlinType (a, b) Source # | |
| (KotlinType k, KotlinType v) => KotlinType (Map k v) Source # | |
| KotlinType a => KotlinType (Proxy * a) Source # | |
Convenience re-exports from Data.Proxy
data Proxy k (t :: k) :: forall k. k -> * #
A concrete, poly-kinded proxy type
Constructors
| Proxy |
Instances
| Generic1 k (Proxy k) | |
| Monad (Proxy *) | Since: 4.7.0.0 |
| Functor (Proxy *) | Since: 4.7.0.0 |
| Applicative (Proxy *) | Since: 4.7.0.0 |
| Foldable (Proxy *) | Since: 4.7.0.0 |
| Contravariant (Proxy *) | |
| Alternative (Proxy *) | Since: 4.9.0.0 |
| MonadPlus (Proxy *) | Since: 4.9.0.0 |
| Bounded (Proxy k t) | |
| Enum (Proxy k s) | Since: 4.7.0.0 |
| Eq (Proxy k s) | Since: 4.7.0.0 |
| Ord (Proxy k s) | Since: 4.7.0.0 |
| Read (Proxy k s) | Since: 4.7.0.0 |
| Show (Proxy k s) | Since: 4.7.0.0 |
| Ix (Proxy k s) | Since: 4.7.0.0 |
| Generic (Proxy k t) | |
| Monoid (Proxy k s) | Since: 4.7.0.0 |
| KotlinType a => KotlinType (Proxy * a) Source # | |
| type Rep1 k (Proxy k) | |
| type Rep (Proxy k t) | |