parser

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertTFtoJSON added in v0.1.0

func ConvertTFtoJSON(tfFilePath string) (string, error)

ConvertTFtoJSON reads a Terraform file and converts it to JSON format.

func ConvertToJSON added in v0.1.0

func ConvertToJSON(i interface{}) interface{}

func CueToYAML added in v0.1.0

func CueToYAML(value cue.Value) ([]byte, error)

func ParseDockerfileInput added in v0.1.0

func ParseDockerfileInput(filename string, data interface{}) error

func ProcessInput added in v0.1.0

func ProcessInput(input string) ([]byte, error)

processData processes the input and returns JSON data.

Types

type DockerfileInstruction

type DockerfileInstruction struct {
	Cmd   string `json:"cmd"`
	Value string `json:"value"`
}

func ParseDockerfileContent

func ParseDockerfileContent(content string) []DockerfileInstruction

type InputInstruction

type InputInstruction map[string][]string

type InputStage

type InputStage struct {
	Instructions []InputInstruction `yaml:"instructions"`
	Stage        int                `yaml:"stage"`
}

type InputYAML

type InputYAML struct {
	Dockerfile []InputStage `yaml:"dockerfile"`
}

func ParseYAMLContent

func ParseYAMLContent(yamlContent string) (*InputYAML, error)

Jump to

Keyboard shortcuts

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