loader

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOverlayExtendsPath

func GetOverlayExtendsPath(o *overlay.Overlay) (string, error)

GetOverlayExtendsPath returns the path to file if the extends URL is a file URL. Otherwise, returns an empty string and an error. The error may occur if no extends URL is present or if the URL is not a file URL or if the URL is malformed.

func LoadEitherSpecification

func LoadEitherSpecification(path string, o *overlay.Overlay) (*yaml.Node, string, error)

LoadEitherSpecification is a convenience function that will load a specification from the given file path if it is non-empty. Otherwise, it will attempt to load the path from the overlay's extends URL. Also returns the name of the file loaded.

func LoadExtendsSpecification

func LoadExtendsSpecification(o *overlay.Overlay) (*yaml.Node, error)

LoadExtendsSpecification will load and parse a YAML or JSON file as specified in the extends parameter of the overlay. Currently, this only supports file URLs.

func LoadOverlay

func LoadOverlay(path string) (*overlay.Overlay, error)

LoadOverlay is a tool for loading and parsing an overlay file from the file system.

func LoadSpecification

func LoadSpecification(path string) (*yaml.Node, error)

LoadSpecification will load and parse a YAML or JSON file from the given path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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