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

platform

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package platform orchestrates parsing of all Platform Gateway OpenAPI specs and merges resources by tag-name across specs. The output is a list of canonical Resources ready for code emission. Generated commands live under internal/commands/platform/generated/ so any product (pro, school, etc.) can wire selected resources into its command tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(resources []*parser.Resource, outputDir string) ([]string, error)

Generate emits one Go file per resource into outputDir. Returns the list of generated file paths.

func LoadResources

func LoadResources(specsDir string) ([]*parser.Resource, []string, error)

LoadResources walks specsDir for *.json platform spec files, parses each, and merges resources sharing the same name (e.g. "devices" appears in device-groups-api.json and device-inventory-api.json — operations from both merge into a single Resource).

Returns the merged resources plus the sorted list of spec files actually consumed, so callers (notably the provenance writer) don't have to re-glob and risk drifting from what was parsed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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