Something went wrong. Try again.
Dagger 1.0.0 beta SDK experiments
dagger purescript gleam clojure
Something went wrong. Try again.
4.8 kB · 136 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137-- Generated by scripts/generate.mjs. Do not edit.module Dagger.Module ( contextSource , dependencies , description , enums , generatedContextDirectory , id , interfaces , introspectionSchemaJSON , name , objects , runtime , sdk , serve , serveWith , ServeOpts , defaultServeOpts , source , sync , userDefaults , withDescription , withEnum , withInterface , withObject ) where
import Data.Maybe (Maybe(..))import Effect.Aff (Aff)import Dagger.Internal.Runtime as Rimport Dagger.Types as T
-- | The source used to resolve contextual files and directories, when different from source.contextSource :: T.Module -> Aff (Maybe T.ModuleSource)contextSource = R.nullableObject "ModuleSource" "contextSource" []
-- | The dependencies of the module.dependencies :: T.Module -> Aff (Array T.Module)dependencies = R.objectList "Module" "dependencies" []
-- | The doc string of the module, if anydescription :: T.Module -> Aff Stringdescription = R.scalar "description" []
-- | Enumerations served by this module.enums :: T.Module -> Aff (Array T.TypeDef)enums = R.objectList "TypeDef" "enums" []
-- | The generated files and directories made on top of the module source's context directory.generatedContextDirectory :: T.Module -> T.DirectorygeneratedContextDirectory = R.select "generatedContextDirectory" []
-- | A unique identifier for this Module.id :: T.Module -> Aff T.IDid = R.scalar "id" []
-- | Interfaces served by this module.interfaces :: T.Module -> Aff (Array T.TypeDef)interfaces = R.objectList "TypeDef" "interfaces" []
-- | The introspection schema JSON file for this module.-- |-- | This file represents the schema visible to the module's source code, including all core types and those from the dependencies.-- |-- | Note: this is in the context of a module, so some core types may be hidden.introspectionSchemaJSON :: T.Module -> T.FileintrospectionSchemaJSON = R.select "introspectionSchemaJSON" []
-- | The name of the modulename :: T.Module -> Aff Stringname = R.scalar "name" []
-- | Objects served by this module.objects :: T.Module -> Aff (Array T.TypeDef)objects = R.objectList "TypeDef" "objects" []
-- | The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.runtime :: T.Module -> Aff (Maybe T.Container)runtime = R.nullableObject "Container" "runtime" []
-- | The SDK config used by this module.sdk :: T.Module -> Aff (Maybe T.SDKConfig)sdk = R.nullableObject "SDKConfig" "sdk" []
type ServeOpts = { includeDependencies :: Maybe Boolean , main :: Maybe Boolean , entrypoint :: Maybe Boolean }
defaultServeOpts :: ServeOptsdefaultServeOpts = { includeDependencies: Nothing , main: Nothing , entrypoint: Nothing }
-- | Serve a module's API in the current session.-- |-- | Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.serve :: T.Module -> Aff (Maybe T.Void)serve = serveWith defaultServeOpts
-- | Serve a module's API in the current session.-- |-- | Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.serveWith :: ServeOpts -> T.Module -> Aff (Maybe T.Void)serveWith opts = R.scalar "serve" [R.optional (R.argument "includeDependencies" "Boolean") opts.includeDependencies, R.optional (R.argument "main" "Boolean") opts.main, R.optional (R.argument "entrypoint" "Boolean") opts.entrypoint]
-- | The source for the module.source :: T.Module -> Aff (Maybe T.ModuleSource)source = R.nullableObject "ModuleSource" "source" []
-- | Forces evaluation of the module, including any loading into the engine and associated validation.sync :: T.Module -> Aff T.IDsync = R.scalar "sync" []
-- | User-defined default values, loaded from local .env files.userDefaults :: T.Module -> T.EnvFileuserDefaults = R.select "userDefaults" []
-- | Retrieves the module with the given descriptionwithDescription :: String -> T.Module -> T.ModulewithDescription argDescription = R.select "withDescription" [R.argument "description" "String!" argDescription]
-- | This module plus the given Enum type and associated valueswithEnum :: T.TypeDef -> T.Module -> T.ModulewithEnum argEnum = R.select "withEnum" [R.objectArgument "enum" "ID!" argEnum]
-- | This module plus the given Interface type and associated functionswithInterface :: T.TypeDef -> T.Module -> T.ModulewithInterface argIface = R.select "withInterface" [R.objectArgument "iface" "ID!" argIface]
-- | This module plus the given Object type and associated functions.withObject :: T.TypeDef -> T.Module -> T.ModulewithObject argObject = R.select "withObject" [R.objectArgument "object" "ID!" argObject]