bicep

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

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 ParseFile

func ParseFile(filename string) (*types.BicepFile, error)

ParseFile parses a file and returns a pointer to a BicepFile 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

func UpdateFile(bicepFile *types.BicepFile, inPlace bool) error

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.

Jump to

Keyboard shortcuts

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