utils

package
v0.7.15 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelmChartURL          = "https://meshery.io/charts/"
	HelmChartName         = "meshery"
	HelmChartOperatorName = "meshery-operator"
	MesheryFolder         = ".meshery"
	ManifestsFolder       = "manifests"
)
View Source
const UI = "../../ui/public/static/img/meshmodels" //Relative to cmd/main.go

Variables

View Source
var UISVGPaths = make([]string, 1)

Functions

func ConvertMapInterfaceMapString

func ConvertMapInterfaceMapString(v interface{}) interface{}

ConvertMapInterfaceMapString converts map[interface{}]interface{} => map[string]interface{}

It will also convert []interface{} => []string

func DeleteSVGsFromFileSystem added in v0.6.45

func DeleteSVGsFromFileSystem()

func FlattenMap

func FlattenMap(prefix string, src map[string]interface{}, dest map[string]interface{})

FlattenMap flattens the given map and writes the flattened map in the dest

func FormatK8sMessage added in v0.6.141

func FormatK8sMessage(message string) string

Prunes the diff part present in the k8s response message. Diff corresponds to the previous change and applied change, and doesn't contain any info which can be helpful to the user. If we want we can show this in a CodeEditor component.

func GetComponentFieldPathFromK8sFieldPath added in v0.6.141

func GetComponentFieldPathFromK8sFieldPath(path string) (newpath string)

func GetPlatform added in v0.6.82

func GetPlatform() string

func IsClosed

func IsClosed(ch chan struct{}) bool

func MarshalAndUnmarshal added in v0.6.182

func MarshalAndUnmarshal[k any, v any](val k) (unmarshalledvalue v, err error)

func MergeMaps added in v0.7.5

func MergeMaps(mergeInto, toMerge map[string]interface{}) map[string]interface{}

func RecursiveCastMapStringInterfaceToMapStringInterface

func RecursiveCastMapStringInterfaceToMapStringInterface(in map[string]interface{}) map[string]interface{}

RecursiveCastMapStringInterfaceToMapStringInterface will convert a map[string]interface{} recursively => map[string]interface{}

func SanitizeFileName added in v0.6.105

func SanitizeFileName(fileName string) string

func SliceContains added in v0.6.48

func SliceContains(elements []string, name string) bool

func ToMapStringInterface

func ToMapStringInterface(mp interface{}) map[string]interface{}

ToMapStringInterface takes in data of type interface and returns a map[string]interface{} from that data

If the conversion fails then returns an empty map

func WriteSVGsOnFileSystem added in v0.6.45

func WriteSVGsOnFileSystem(comp *v1alpha1.ComponentDefinition)

Types

This section is empty.

Jump to

Keyboard shortcuts

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