Documentation
¶
Index ¶
- Constants
- type TypeScriptGenerator
- func (g *TypeScriptGenerator) GenerateClient(ctx context.Context, schema *introspection.Schema, schemaVersion string) (*generator.GeneratedState, error)
- func (g *TypeScriptGenerator) GenerateEntrypoint(ctx context.Context) (*generator.GeneratedState, error)
- func (g *TypeScriptGenerator) GenerateLibrary(ctx context.Context, schema *introspection.Schema, schemaVersion string) (*generator.GeneratedState, error)
- func (g *TypeScriptGenerator) GenerateModule(_ context.Context, schema *introspection.Schema, schemaVersion string) (*generator.GeneratedState, error)
- func (g *TypeScriptGenerator) GenerateTypeDefs(_ context.Context, _ *introspection.Schema, _ string) (*generator.GeneratedState, error)
Constants ¶
View Source
const ClientGenFile = "client.gen.ts"
View Source
const DefaultEntrypointFile = "__dagger.entrypoint.ts"
DefaultEntrypointFile is the filename of the static dispatch entrypoint the runtime expects at the user's module root.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TypeScriptGenerator ¶
func (*TypeScriptGenerator) GenerateClient ¶ added in v0.16.3
func (g *TypeScriptGenerator) GenerateClient(ctx context.Context, schema *introspection.Schema, schemaVersion string) (*generator.GeneratedState, error)
func (*TypeScriptGenerator) GenerateEntrypoint ¶
func (g *TypeScriptGenerator) GenerateEntrypoint(ctx context.Context) (*generator.GeneratedState, error)
GenerateEntrypoint renders the static dispatch `__dagger.entrypoint.ts` for the user's module from a previously-emitted typedef JSON. The path to that JSON, the module root, and other options come from `Config.EntrypointConfig`.
func (*TypeScriptGenerator) GenerateLibrary ¶ added in v0.18.15
func (g *TypeScriptGenerator) GenerateLibrary(ctx context.Context, schema *introspection.Schema, schemaVersion string) (*generator.GeneratedState, error)
func (*TypeScriptGenerator) GenerateModule ¶ added in v0.16.3
func (g *TypeScriptGenerator) GenerateModule(_ context.Context, schema *introspection.Schema, schemaVersion string) (*generator.GeneratedState, error)
Generate will generate the TypeScript SDK code and might modify the schema to reorder types in a alphanumeric fashion.
func (*TypeScriptGenerator) GenerateTypeDefs ¶ added in v0.19.3
func (g *TypeScriptGenerator) GenerateTypeDefs(_ context.Context, _ *introspection.Schema, _ string) (*generator.GeneratedState, error)
Click to show internal directories.
Click to hide internal directories.