generator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function struct {
	Signature   string `yaml:"signature"`
	Description string `yaml:"description"`
}

Function is a handler definition.

func (*Function) Name

func (fn *Function) Name() string

Name extracts the name of the function from the signature.

type Generator

type Generator struct {
	*fabricgenerator.Generator
	// contains filtered or unexported fields
}

Generator is the main operator that generates the code.

func NewGenerator

func NewGenerator() (gen *Generator, err error)

NewGenerator creates a new SQL code generator. Verbose output is sent to stdout and stderr.

func (*Generator) Run

func (gen *Generator) Run() (err error)

Run performs code generation.

type SQL

type SQL struct {
	Table  string `yaml:"table"`
	Object string `yaml:"object"`
}

SQL are the settings used to customize code generation of SQL microservices.

func (*SQL) UnmarshalYAML

func (s *SQL) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML parses and validates the YAML.

type Service

type Service struct {
	SQL       SQL         `yaml:"sql"`
	Functions []*Function `yaml:"functions"`
	Configs   []*Function `yaml:"configs"`
}

Service is the top-level document for parsing service.yaml.

Jump to

Keyboard shortcuts

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