generate

package
v0.6.0-7a Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FactoryCmd = &cobra.Command{
		Use:   "factory",
		Short: "Scaffold a new factory",
		Long: `Scaffold a new factory directory.

The generated directory contains a main.ub source file with empty
placeholder blocks the author fills in. The config.ub is operator
supplied per stack; use init-config (when available) or write
it by hand.

Examples:
  unobin generate factory -o ./my-factory`,

		RunE: func(cmd *cobra.Command, args []string) error {
			return runFactory(cmd, factoryCfg)
		},
	}
)
View Source
var (
	GolibraryCmd = &cobra.Command{
		Use:   "golibrary",
		Short: "Generate a Go library skeleton from a TF provider schema",
		Long: `Generate a Go library from a Terraform provider schema.

The generated Go library contains typed structs with ub tags and
CRUD method stubs for every resource in the provider.

Examples:
  unobin generate golibrary --from tf --provider random --go-module-path example.com/libraries/random
  unobin generate golibrary --from tf --provider aws -o ./aws-library --go-module-path example.com/libraries/aws`,

		RunE: func(cmd *cobra.Command, args []string) error {
			return runGenerate(cmd, golibraryCfg)
		},
	}
)
View Source
var (
	UblibraryCmd = &cobra.Command{
		Use:   "ublibrary",
		Short: "Scaffold a new UB library",
		Long: `Scaffold a new UB library directory.

The generated directory contains one starter composite type file named
resource-<type>.ub. The directory listing is the manifest, so there is
no separate manifest file. Blocks are empty with TODO comment markers;
the author fills them in.

Examples:
  unobin generate ublibrary -o ./greeter
  unobin generate ublibrary -o ./greeter --type greeting`,

		RunE: func(cmd *cobra.Command, args []string) error {
			return runUblibrary(cmd, ublibraryCfg)
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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