convert

package
v0.0.0-...-383d592 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeGVK

func ComputeGVK(jsonObject JSONObject) (*schema.GroupVersionKind, error)

func GetResourceName

func GetResourceName(resource JSONObject) (string, error)

func ReadAllFiles

func ReadAllFiles(folderPath string, fileSuffix string) ([][]byte, error)

func WriteFile

func WriteFile(content []byte, path string) error

Types

type JSONArray

type JSONArray = []any

type JSONObject

type JSONObject = map[string]any

func ExecutePatchOrdering

func ExecutePatchOrdering(o JSONObject) (JSONObject, error)

func ParseYAMLFileIntoJSONObjects

func ParseYAMLFileIntoJSONObjects(y []byte) ([]JSONObject, error)

type JSONValue

type JSONValue = any

type OrderKey

type OrderKey struct {
	// contains filtered or unexported fields
}

type PatchGenerator

type PatchGenerator struct {
	// contains filtered or unexported fields
}

func NewPatchGenerator

func NewPatchGenerator(schemaFolderPath string) (*PatchGenerator, error)

func (*PatchGenerator) Execute

func (pg *PatchGenerator) Execute(resources []JSONObject) ([]PatchPartition, error)

type PatchPartition

type PatchPartition struct {
	// contains filtered or unexported fields
}

func (*PatchPartition) DumpToFolder

func (pgr *PatchPartition) DumpToFolder(directoryPath string) error

func (*PatchPartition) GetBaseYAML

func (pgr *PatchPartition) GetBaseYAML() ([]byte, error)

func (*PatchPartition) GetOriginalYAMLs

func (pgr *PatchPartition) GetOriginalYAMLs() ([][]byte, error)

func (*PatchPartition) GetPatchYAMLs

func (pgr *PatchPartition) GetPatchYAMLs() ([][]byte, error)

func (*PatchPartition) String

func (pgr *PatchPartition) String() string

type PatchSource

type PatchSource struct {
	// contains filtered or unexported fields
}

type SchemaClient

type SchemaClient struct {
	// contains filtered or unexported fields
}

func NewSchemaClient

func NewSchemaClient(schemaFolderPath string) (*SchemaClient, error)

func (*SchemaClient) GetPatchMetadata

func (sc *SchemaClient) GetPatchMetadata(gvk schema.GroupVersionKind) (k8spatch.LookupPatchMeta, error)

func (*SchemaClient) GetSchemaByGVK

func (sc *SchemaClient) GetSchemaByGVK(manifest JSONObject) (*proto.Schema, error)

Jump to

Keyboard shortcuts

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