converter

package
v0.0.0-...-1fe3f09 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	OutputJson []byte
	OutputYaml []byte
}

Converter struct: this struct has a log property, so other newly added methods can access this log

func NewConverter

func NewConverter() *Converter

NewConverter: new a Converter struct object with a logger object

func (*Converter) ConvertDashboardToJson

func (converter *Converter) ConvertDashboardToJson(content []byte, isClusterCrd bool, ns string, name string) error

ConvertDashboardToJson converts the input json content to json bytes content

func (*Converter) ConvertDashboardToYaml

func (converter *Converter) ConvertDashboardToYaml(content []byte, isClusterCrd bool, ns string, name string) error

ConvertDashboardToYaml converts the input json content to yaml bytes content

func (*Converter) ConvertFromFile

func (converter *Converter) ConvertFromFile(input io.Reader, isClusterCrd bool, ns string, name string) error

ConvertFromFile converts the input json file to yaml/json bytes content

func (*Converter) ConvertToDashboard

func (converter *Converter) ConvertToDashboard(content []byte, isClusterCrd bool, ns string, name string) (*k8sDashboard, error)

ConvertToDashboard converts the input json content to Dashboard model

func (*Converter) ConvertToKubsphereDashboardManifests

func (converter *Converter) ConvertToKubsphereDashboardManifests(input io.Reader, output io.Writer, isClusterCrd bool, ns string, name string) error

ConvertToKubsphereDashboardManifests converts to a k8s mainfest file

Jump to

Keyboard shortcuts

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