closure

package
v0.5.2-beta01 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClosure

func BuildClosure(serviceDocBytes []byte, cfg ClosureConfig) ([]byte, error)

BuildClosure produces the minimal service document YAML containing only the paths, schemas, parameters, and resource definitions needed for the specified resource.

func ListResources

func ListResources(serviceDocBytes []byte) ([]string, error)

ListResources returns all resource names from the x-stackQL-resources section.

func RewriteServers

func RewriteServers(servers []interface{}, rewriteURL string) []interface{}

RewriteServers replaces the URL in each server entry with rewriteURL, preserving template variables (e.g., {region}) if they appear in the path.

Types

type ClosureConfig

type ClosureConfig struct {
	ResourceName string
	RewriteURL   string // optional: rewrite all server URLs to this base
}

ClosureConfig configures the closure builder.

Jump to

Keyboard shortcuts

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