codegen

package
v3.25.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(genpkg string, svcData *service.Data, root *expr.RootExpr, svc *expr.ServiceExpr) []*codegen.File

Generate produces testing files (client, harness, scenarios, errors, testdata) for the given service.

func GenerateExampleScenarios

func GenerateExampleScenarios(genpkg string, root *expr.RootExpr, svc *expr.ServiceExpr) *codegen.File

GenerateExampleScenarios returns an example scenarios.yaml file.

func GenerateSuiteTopLevel

func GenerateSuiteTopLevel(genpkg, examplePkg string, root *expr.RootExpr, svc *expr.ServiceExpr) *codegen.File

GenerateSuiteTopLevel returns the top-level example suite file.

Types

type ValidatorInfo

type ValidatorInfo struct {
	Validators map[string][]string // method -> validator names
	Package    string              // package name containing validators
	Path       string              // import path for the package
}

ValidatorInfo holds validator configuration

func ExtractValidatorsFromYAML

func ExtractValidatorsFromYAML() ValidatorInfo

ExtractValidatorsFromYAML reads scenarios.yaml if it exists and extracts validator names and package

Jump to

Keyboard shortcuts

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