Help us shape the future of Go! Take the 2026 Go Developer Survey

consts

package
v0.0.0-...-2fd5d2c Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LanguageNodeJS is the Node.js language constant
	// to be used for initialising and managing node.js projects.
	LanguageNodeJS = "nodejs"

	// LanguagePython is the Python language constant
	// to be used for initialising and managing python projects.
	LanguagePython = "python"

	// LanguageJava is the Java language constant
	// to be used for initialising and managing java projects.
	LanguageJava = "java"

	// LanguageDotNet is the .NET language constant
	// to be used for initialising and managing .NET projects.
	LanguageDotNet = "dotnet"

	// LanguageGo is the Go language constant
	// to be used for initialising and managing go projects.
	//
	// This is a scaffolding language rather than a runtime prefix. Go handlers
	// run on an OS-only runtime, so no runtime identifier starts with "go" and
	// this must never be registered as a key in a runtime-prefix map.
	LanguageGo = "go"

	// LanguageRust is the Rust language constant
	// to be used for initialising and managing rust projects.
	LanguageRust = "rust"
)
View Source
const (
	// RuntimeOSOnly is the prefix shared by every OS-only runtime identifier.
	//
	// An OS-only runtime carries no language interpreter. The handlers
	// executable is compiled ahead of time and the core runtime starts it as a
	// separate process, so the identifier names the base OS rather than a
	// language. Which language built the executable is resolved from the
	// project, not from this string.
	RuntimeOSOnly = "os-only"

	// RuntimeOSOnlyDebian13 is the OS-only runtime built on Debian 13 (trixie).
	RuntimeOSOnlyDebian13 = "os-only.debian13"
)
View Source
const (
	BlueprintSourceFile      = "file"
	BlueprintSourceS3        = "s3"
	BlueprintSourceGCS       = "gcs"
	BlueprintSourceAzureBlob = "azureblob"
	BlueprintSourceHTTPS     = "https"
)

Variables

View Source
var (
	// SupportedLanguages is a list of all supported languages
	// that can be used for Celerity projects.
	SupportedLanguages = []string{
		LanguageNodeJS,
		LanguagePython,
		LanguageJava,
		LanguageDotNet,
		LanguageGo,
		LanguageRust,
	}
)

Functions

This section is empty.

Types

type RuntimeConventions

type RuntimeConventions struct {
	// DefaultModulePaths are tried in order to find the module entry point.
	// First match on disk wins. If none exist, the first path is used as the default.
	DefaultModulePaths []string

	// WatchRoots are the directories, relative to the application directory,
	// that the watcher walks. Node.js and Python projects keep their handlers
	// under src/; a Go module has them at the module root, so this is not a
	// constant the watcher can assume.
	WatchRoots []string

	// WatchExtensions are the file extensions the watcher considers relevant.
	// Empty for an OS-only runtime, where the extensions belong to whichever
	// language built the handlers executable and come from the toolchain.
	WatchExtensions []string

	// WatchSkipDirs are directory names the watcher should skip.
	// ".git" is always skipped and does not need to be listed here.
	WatchSkipDirs []string

	// SupportsExtraction indicates whether this runtime has a handler extraction CLI.
	// When false, the extraction step is skipped and the raw blueprint is used as-is.
	SupportsExtraction bool
}

RuntimeConventions defines language-specific defaults for dev commands. Each supported runtime prefix (e.g. "nodejs", "python") maps to one of these.

func ConventionsForRuntime

func ConventionsForRuntime(runtime string) (RuntimeConventions, bool)

ConventionsForRuntime returns the RuntimeConventions for the given runtime string. The runtime string (e.g. "nodejs24.x", "python3.13", "os-only.debian13") is matched by prefix against the known runtime keys.

type TestConventions

type TestConventions struct {
	// DefaultTestDirs maps suite names to directories containing tests.
	// The test runner uses these to scope which tests to run for each suite.
	DefaultTestDirs map[string][]string

	// DetectFiles are filenames checked to auto-detect the test framework
	// (e.g. "package.json" for Node.js, "pyproject.toml" for Python).
	DetectFiles []string
}

TestConventions defines language-specific defaults for test execution.

func TestConventionsForRuntime

func TestConventionsForRuntime(runtime string) (TestConventions, bool)

TestConventionsForRuntime returns the TestConventions for the given runtime string. Matching works by longest prefix, the same as ConventionsForRuntime.

There is deliberately no OS-only entry, because one OS-only runtime serves Go, Rust, Zig and C++, whose test layouts have nothing in common. The directories belong to the resolved toolchain rather than to the runtime.

Jump to

Keyboard shortcuts

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