codegen

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package codegen generates code for use with Encore apps.

Index

Constants

This section is empty.

Variables

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

ErrUnknownLang is reported by Generate when the language is not known.

Functions

func Client

func Client(lang Lang, appSlug string, md *meta.Data) (code []byte, err error)

Client generates an API client based on the given app metadata.

Types

type Lang

type Lang string

Lang represents a programming language or dialect that we support generating code for.

const (
	Unknown    Lang = ""
	TypeScript Lang = "typescript"
)

These constants represent supported languages.

func Detect

func Detect(path string) (lang Lang, ok bool)

Detect attempts to detect the language from the given filename.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL