Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CLIVersion = func() string { return "dev" }
CLIVersion reports the running CLI's own version; the root command assigns it at startup. A release version becomes the toolchain pin scaffolds record.
View Source
var ( FactoryCmd = &cobra.Command{ Use: "factory", Short: "Scaffold a new factory", Args: cobra.NoArgs, Long: `Scaffold a new factory directory. The generated directory contains a factory.ub source file with empty placeholder blocks the author fills in. A stack file is operator supplied per stack; use the compiled factory's schema template command to create one. 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", Args: cobra.NoArgs, Long: "Generate a Go library from a Terraform provider schema.\n\n" + "The generated Go library contains typed structs with ub tags and\n" + "CRUD method stubs for every resource in the provider.\n\n" + "Examples:\n" + " unobin generate golibrary --from tf --provider random " + "--go-module-path example.com/libraries/random\n" + " 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", Args: cobra.NoArgs, Long: `Scaffold a new UB library directory. The generated directory contains one starter resource composite export file named <type>.ub. The directory listing is the project, so there is no separate project file. Blocks are empty for the author to fill 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 ¶
func SetGoLibraryAdapterForTest ¶
func SetGoLibraryAdapterForTest( adapter func(provider, version string) gogen.SchemaAdapter, ) func()
SetGoLibraryAdapterForTest replaces schema adapter construction and returns a restore function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.