utiliies

package
v0.0.0-...-e4a9812 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RKE  = "RKE"
	RKE2 = "RKE2"
	K3S  = "K3S"
)

Variables

This section is empty.

Functions

func DownloadFromURL

func DownloadFromURL(url string) (string, error)

DownloadFromURL download the file from the provided url, and returns its content as a string. It returns an empty string and an error when something goes wrong.

func FromFile

func FromFile(path string) (kdm.Data, error)

FromFile loads and returns the data object from the given path to a data.json file. It returns an empty data and an error when something goes wrong.

func FromLocalFile

func FromLocalFile() (kdm.Data, error)

FromLocalFile loads and returns the data object from the given path to a data.json file. It returns an empty data and an error when something goes wrong.

func FromURL

func FromURL(url string) (kdm.Data, error)

FromURL downloads and returns the data object from the given URL. It returns an empty data and an error when something goes wrong.

Types

This section is empty.

Directories

Path Synopsis
rke

Jump to

Keyboard shortcuts

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