generator

package
v0.3.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownSDKLang = errors.New("unknown sdk language")

Functions

func Introspect added in v0.3.5

func Introspect(ctx context.Context, r *router.Router) (*introspection.Schema, error)

Introspect get the Dagger Schema with the router r.

func IntrospectAndGenerate

func IntrospectAndGenerate(ctx context.Context, r *router.Router, generator Generator) ([]byte, error)

IntrospectAndGenerate generate the Dagger API with the router r.

func SetSchemaParents added in v0.3.5

func SetSchemaParents(schema *introspection.Schema)

SetSchemaParents sets all the parents for the fields.

Types

type Config

type Config struct {
	Lang SDKLang
	// Package is the target package that is generated.
	// Not used for the SDKLangNodeJS.
	Package string
}

type Generator added in v0.3.5

type Generator interface {
	Generate(ctx context.Context, schema *introspection.Schema) ([]byte, error)
}

type SDKLang added in v0.3.5

type SDKLang string
const (
	SDKLangGo     SDKLang = "go"
	SDKLangNodeJS SDKLang = "nodejs"
	SDKLangPython SDKLang = "python"
)

Directories

Path Synopsis
go
templates
Go name linting.
Go name linting.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳