Documentation ¶
Overview ¶
Package bicep provides a set of functions to manipulate Bicep files and directories.
It offers methods for parsing directories and files to extract valuable information regarding resource metadata, such as name and API version. The two main functions are ParseDirectory and ParseFile, which receive a directory or file path, and return a pointer to a BicepDirectory or BicepFile object.
The package also includes functions to update the API versions of existing Bicep files in place or create new ones. This can be done by calling UpdateDirectory or UpdateFile, which receive a pointer to a BicepDirectory or BicepFile object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDirectory ¶
func ParseDirectory(dir string) (*types.BicepDirectory, error)
ParseDirectory parses a directory and returns a pointer to a BicepDirectory object.
func UpdateDirectory ¶
func UpdateDirectory(bicepDirectory *types.BicepDirectory, inPlace bool) error
UpdateDirectory receives a pointer to a BicepDirectory object and updates its files with the new API versions for each resource. inPlace determines whether the function will update each file in place or create a new one with the suffix "_updated.bicep".
func UpdateFile ¶
UpdateFile receives a pointer to a BicepFile object and updates the file with the new API versions for each resource. inPlace determines whether the function will update the file in place or create a new one with the suffix "_updated.bicep".
Types ¶
This section is empty.