file

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileTypeTerraform      string = "terraform"
	FileTypeDockerfile     string = "docker"
	FileTypeKubernetes     string = "kubernetes"
	FileTypeCloudFormation string = "cloudformation"
	FileTypeYAML           string = "yaml"
	FileTypeJSON           string = "json"
	FileTypeHelm           string = "helm"
	FileTypeAzureARM       string = "azurearm"

	TypeSlice  string = "!!seq"
	TypeMap    string = "!!map"
	TypeBool   string = "!!bool"
	TypeInt    string = "!!int"
	TypeFloat  string = "!!float"
	TypeStr    string = "!!str"
	TypeString string = "!!string"
)

Variables

This section is empty.

Functions

func CheckDirectoryForIAC

func CheckDirectoryForIAC(dirPath string) []string

func CheckUserInput

func CheckUserInput(args *model.Arguments) string

CheckUserInput evaluates specified arguments by user

func ConfigType

func ConfigType(file string) string

func ConvertStringListToArray added in v1.1.0

func ConvertStringListToArray(input string) *[]string

func Exists

func Exists(filename string) bool

Exists checks if filename exists

func GenerateClass

func GenerateClass(path string) string

func ParseAzureTemplateFile added in v1.14.0

func ParseAzureTemplateFile(configFile string) (interface{}, string)

parse Cloudformation config

func ParseCloudformationFile added in v1.13.0

func ParseCloudformationFile(configFile string) (interface{}, string)

parse Cloudformation config

func ParseDockerfile added in v1.7.0

func ParseDockerfile(filename string) (interface{}, string)

func ParseKubernetesFile

func ParseKubernetesFile(configFile string) (interface{}, string)

parse kubernetes config

func ParseTerraformFile

func ParseTerraformFile(filename string) (interface{}, string)

Types

type DockerInstruction added in v1.7.0

type DockerInstruction struct {
	LineRange   LineRange `json:"line_range"`
	Instruction string    `json:"instruction"`
	Args        []string  `json:"args"`
}

DockerInstruction represents a Dockerfile instruction in JSON format

type LineRange added in v1.7.0

type LineRange struct {
	StartLine int `json:"startLine"`
	EndLine   int `json:"endLine"`
}

type Resource

type Resource struct {
	Type       string                 `json:"Type"`
	Labels     []string               `json:"Labels"`
	Attributes map[string]interface{} `json:"Attributes"`
	Blocks     []Resource             `json:"Blocks"`
	LineRange  map[string]interface{} `json:"line_range"`
}

Custom data structures to represent the Terraform file in an interface

Jump to

Keyboard shortcuts

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