Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertMapInterfaceMapString(v interface{}) interface{}
- func DeleteSVGsFromFileSystem()
- func FlattenMap(prefix string, src map[string]interface{}, dest map[string]interface{})
- func FormatK8sMessage(message string) string
- func GetComponentFieldPathFromK8sFieldPath(path string) (newpath string)
- func GetPlatform() string
- func IsClosed(ch chan struct{}) bool
- func MarshalAndUnmarshal[k any, v any](val k) (unmarshalledvalue v, err error)
- func MergeMaps(mergeInto, toMerge map[string]interface{}) map[string]interface{}
- func RecursiveCastMapStringInterfaceToMapStringInterface(in map[string]interface{}) map[string]interface{}
- func SanitizeFileName(fileName string) string
- func SliceContains(elements []string, name string) bool
- func ToMapStringInterface(mp interface{}) map[string]interface{}
- func WriteSVGsOnFileSystem(comp *v1alpha1.ComponentDefinition)
Constants ¶
const ( HelmChartURL = "https://khulnasoft.com/charts/" HelmChartName = "meshplay" HelmChartOperatorName = "meshplay-operator" MeshplayFolder = ".meshplay" ManifestsFolder = "manifests" )
const UI = "../../ui/public/static/img/meshmodels" //Relative to cmd/main.go
Variables ¶
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 ¶
func DeleteSVGsFromFileSystem()
func FlattenMap ¶
FlattenMap flattens the given map and writes the flattened map in the dest
func FormatK8sMessage ¶
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 GetPlatform ¶
func GetPlatform() string
func MarshalAndUnmarshal ¶
func RecursiveCastMapStringInterfaceToMapStringInterface ¶
func RecursiveCastMapStringInterfaceToMapStringInterface(in map[string]interface{}) map[string]interface{}
RecursiveCastMapStringInterfaceToMapStringInterface will convert a map[string]interface{} recursively => map[string]interface{}
func SanitizeFileName ¶
func SliceContains ¶
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 ¶
func WriteSVGsOnFileSystem(comp *v1alpha1.ComponentDefinition)
Types ¶
This section is empty.