extractor

package
v1.8.19 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFileContent

func ReadFileContent(filepath string) (string, error)

func ToAbsolutePath

func ToAbsolutePath(path string) (string, error)

Types

type Configuration

type Configuration struct {
	MetadataName string
	Kind         string
	ApiVersion   string
	Annotations  map[string]interface{}
	Payload      []byte
	YamlNode     yaml.Node
}

type FileConfigurations

type FileConfigurations struct {
	FileName       string          `json:"fileName"`
	Configurations []Configuration `json:"configurations"`
}

type FileReader

type FileReader interface {
	ReadFileContent(filepath string) (string, error)
}

type InvalidFile

type InvalidFile struct {
	Path             string  `yaml:"path" json:"path" xml:"path"`
	ValidationErrors []error `yaml:"errors" json:"errors" xml:"errors"`
}

func ExtractConfigurationsFromYamlFile

func ExtractConfigurationsFromYamlFile(path string) (*[]Configuration, string, *InvalidFile)

type InvalidYamlError

type InvalidYamlError struct {
	ErrorMessage string
}

func (*InvalidYamlError) Error

func (e *InvalidYamlError) Error() string

Jump to

Keyboard shortcuts

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