utils

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFile

func GenerateFile(fileName string, tmplName string, meta interface{})

GenerateFile generates a new file from the passed template and metadata

func GenerateFileWithLogs

func GenerateFileWithLogs(fileName string, tmplName string, meta interface{})

GenerateFileWithLogs generates a new file from the passed template and metadata The difference from GenerateFile function is to output logs

func ToCamel

func ToCamel(str string) string

ToCamel converts a string to CamelCase

Types

type AttributeSchema

type AttributeSchema struct {
	Type      interface{} `json:"type"`
	Sensitive bool        `json:"sensitive"`
}

AttributeSchema contains Type and Sensitive

type BlockSchema

type BlockSchema struct {
	Attributes map[string]AttributeSchema `json:"attributes"`
	BlockTypes map[string]ResourceSchema  `json:"block_types"`
}

BlockSchema A block representation contains "attributes" and "block_types" (which represent nested blocks).

type ProviderSchema

type ProviderSchema struct {
	ResourceSchemas map[string]ResourceSchema `json:"resource_schemas"`
}

ProviderSchema describes the schemas for all resources.

func LoadProviderSchema

func LoadProviderSchema(path string) ProviderSchema

LoadProviderSchema loads provider schema file and deserialize into an object

type ProviderSchemas

type ProviderSchemas struct {
	Azurerm ProviderSchema `json:"registry.terraform.io/hashicorp/azurerm"`
}

ProviderSchemas describes the provider schemas for all providers throughout the configuration tree.

type ResourceSchema

type ResourceSchema struct {
	Block BlockSchema `json:"block"`
}

ResourceSchema describes the schemas for all resources.

type Schema

type Schema struct {
	ProviderSchemas ProviderSchemas `json:"provider_schemas"`
}

Schema describes the provider schemas for all providers throughout the configuration tree.

Jump to

Keyboard shortcuts

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